/* ==========================================================================
   PLIP Auto — Dashboard
   Interface type iOS/macOS : surfaces claires, coins arrondis, peu de bordures,
   hiérarchie par la taille et le poids typographique plutôt que par le trait.
   ========================================================================== */

:root {
	--plip-radius-xl: 22px;
	--plip-radius-lg: 16px;
	--plip-radius-md: 12px;
	--plip-radius-sm: 9px;
	--plip-pill: 980px;

	--plip-accent: #0071e3;
	--plip-accent-soft: rgba(0, 113, 227, .12);
	--plip-green: #34c759;
	--plip-orange: #ff9f0a;
	--plip-red: #ff3b30;
	--plip-purple: #af52de;

	--plip-ease: cubic-bezier(.4, 0, .2, 1);

	--plip-bg: #f2f2f7;
	--plip-surface: #ffffff;
	--plip-surface-2: #f7f7fa;
	--plip-surface-3: #eeeef2;
	--plip-text: #1d1d1f;
	--plip-text-2: #6e6e73;
	--plip-text-3: #a1a1a6;
	--plip-border: rgba(0, 0, 0, .08);
	--plip-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
	--plip-shadow-lg: 0 12px 48px rgba(0, 0, 0, .14);
	--plip-blur-bg: rgba(255, 255, 255, .72);

	/* Survol : un voile, pas une couleur. Fonctionne donc sur n'importe
	   quelle surface, claire ou sombre, sans jamais devenir invisible. */
	--plip-hover: rgba(0, 0, 0, .05);
	--plip-hover-strong: rgba(0, 0, 0, .085);
	--plip-press: rgba(0, 0, 0, .12);
}

.plip {
	position: relative;
	box-sizing: border-box;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 20px 140px;
	color: var(--plip-text);
	background: transparent;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

html[data-plip-theme="dark"],
.plip[data-theme="dark"] {
	--plip-bg: #000000;
	--plip-surface: #1c1c1e;
	--plip-surface-2: #2c2c2e;
	--plip-surface-3: #3a3a3c;
	--plip-text: #f5f5f7;
	/* #98989d et #636366 tombaient à 4,2 et 3,4 pour 1 sur fond noir :
	   illisible pour du texte courant. Ces deux-là tiennent 8,5 et 5,3. */
	--plip-text-2: #aeaeb2;
	--plip-text-3: #8e8e93;
	--plip-border: rgba(255, 255, 255, .10);
	--plip-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .4);
	--plip-shadow-lg: 0 12px 48px rgba(0, 0, 0, .6);
	--plip-blur-bg: rgba(28, 28, 30, .78);
	--plip-accent: #0a84ff;
	--plip-accent-soft: rgba(10, 132, 255, .18);
	--plip-hover: rgba(255, 255, 255, .07);
	--plip-hover-strong: rgba(255, 255, 255, .12);
	--plip-press: rgba(255, 255, 255, .18);
}

.plip *,
.plip *::before,
.plip *::after { box-sizing: border-box; }

.plip svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

/* ==========================================================================
   PRISE DE CONTRÔLE DE LA PAGE

   Le dashboard est une interface de gestion, pas un contenu d'article : il
   doit occuper toute la page. On neutralise donc les conteneurs du thème
   (OceanWP et la plupart des autres) qui l'enfermeraient dans une colonne
   blanche avec des marges.
   ========================================================================== */

html.plip-dash-html,
html.plip-dash-html body.plip-dash-page {
	background: var(--plip-bg) !important;
}

/* Fond peint sur toute la hauteur, même si le contenu est court */
body.plip-dash-page {
	min-height: 100vh;
	transition: background .3s var(--plip-ease);
}

/* Conteneurs de thème à aplatir */
body.plip-dash-page #content-wrap,
body.plip-dash-page #main,
body.plip-dash-page #primary,
body.plip-dash-page #content,
body.plip-dash-page .site-content,
body.plip-dash-page .content-area,
body.plip-dash-page .entry-content,
body.plip-dash-page .entry,
body.plip-dash-page .page-content,
body.plip-dash-page .container,
body.plip-dash-page article.type-page {
	background: transparent !important;
	max-width: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	float: none !important;
}

/* En-tête de page, fil d'Ariane, sidebar et commentaires : hors sujet ici */
body.plip-dash-page .page-header,
body.plip-dash-page .entry-title,
body.plip-dash-page .site-breadcrumbs,
body.plip-dash-page #sidebar,
body.plip-dash-page #right-sidebar,
body.plip-dash-page #left-sidebar,
body.plip-dash-page .comments-area,
body.plip-dash-page .entry-share,
body.plip-dash-page .post-navigation { display: none !important; }

/* Si tu veux garder le titre du thème :
   add_filter( 'plip_dash_takeover', '__return_false' ); */

.plip {
	padding-top: 8px;
}

/* La barre d'admin WordPress est fixe : la barre d'onglets se colle dessous */
body.admin-bar .plip-topbar { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar .plip-topbar { top: 46px; }
}

/* ==========================================================================
   BARRE SUPÉRIEURE
   ========================================================================== */

.plip-topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 12px 0;
	margin-bottom: 24px;
	background: transparent;
	border-bottom: 1px solid var(--plip-border);
}

/**
 * Le flou est porté par un pseudo-élément, pas par la barre elle-même.
 *
 * Un élément qui déclare backdrop-filter devient le bloc conteneur de ses
 * descendants en position:fixed. Avec le flou posé sur .plip-topbar, le
 * menu mobile — qui vit dedans — se retrouvait confiné dans la hauteur de
 * la barre au lieu de couvrir l'écran. Un pseudo-élément n'a pas cet effet
 * sur les descendants de son parent.
 */
.plip-topbar::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--plip-blur-bg);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
}

.plip-topbar__brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.plip-topbar__mark {
	display: grid;
	place-items: center;
	width: 34px; height: 34px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--plip-accent), #5856d6);
	color: #fff;
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -.02em;
}

.plip-topbar__title { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.plip-topbar__sub { display: block; font-size: 12px; color: var(--plip-text-2); }

.plip-topbar__actions { margin-left: auto; display: flex; gap: 6px; }

/* Segmented control */
.plip-tabs {
	display: flex;
	gap: 2px;
	padding: 3px;
	border-radius: var(--plip-pill);
	background: var(--plip-surface-3);
}

.plip-tab {
	position: relative;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 7px 15px;
	border: 0;
	border-radius: var(--plip-pill);
	background: transparent;
	color: var(--plip-text-2);
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	cursor: pointer;
	transition: background .22s var(--plip-ease), color .22s var(--plip-ease);
	white-space: nowrap;
}

.plip-tab:hover { color: var(--plip-text); }

.plip-tab.is-active {
	background: var(--plip-surface);
	color: var(--plip-text);
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.plip-tab svg { width: 15px; height: 15px; }

.plip-badge {
	display: inline-grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: var(--plip-pill);
	background: var(--plip-red);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	font-style: normal;
}

.plip-icon-btn {
	display: grid;
	place-items: center;
	width: 34px; height: 34px;
	border: 0;
	border-radius: 50%;
	background: var(--plip-surface-3);
	color: var(--plip-text);
	cursor: pointer;
	transition: transform .18s var(--plip-ease), background .18s var(--plip-ease);
}
.plip-icon-btn:hover { background: var(--plip-hover-strong); transform: scale(1.06); }
.plip-icon-btn:active { transform: scale(.94); }
.plip-icon-btn.is-spinning svg { animation: plip-spin .7s linear infinite; }

.plip .plip-ico-moon { display: none; }
html[data-plip-theme="dark"] .plip-ico-sun { display: none; }
html[data-plip-theme="dark"] .plip-ico-moon { display: block; }

/* ==========================================================================
   PANELS
   ========================================================================== */

.plip-panel { display: none; animation: plip-fade .32s var(--plip-ease); }
.plip-panel.is-active { display: block; }

@keyframes plip-fade {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

.plip-section { margin-bottom: 30px; }

.plip-section__head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 14px;
	padding: 0 4px;
}

.plip-section__head h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--plip-text);
}

.plip-section__head p { margin: 0; font-size: 13px; color: var(--plip-text-2); }
.plip-section__head .plip-link { margin-left: auto; }

.plip-link {
	background: none; border: 0; padding: 0;
	color: var(--plip-accent); font: inherit; font-size: 13.5px; font-weight: 500;
	cursor: pointer;
}
.plip-link:hover { text-decoration: underline; }

/* ==========================================================================
   CARTES
   ========================================================================== */

.plip-card {
	background: var(--plip-surface);
	border-radius: var(--plip-radius-xl);
	box-shadow: var(--plip-shadow);
	padding: 22px;
}

.plip-grid { display: grid; gap: 16px; }
.plip-grid--3 { grid-template-columns: repeat(3, 1fr); }
.plip-grid--2 { grid-template-columns: repeat(2, 1fr); }
.plip-grid--kpi { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* KPI */
.plip-kpi {
	position: relative;
	overflow: hidden;
	background: var(--plip-surface);
	border-radius: var(--plip-radius-xl);
	box-shadow: var(--plip-shadow);
	padding: 20px 22px;
}

.plip-kpi__label {
	display: flex; align-items: center; gap: 7px;
	font-size: 12.5px; font-weight: 500; color: var(--plip-text-2);
	text-transform: uppercase; letter-spacing: .04em;
}

.plip-kpi__value {
	margin: 10px 0 4px;
	font-size: 30px; font-weight: 700; letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
}

.plip-kpi__meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--plip-text-2); }

.plip-delta {
	display: inline-flex; align-items: center; gap: 3px;
	padding: 2px 8px;
	border-radius: var(--plip-pill);
	font-size: 12px; font-weight: 600;
}
.plip-delta--up   { background: rgba(52, 199, 89, .14);  color: #248a3d; }
.plip-delta--down { background: rgba(255, 59, 48, .14);  color: #c62d24; }
.plip-delta--flat { background: var(--plip-surface-3); color: var(--plip-text-2); }
html[data-plip-theme="dark"] .plip-delta--up   { color: #6ee787; }
html[data-plip-theme="dark"] .plip-delta--down { color: #ff7b72; }

/* Sparkline */
.plip-spark { display: block; width: 100%; height: 60px; margin-top: 12px; overflow: visible; }
.plip-spark path.line { fill: none; stroke: var(--plip-accent); stroke-width: 2; }
.plip-spark path.area { fill: url(#plipGrad); stroke: none; }

/* ==========================================================================
   LISTES
   ========================================================================== */

.plip-list { display: flex; flex-direction: column; }

.plip-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 4px;
	border-bottom: 1px solid var(--plip-border);
	text-decoration: none;
	color: inherit;
}
.plip-row:last-child { border-bottom: 0; }

.plip-thumb {
	width: 44px; height: 44px;
	border-radius: var(--plip-radius-md);
	object-fit: cover;
	background: var(--plip-surface-3);
	flex: none;
}

.plip-thumb--ph {
	display: grid; place-items: center;
	color: var(--plip-text-3);
}

.plip-row__main { min-width: 0; flex: 1; }
.plip-row__title { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.plip-row__sub { font-size: 12.5px; color: var(--plip-text-2); display: flex; gap: 8px; flex-wrap: wrap; }
.plip-row__end { margin-left: auto; text-align: right; flex: none; }
.plip-row__amount { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Puces d'état */
.plip-chip {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 3px 10px;
	border-radius: var(--plip-pill);
	background: var(--plip-surface-3);
	font-size: 12px; font-weight: 600; color: var(--plip-text-2);
	white-space: nowrap;
}
.plip-chip--plip-green  { background: rgba(52, 199, 89, .15);  color: #248a3d; }
.plip-chip--plip-orange { background: rgba(255, 159, 10, .17); color: #a86400; }
.plip-chip--plip-red    { background: rgba(255, 59, 48, .14);  color: #c62d24; }
.plip-chip--blue   { background: var(--plip-accent-soft);      color: var(--plip-accent); }
.plip-chip--plip-purple { background: rgba(175, 82, 222, .15); color: #8944ab; }
html[data-plip-theme="dark"] .plip-chip--plip-green  { color: #6ee787; }
html[data-plip-theme="dark"] .plip-chip--plip-orange { color: #ffbd4a; }
html[data-plip-theme="dark"] .plip-chip--plip-red    { color: #ff7b72; }
html[data-plip-theme="dark"] .plip-chip--plip-purple { color: #d9a3ff; }

/* Barre de complétion */
.plip-meter {
	position: relative;
	width: 46px; height: 5px;
	border-radius: var(--plip-pill);
	background: var(--plip-surface-3);
	overflow: hidden;
}
.plip-meter i { position: absolute; inset: 0 auto 0 0; border-radius: var(--plip-pill); transition: width .4s var(--plip-ease); }
.plip-meter i[data-level="low"]  { background: var(--plip-red); }
.plip-meter i[data-level="mid"]  { background: var(--plip-orange); }
.plip-meter i[data-level="high"] { background: var(--plip-green); }

/* ==========================================================================
   BOUTONS / CHAMPS
   ========================================================================== */

.plip-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	padding: 9px 18px;
	border: 0;
	border-radius: var(--plip-pill);
	background: var(--plip-surface-3);
	color: var(--plip-text);
	font: inherit; font-size: 13.5px; font-weight: 600;
	cursor: pointer;
	transition: transform .15s var(--plip-ease), opacity .15s var(--plip-ease), background .15s var(--plip-ease);
	white-space: nowrap;
}
.plip-btn:hover { transform: translateY(-1px); }
.plip-btn:active { transform: scale(.97); }
.plip-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.plip-btn--primary { background: var(--plip-accent); color: #fff; }
.plip-btn--primary:hover { background: #0077ed; }
.plip-btn--ghost { background: transparent; color: var(--plip-text-2); }
.plip-btn--ghost:hover { background: var(--plip-surface-3); color: var(--plip-text); }
.plip-btn--danger { background: rgba(255, 59, 48, .12); color: var(--plip-red); }
.plip-btn--sm { padding: 6px 13px; font-size: 12.5px; }

.plip-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.plip-field > label {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--plip-text-2);
	letter-spacing: -.005em;
}

.plip-field__help { font-size: 11.5px; color: var(--plip-text-3); line-height: 1.35; }

.plip-input,
.plip-select,
.plip-textarea {
	width: 100%;
	padding: 10px 13px;
	border: 1px solid var(--plip-border);
	border-radius: var(--plip-radius-md);
	background: var(--plip-surface-2);
	color: var(--plip-text);
	font: inherit;
	font-size: 14px;
	transition: border-color .18s var(--plip-ease), box-shadow .18s var(--plip-ease), background .18s var(--plip-ease);
	-webkit-appearance: none;
	appearance: none;
}

.plip-textarea { min-height: 110px; resize: vertical; line-height: 1.55; font-family: inherit; }

.plip-input:focus,
.plip-select:focus,
.plip-textarea:focus {
	outline: 0;
	background: var(--plip-surface);
	border-color: var(--plip-accent);
	box-shadow: 0 0 0 3.5px var(--plip-accent-soft);
}

.plip-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 15px;
	padding-right: 34px;
}

.plip-search {
	position: relative;
	flex: 1;
	min-width: 200px;
}
.plip-search svg {
	position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
	color: var(--plip-text-3); pointer-events: none;
}
.plip-search .plip-input { padding-left: 36px; border-radius: var(--plip-pill); }

/* Interrupteur */
.plip-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.plip-switch input { position: absolute; opacity: 0; pointer-events: none; }
.plip-switch i {
	position: relative;
	width: 44px; height: 26px;
	border-radius: var(--plip-pill);
	background: var(--plip-surface-3);
	transition: background .24s var(--plip-ease);
	flex: none;
}
.plip-switch i::after {
	content: "";
	position: absolute; top: 2px; left: 2px;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .24s var(--plip-ease);
}
.plip-switch input:checked + i { background: var(--plip-green); }
.plip-switch input:checked + i::after { transform: translateX(18px); }

/* Champ à étiquettes (marques / modèles) */
.plip-tags {
	display: flex; flex-wrap: wrap; gap: 6px;
	padding: 7px 9px;
	min-height: 42px;
	border: 1px solid var(--plip-border);
	border-radius: var(--plip-radius-md);
	background: var(--plip-surface-2);
	cursor: text;
	transition: border-color .18s var(--plip-ease), box-shadow .18s var(--plip-ease);
}
.plip-tags:focus-within { background: var(--plip-surface); border-color: var(--plip-accent); box-shadow: 0 0 0 3.5px var(--plip-accent-soft); }

.plip-tag {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 3px 6px 3px 10px;
	border-radius: var(--plip-pill);
	background: var(--plip-accent-soft);
	color: var(--plip-accent);
	font-size: 12.5px; font-weight: 600;
}
.plip-tag button {
	display: grid; place-items: center;
	width: 16px; height: 16px;
	border: 0; border-radius: 50%;
	background: rgba(0, 0, 0, .10);
	color: inherit; cursor: pointer; font-size: 13px; line-height: 1;
	padding: 0;
}
.plip-tag button:hover { background: rgba(0, 0, 0, .22); }

.plip-tags input {
	flex: 1; min-width: 90px;
	border: 0; background: transparent; color: var(--plip-text);
	font: inherit; font-size: 13.5px; padding: 4px 2px;
}
.plip-tags input:focus { outline: 0; }

/* ==========================================================================
   ONGLET PRODUITS — accordéon
   ========================================================================== */

.plip-toolbar {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin-bottom: 16px;
	padding: 12px 14px;
	background: var(--plip-surface);
	border-radius: var(--plip-radius-lg);
	box-shadow: var(--plip-shadow);
	position: sticky;
	top: 62px;
	z-index: 20;
}

.plip-prod {
	background: var(--plip-surface);
	border-radius: var(--plip-radius-lg);
	box-shadow: var(--plip-shadow);
	margin-bottom: 10px;
	overflow: hidden;
	transition: box-shadow .25s var(--plip-ease);
}
.plip-prod.is-open { box-shadow: var(--plip-shadow-lg); }
.plip-prod.is-dirty { box-shadow: 0 0 0 2px var(--plip-orange), var(--plip-shadow); }
.plip-prod.is-saved { box-shadow: 0 0 0 2px var(--plip-green), var(--plip-shadow); }

.plip-prod__head {
	display: flex; align-items: center; gap: 14px;
	width: 100%;
	padding: 12px 16px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.plip-prod__head:hover { background: var(--plip-hover); }

.plip-prod__caret { color: var(--plip-text-3); transition: transform .25s var(--plip-ease); margin-left: 4px; }
.plip-prod.is-open .plip-prod__caret { transform: rotate(90deg); }

.plip-prod__body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .32s var(--plip-ease);
}
.plip-prod.is-open .plip-prod__body { grid-template-rows: 1fr; }
.plip-prod__inner { overflow: hidden; }
.plip-prod__pad { padding: 4px 16px 18px; border-top: 1px solid var(--plip-border); }

.plip-fieldset { margin-top: 18px; }
.plip-fieldset__title {
	display: flex; align-items: center; gap: 8px;
	margin: 0 0 12px;
	font-size: 13px; font-weight: 700; color: var(--plip-text-2);
	text-transform: uppercase; letter-spacing: .05em;
}
.plip-fieldset__title::after {
	content: ""; flex: 1; height: 1px; background: var(--plip-border);
}

.plip-formgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.plip-col-3  { grid-column: span 3; }
.plip-col-4  { grid-column: span 4; }
.plip-col-6  { grid-column: span 6; }
.plip-col-8  { grid-column: span 8; }
.plip-col-12 { grid-column: span 12; }

.plip-prod__foot {
	display: flex; align-items: center; gap: 10px;
	margin-top: 20px; padding-top: 16px;
	border-top: 1px solid var(--plip-border);
	flex-wrap: wrap;
}
.plip-prod__foot .plip-spacer { margin-left: auto; }

.plip-hint {
	display: flex; gap: 8px; align-items: flex-start;
	padding: 10px 12px;
	border-radius: var(--plip-radius-md);
	background: var(--plip-accent-soft);
	color: var(--plip-accent);
	font-size: 12.5px;
	line-height: 1.45;
}

/* Tableau des paliers de prix */
.plip-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plip-tier {
	padding: 12px;
	border-radius: var(--plip-radius-md);
	background: var(--plip-surface-2);
	border: 1px solid var(--plip-border);
}
.plip-tier h5 { margin: 0 0 9px; font-size: 12px; font-weight: 700; color: var(--plip-text-2); text-transform: uppercase; letter-spacing: .04em; }
.plip-tier__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ==========================================================================
   COMMANDES
   ========================================================================== */

.plip-statusbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.plip-statusbar button {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 7px 14px;
	border: 1px solid var(--plip-border);
	border-radius: var(--plip-pill);
	background: var(--plip-surface);
	color: var(--plip-text-2);
	font: inherit; font-size: 13px; font-weight: 500;
	cursor: pointer;
	transition: all .18s var(--plip-ease);
}
.plip-statusbar button:hover { border-color: var(--plip-text-3); color: var(--plip-text); }
.plip-statusbar button.is-active { background: var(--plip-text); border-color: var(--plip-text); color: var(--plip-surface); font-weight: 600; }
.plip-statusbar button span { opacity: .65; font-variant-numeric: tabular-nums; }

.plip-order {
	background: var(--plip-surface);
	border-radius: var(--plip-radius-lg);
	box-shadow: var(--plip-shadow);
	margin-bottom: 8px;
	overflow: hidden;
}

.plip-order__head {
	display: flex; align-items: center; gap: 14px;
	padding: 13px 16px;
	cursor: pointer;
}
.plip-order__head:hover { background: var(--plip-hover); }

.plip-order__num {
	display: grid; place-items: center;
	width: 42px; height: 42px;
	border-radius: var(--plip-radius-md);
	background: var(--plip-surface-3);
	font-weight: 700; font-size: 13px;
	font-variant-numeric: tabular-nums;
	flex: none;
}

.plip-order__body { display: none; padding: 0 16px 16px; border-top: 1px solid var(--plip-border); }
.plip-order.is-open .plip-order__body { display: block; }

.plip-order__items { margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.plip-order__item { display: flex; gap: 10px; font-size: 13.5px; padding: 7px 10px; background: var(--plip-surface-2); border-radius: var(--plip-radius-sm); }
.plip-order__item b { flex: none; color: var(--plip-accent); font-variant-numeric: tabular-nums; }

.plip-order__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 12px; }
.plip-order__cell span { display: block; font-size: 11.5px; color: var(--plip-text-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.plip-order__cell b { font-weight: 600; font-size: 13.5px; }

.plip-order__actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--plip-border); flex-wrap: wrap; }

/* ==========================================================================
   BARRE DE SAUVEGARDE FLOTTANTE
   ========================================================================== */

.plip-savebar {
	position: fixed;
	left: 50%;
	bottom: 26px;
	transform: translateX(-50%) translateY(140%);
	z-index: 90;
	transition: transform .4s cubic-bezier(.2, .9, .3, 1.2);
	pointer-events: none;
}
.plip-savebar.is-visible { transform: translateX(-50%) translateY(0); pointer-events: auto; }

.plip-savebar__inner {
	display: flex; align-items: center; gap: 14px;
	padding: 10px 12px 10px 20px;
	border-radius: var(--plip-pill);
	background: rgba(28, 28, 30, .92);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
	color: #f5f5f7;
	font-size: 14px;
}
.plip-savebar__dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--plip-orange);
	box-shadow: 0 0 0 0 rgba(255, 159, 10, .6);
	animation: plip-pulse 2s infinite;
}
.plip-savebar .plip-btn--ghost { color: rgba(255, 255, 255, .65); }
.plip-savebar .plip-btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

@keyframes plip-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(255, 159, 10, .55); }
	70%  { box-shadow: 0 0 0 9px rgba(255, 159, 10, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 159, 10, 0); }
}

/* ==========================================================================
   NOTIFICATIONS
   ========================================================================== */

.plip-toasts {
	position: fixed;
	right: 20px; bottom: 20px;
	z-index: 100;
	display: flex; flex-direction: column; gap: 8px;
	pointer-events: none;
}

.plip-toast {
	display: flex; align-items: center; gap: 10px;
	padding: 12px 18px;
	border-radius: var(--plip-radius-md);
	background: rgba(28, 28, 30, .94);
	backdrop-filter: blur(20px);
	color: #f5f5f7;
	font-size: 13.5px; font-weight: 500;
	box-shadow: var(--plip-shadow-lg);
	animation: plip-toast-in .35s var(--plip-ease);
	max-width: 340px;
}
.plip-toast.is-out { animation: plip-toast-out .3s var(--plip-ease) forwards; }
.plip-toast--ok  { border-left: 3px solid var(--plip-green); }
.plip-toast--err { border-left: 3px solid var(--plip-red); }

@keyframes plip-toast-in  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes plip-toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ==========================================================================
   DIVERS
   ========================================================================== */

.plip-boot {
	position: absolute; inset: 0;
	display: grid; place-items: center;
	background: var(--plip-bg);
	z-index: 60;
}
.plip-boot[hidden] { display: none; }

.plip-spinner {
	width: 26px; height: 26px;
	border: 2.5px solid var(--plip-surface-3);
	border-top-color: var(--plip-accent);
	border-radius: 50%;
	animation: plip-spin .7s linear infinite;
}
@keyframes plip-spin { to { transform: rotate(360deg); } }

.plip-empty {
	padding: 48px 20px;
	text-align: center;
	color: var(--plip-text-2);
}
.plip-empty svg { width: 40px; height: 40px; margin-bottom: 12px; color: var(--plip-text-3); }
.plip-empty h3 { margin: 0 0 4px; font-size: 16px; color: var(--plip-text); }
.plip-empty p { margin: 0; font-size: 13.5px; }

.plip-skel {
	height: 62px;
	border-radius: var(--plip-radius-lg);
	background: linear-gradient(90deg, var(--plip-surface-2) 25%, var(--plip-surface-3) 50%, var(--plip-surface-2) 75%);
	background-size: 200% 100%;
	animation: plip-shimmer 1.4s infinite;
	margin-bottom: 10px;
}
@keyframes plip-shimmer { to { background-position: -200% 0; } }

.plip-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; font-size: 13.5px; color: var(--plip-text-2); }

.plip-modal-back {
	position: fixed; inset: 0; z-index: 120;
	display: grid; place-items: center;
	background: rgba(0, 0, 0, .4);
	backdrop-filter: blur(6px);
	animation: plip-fade .2s var(--plip-ease);
	padding: 20px;
}
.plip-modal {
	width: 100%; max-width: 480px;
	background: var(--plip-surface);
	border-radius: var(--plip-radius-xl);
	box-shadow: var(--plip-shadow-lg);
	padding: 26px;
	animation: plip-pop .3s cubic-bezier(.2, .9, .3, 1.2);
}
.plip-modal h3 { margin: 0 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.plip-modal p  { margin: 0 0 18px; font-size: 13.5px; color: var(--plip-text-2); }
.plip-modal__grid { display: grid; gap: 14px; }
.plip-modal__foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
@keyframes plip-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

.plip-mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
	.plip-grid--3 { grid-template-columns: 1fr; }
	.plip-tiers { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
	.plip { padding: 0 14px 160px; }

	.plip-topbar { flex-wrap: wrap; gap: 12px; }
	.plip-topbar__actions { margin-left: auto; }
	.plip-tabs { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
	.plip-tabs::-webkit-scrollbar { display: none; }
	.plip-tab span { display: none; }
	.plip-tab { padding: 9px 18px; }
	.plip-tab.is-active span { display: inline; }

	.plip-toolbar { top: 0; position: relative; }
	.plip-grid--2 { grid-template-columns: 1fr; }

	.plip-col-3, .plip-col-4, .plip-col-6, .plip-col-8 { grid-column: span 12; }

	.plip-kpi__value { font-size: 26px; }
	.plip-savebar { left: 14px; right: 14px; transform: translateY(140%); }
	.plip-savebar.is-visible { transform: translateY(0); }
	.plip-savebar__inner { justify-content: center; }
	.plip-toasts { left: 14px; right: 14px; }
	.plip-toast { max-width: none; }
	.plip-row__sub { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.plip *, .plip *::before, .plip *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}

/* ==========================================================================
   SURVOL ET RETOUR AU CLIC

   Les règles ci-dessus utilisaient --plip-surface-2, plus clair que la
   surface elle-même : le survol était donc invisible en thème clair.
   On repasse partout sur un voile semi-transparent, qui fonctionne
   identiquement sur fond blanc et sur fond noir.
   ========================================================================== */

.plip-prod__head:hover,
.plip-order__head:hover {
	background: var(--plip-hover);
}
.plip-prod__head:active,
.plip-order__head:active {
	background: var(--plip-hover-strong);
}

/* Lignes cliquables des listes de l'accueil */
.plip-row[data-open-product],
.plip-row[data-goto] {
	border-radius: var(--plip-radius-md);
	padding-left: 10px;
	padding-right: 10px;
	margin-left: -6px;
	margin-right: -6px;
	transition: background .16s var(--plip-ease);
}
.plip-row[data-open-product]:hover,
.plip-row[data-goto]:hover {
	background: var(--plip-hover);
}
.plip-row[data-open-product]:active,
.plip-row[data-goto]:active {
	background: var(--plip-hover-strong);
}

/* Onglets */
.plip-tab:hover:not(.is-active) {
	background: var(--plip-hover);
	color: var(--plip-text);
}

/* Boutons ronds : le survol doit assombrir, pas éclaircir */
.plip-icon-btn:hover {
	background: var(--plip-hover-strong);
	transform: scale(1.06);
}
.plip-icon-btn:active { background: var(--plip-press); transform: scale(.94); }

.plip-btn:hover:not(:disabled) { background: var(--plip-hover-strong); }
.plip-btn--primary:hover:not(:disabled) { background: #0077ed; }
html[data-plip-theme="dark"] .plip-btn--primary:hover:not(:disabled) { background: #3395ff; }
.plip-btn--ghost:hover:not(:disabled) { background: var(--plip-hover); color: var(--plip-text); }
.plip-btn--danger:hover:not(:disabled) { background: rgba(255, 59, 48, .2); }

.plip-statusbar button:hover:not(.is-active) {
	background: var(--plip-hover);
	border-color: transparent;
	color: var(--plip-text);
}

/* Focus clavier visible — l'accessibilité ne doit pas passer à la trappe */
.plip :focus-visible {
	outline: 2px solid var(--plip-accent);
	outline-offset: 2px;
	border-radius: var(--plip-radius-sm);
}

/* ==========================================================================
   RESPIRATION

   Le dashboard occupe désormais toute la page : on lui donne une gouttière
   franche plutôt que les marges résiduelles du thème.
   ========================================================================== */

.plip { padding: 8px 28px 140px; }

.plip-topbar {
	margin: 0 -28px 26px;
	padding: 12px 28px;
}

@media (max-width: 860px) {
	.plip { padding: 4px 16px 160px; }
	.plip-topbar { margin: 0 -16px 20px; padding: 10px 16px; }
}

/* Séparateur plus discret entre les lignes de liste */
.plip-row { border-bottom-color: var(--plip-border); }
.plip-card .plip-list .plip-row:last-child { border-bottom: 0; }

/* ==========================================================================
   FICHE PRODUIT — HIÉRARCHIE

   Une fiche complète compte une trentaine de champs. Les afficher tous
   d'un bloc décourage. On garde à l'écran ce qui se remplit à chaque
   produit, et on replie le reste.
   ========================================================================== */

.plip-fieldset--main { margin-top: 6px; }

.plip-fieldset--main .plip-field > label {
	font-size: 13px;
	color: var(--plip-text);
}

/* Les champs vraiment structurants sont plus grands */
.plip-input--lg {
	font-size: 16px;
	font-weight: 600;
	padding: 12px 14px;
}

.plip-fieldset__title {
	justify-content: flex-start;
}
.plip-fieldset__note {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
	font-size: 12px;
	color: var(--plip-text-3);
}

/* Bloc prix par quantité : mis en avant, c'est du B2B */
.plip-fieldset--tiers {
	margin-top: 22px;
	padding: 16px 18px;
	border-radius: var(--plip-radius-lg);
	background: var(--plip-surface-2);
	border: 1px solid var(--plip-border);
}
.plip-fieldset--tiers .plip-fieldset__title { margin-top: 0; }
.plip-fieldset--tiers .plip-tier { background: var(--plip-surface); }

.plip-tiers__foot {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 12px;
}
.plip-tiers__foot .plip-field__help { margin: 0; }
.plip-tiers__foot .plip-switch { margin-left: auto; }

.plip-switch--sm { font-size: 12.5px; color: var(--plip-text-2); }
.plip-switch--sm i { width: 36px; height: 21px; }
.plip-switch--sm i::after { width: 17px; height: 17px; }
.plip-switch--sm input:checked + i::after { transform: translateX(15px); }

/* ---- Dépliage « Autres configurations » -------------------------------- */

.plip-more {
	margin-top: 22px;
	border-top: 1px solid var(--plip-border);
}

.plip-more__toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 15px 4px;
	border: 0;
	background: transparent;
	color: var(--plip-text);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: left;
	border-radius: var(--plip-radius-md);
	transition: background .16s var(--plip-ease);
}
.plip-more__toggle:hover { background: var(--plip-hover); }
.plip-more__toggle svg {
	width: 16px; height: 16px;
	color: var(--plip-text-3);
	transition: transform .28s var(--plip-ease);
}
.plip-more.is-open .plip-more__toggle svg { transform: rotate(90deg); }

.plip-more__count {
	margin-left: auto;
	font-style: normal;
	font-size: 12px;
	font-weight: 500;
	color: var(--plip-text-2);
	background: var(--plip-surface-3);
	padding: 3px 10px;
	border-radius: var(--plip-pill);
	white-space: nowrap;
}

.plip-more__body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .34s var(--plip-ease);
}
.plip-more.is-open .plip-more__body { grid-template-rows: 1fr; }
.plip-more__inner { overflow: hidden; }
.plip-more__pad { padding-bottom: 6px; }

/* ---- Éditeur visuel WordPress ------------------------------------------ */

.plip-editor { position: relative; }

.plip-editor .wp-editor-container {
	border: 1px solid var(--plip-border);
	border-radius: var(--plip-radius-md);
	overflow: hidden;
	background: #fff;
}
.plip-editor .wp-editor-tabs { margin-bottom: 4px; }
.plip-editor .wp-switch-editor {
	border-radius: var(--plip-radius-sm) var(--plip-radius-sm) 0 0;
	font-size: 12.5px;
}
.plip-editor .mce-toolbar-grp,
.plip-editor .quicktags-toolbar {
	background: var(--plip-surface-2) !important;
	border-bottom: 1px solid var(--plip-border) !important;
}
.plip-editor textarea.wp-editor-area {
	border: 0 !important;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
	line-height: 1.6;
	padding: 12px;
}
/* Sans TinyMCE (JS coupé, ou éditeur indisponible) la textarea reste utilisable */
.plip-editor textarea.plip-textarea:not(.wp-editor-area) { min-height: 180px; }

html[data-plip-theme="dark"] .plip-editor .wp-switch-editor {
	background: var(--plip-surface-2);
	border-color: var(--plip-border);
	color: var(--plip-text-2);
}
html[data-plip-theme="dark"] .plip-editor .wp-switch-editor.switch-tmce[aria-pressed="true"],
html[data-plip-theme="dark"] .plip-editor .wp-switch-editor.switch-html[aria-pressed="true"] {
	background: var(--plip-surface);
	color: var(--plip-text);
}
html[data-plip-theme="dark"] .plip-editor textarea.wp-editor-area {
	background: var(--plip-surface-2);
	color: var(--plip-text);
}

/* ---- Catégories --------------------------------------------------------- */

.plip-cats {
	border: 1px solid var(--plip-border);
	border-radius: var(--plip-radius-md);
	background: var(--plip-surface-2);
	overflow: hidden;
}
.plip-cats:focus-within { border-color: var(--plip-accent); box-shadow: 0 0 0 3.5px var(--plip-accent-soft); }

.plip-cats__search {
	border: 0 !important;
	border-bottom: 1px solid var(--plip-border) !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	font-size: 13px;
}

.plip-cats__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 10px;
	max-height: 168px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.plip-cats__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px;
	border-radius: var(--plip-pill);
	background: var(--plip-surface);
	border: 1px solid var(--plip-border);
	font-size: 12.5px;
	color: var(--plip-text-2);
	cursor: pointer;
	transition: all .14s var(--plip-ease);
	user-select: none;
}
.plip-cats__item:hover { border-color: var(--plip-text-3); color: var(--plip-text); }
.plip-cats__item input { margin: 0; accent-color: var(--plip-accent); }
.plip-cats__item.is-on {
	background: var(--plip-accent-soft);
	border-color: transparent;
	color: var(--plip-accent);
	font-weight: 600;
}
.plip-cats__item[hidden] { display: none; }

/* ==========================================================================
   NEUTRALISATION DES STYLES DE FORMULAIRE DU THÈME

   Symptôme : le texte des listes déroulantes était coupé en bas.
   Cause : OceanWP applique une line-height ~1.8 et une hauteur fixe aux
   champs. Avec 14px de police, la ligne fait 25px alors que la hauteur
   utile n'en laisse que 18 — le bas des lettres passe hors du cadre.
   Supprimer le padding masquerait le symptôme en rendant les champs
   étriqués ; on reprend plutôt la main sur hauteur et interligne.
   ========================================================================== */

.plip .plip-input,
.plip .plip-select {
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	line-height: 1.45 !important;
	margin: 0 !important;
	font-family: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}

.plip .plip-textarea {
	height: auto !important;
	max-height: none !important;
	min-height: 110px !important;
	line-height: 1.55 !important;
	margin: 0 !important;
	font-family: inherit !important;
}

/* Les listes déroulantes ont besoin d'un peu plus d'air en haut/bas
   que les champs texte pour que la flèche reste centrée */
.plip .plip-select {
	padding: 9px 34px 9px 13px;
	background-position: right 12px center;
}

/* Les listes de la barre d'outils s'adaptent à leur contenu sans écraser
   le libellé, et ne descendent jamais sous une largeur lisible */
.plip-toolbar .plip-select {
	min-width: 155px;
	flex: 0 1 auto;
}
.plip-toolbar .plip-search { flex: 1 1 240px; }
.plip-toolbar > * { margin: 0; }

/* Cas particuliers : ces champs ont leur propre hauteur */
.plip .plip-cats__search {
	min-height: 0 !important;
	padding: 9px 13px !important;
}
.plip .plip-tags input,
.plip .plip-tier input {
	line-height: 1.45 !important;
	min-height: 0 !important;
	height: auto !important;
}

/* Cases à cocher et interrupteurs : le thème leur ajoute parfois
   une taille ou une marge qui casse l'alignement */
.plip input[type="checkbox"] {
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	vertical-align: middle;
}

/* Les libellés du thème sont souvent en majuscules et en gras */
.plip label {
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.4;
	margin: 0;
	display: block;
}
.plip .plip-switch,
.plip .plip-cats__item { display: inline-flex; }

/* Les boutons du dashboard gardent leur propre géométrie */
.plip .plip-btn,
.plip .plip-icon-btn,
.plip .plip-tab {
	line-height: 1.2 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-family: inherit !important;
}

/* ==========================================================================
   THÈME SOMBRE — CONFORT DE LECTURE

   Les zones de saisie restaient blanches sur un dashboard noir. En pratique
   c'est une lampe torche dans les yeux : on les passe en gris foncé avec du
   texte clair, et on remonte les gris trop faibles.
   ========================================================================== */

html[data-plip-theme="dark"] .plip-input,
html[data-plip-theme="dark"] .plip-select,
html[data-plip-theme="dark"] .plip-textarea,
html[data-plip-theme="dark"] .plip-tags,
html[data-plip-theme="dark"] .plip-cats {
	background: var(--plip-surface-2);
	border-color: rgba(255, 255, 255, .14);
	color: var(--plip-text);
}

html[data-plip-theme="dark"] .plip-input:focus,
html[data-plip-theme="dark"] .plip-select:focus,
html[data-plip-theme="dark"] .plip-textarea:focus {
	background: #3a3a3c;
	border-color: var(--plip-accent);
}

html[data-plip-theme="dark"] .plip-input::placeholder,
html[data-plip-theme="dark"] .plip-textarea::placeholder {
	color: #7c7c82;
}

/* Flèche des listes déroulantes : la version sombre doit être claire */
html[data-plip-theme="dark"] .plip-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aeaeb2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* L'éditeur WordPress : conteneur, barre d'outils et onglets */
html[data-plip-theme="dark"] .plip-editor .wp-editor-container {
	background: var(--plip-surface-2);
	border-color: rgba(255, 255, 255, .14);
}
html[data-plip-theme="dark"] .plip-editor .mce-panel,
html[data-plip-theme="dark"] .plip-editor .mce-toolbar-grp,
html[data-plip-theme="dark"] .plip-editor .quicktags-toolbar {
	background: #3a3a3c !important;
	border-color: rgba(255, 255, 255, .12) !important;
}
html[data-plip-theme="dark"] .plip-editor .mce-btn button,
html[data-plip-theme="dark"] .plip-editor .mce-ico {
	color: var(--plip-text) !important;
}
html[data-plip-theme="dark"] .plip-editor .mce-btn {
	background: transparent !important;
	border-color: transparent !important;
}
html[data-plip-theme="dark"] .plip-editor .mce-btn:hover {
	background: rgba(255, 255, 255, .1) !important;
}
html[data-plip-theme="dark"] .plip-editor .quicktags-toolbar input[type="button"] {
	background: var(--plip-surface) !important;
	border-color: rgba(255, 255, 255, .14) !important;
	color: var(--plip-text) !important;
}
/* La zone de frappe elle-même est stylée depuis le JS (content_style),
   parce qu'elle vit dans une iframe hors de portée de cette feuille. */

/* Le texte secondaire des cartes ne doit pas disparaître */
html[data-plip-theme="dark"] .plip-field__help { color: #8e8e93; }
html[data-plip-theme="dark"] .plip-row__sub { color: #aeaeb2; }
html[data-plip-theme="dark"] .plip-tier { background: #3a3a3c; }
html[data-plip-theme="dark"] .plip-fieldset--tiers { background: rgba(255, 255, 255, .04); }
html[data-plip-theme="dark"] .plip-cats__item { background: var(--plip-surface); }
html[data-plip-theme="dark"] .plip-hint { color: #7ab8ff; }

/* ==========================================================================
   STOCK MODIFIABLE DANS LE LISTING
   ========================================================================== */

.plip-prod__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-right: 14px;
}
.plip-prod__head:hover { background: transparent; }

.plip-prod__open {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 1;
	min-width: 0;
	padding: 12px 4px 12px 16px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	border-radius: var(--plip-radius-md);
	transition: background .16s var(--plip-ease);
}
.plip-prod__open:hover { background: var(--plip-hover); }

.plip-quickstock {
	display: flex !important;
	align-items: center;
	gap: 8px;
	flex: none;
	padding: 4px 6px 4px 12px;
	border-radius: var(--plip-pill);
	background: var(--plip-surface-2);
	border: 1px solid var(--plip-border);
}
.plip-quickstock > span {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--plip-text-2);
}
.plip-quickstock .plip-input {
	width: 72px;
	padding: 5px 8px !important;
	text-align: center;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	border-radius: var(--plip-pill) !important;
	background: var(--plip-surface) !important;
}

/* ==========================================================================
   MENU MOBILE / TABLETTE
   ========================================================================== */

.plip-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px; height: 40px;
	padding: 0 9px;
	border: 0;
	border-radius: var(--plip-radius-md);
	background: transparent;
	cursor: pointer;
	flex: none;
}
.plip-burger span {
	display: block;
	height: 2px;
	border-radius: 2px;
	background: var(--plip-text);
	transition: transform .28s var(--plip-ease), opacity .2s var(--plip-ease);
}
.plip-burger:hover { background: var(--plip-hover); }

.plip--menu .plip-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.plip--menu .plip-burger span:nth-child(2) { opacity: 0; }
.plip--menu .plip-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.plip-navback {
	position: fixed;
	inset: 0;
	z-index: 55;
	background: rgba(0, 0, 0, .45);
	backdrop-filter: blur(3px);
	animation: plip-fade .2s var(--plip-ease);
}
.plip-navback[hidden] { display: none; }

.plip-tabs__foot { display: none; }

@media (max-width: 900px) {

	.plip-burger { display: flex; }

	.plip-topbar { gap: 12px; flex-wrap: nowrap; }

	/* La barre du haut crée un contexte d'empilement (z-index: 40). Le menu
	   vit dedans : sans cette montée, il resterait sous le voile (z-index: 55)
	   quel que soit son propre z-index. */
	.plip--menu .plip-topbar { z-index: 70; }
	.plip--menu .plip-topbar::before { display: none; }
	.plip-topbar__brand { flex: 1; min-width: 0; }
	.plip-topbar__title,
	.plip-topbar__sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

	/* Le menu prend tout l'écran : sur mobile, les icônes seules ne
	   disaient rien de l'onglet où l'on se trouvait. */
	.plip-tabs {
		position: fixed;
		inset: 0 0 0 auto;
		z-index: 60;
		width: min(340px, 86vw);
		flex-direction: column;
		justify-content: flex-start;
		gap: 6px;
		padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
		border-radius: 0;
		background: var(--plip-surface);
		box-shadow: var(--plip-shadow-lg);
		transform: translateX(100%);
		transition: transform .34s cubic-bezier(.2, .9, .3, 1);
		overflow-y: auto;
		order: 0;
		width: min(340px, 86vw);
	}
	.plip--menu .plip-tabs { transform: none; }

	.plip-tab {
		width: 100%;
		justify-content: flex-start;
		gap: 14px;
		padding: 15px 18px;
		font-size: 16px;
		border-radius: var(--plip-radius-lg);
	}
	.plip-tab span { display: inline !important; }
	.plip-tab svg { width: 20px; height: 20px; }
	.plip-tab .plip-badge { margin-left: auto; }
	.plip-tab.is-active { background: var(--plip-accent-soft); color: var(--plip-accent); }

	.plip-tabs__foot {
		display: flex;
		flex-direction: column;
		gap: 6px;
		margin-top: auto;
		padding-top: 18px;
		border-top: 1px solid var(--plip-border);
	}
	.plip-tab--link { color: var(--plip-text-2); text-decoration: none; font-size: 15px; }
	.plip-tab--link:hover { background: var(--plip-hover); color: var(--plip-text); }

	/* Ces deux-là sont déjà dans le menu plein écran */
	.plip-icon-btn--out { display: none; }

	.plip-prod__head { flex-wrap: wrap; padding-right: 10px; }
	.plip-quickstock { margin: 0 0 10px 16px; }
}

@media (min-width: 901px) {
	.plip-navback { display: none !important; }
}

/* ==========================================================================
   ÉCRAN DE CONNEXION
   ========================================================================== */

.plip-gate {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 78vh;
	padding: 40px 20px 80px;
}

.plip-gate__card {
	width: 100%;
	max-width: 420px;
	padding: 34px 32px 28px;
	background: var(--plip-surface);
	border-radius: var(--plip-radius-xl);
	box-shadow: var(--plip-shadow);
	text-align: center;
}

.plip-gate__mark {
	margin: 0 auto 18px;
	width: 46px; height: 46px;
	font-size: 22px;
	border-radius: 13px;
}

.plip-gate__title {
	margin: 0 0 6px;
	font-size: 23px;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--plip-text);
}
.plip-gate__sub {
	margin: 0 0 26px;
	font-size: 14px;
	color: var(--plip-text-2);
	line-height: 1.5;
}

.plip-gate__form { display: grid; gap: 15px; text-align: left; }
.plip-gate__form .plip-input { padding: 12px 14px; font-size: 15px; }
.plip-gate__remember { margin-top: 2px; }
.plip-gate__submit { width: 100%; padding: 13px; font-size: 15px; margin-top: 6px; }

.plip-gate__links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--plip-border);
	font-size: 13px;
}
.plip-gate__links a { color: var(--plip-text-2); text-decoration: none; }
.plip-gate__links a:hover { color: var(--plip-accent); text-decoration: underline; }
.plip-gate__links span { color: var(--plip-text-3); }

/* Refus d'une valeur hors liste (marques) */
.plip-tags input.is-rejected {
	animation: plip-shake .4s var(--plip-ease);
	color: var(--plip-red);
}
@keyframes plip-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}
.plip-tags--strict::after {
	content: "";
}

/* ==========================================================================
   SOUS-ONGLETS DES RÉGLAGES
   ========================================================================== */

.plip-subtabs {
	display: flex;
	gap: 2px;
	padding: 3px;
	margin-bottom: 18px;
	border-radius: var(--plip-pill);
	background: var(--plip-surface-3);
	width: fit-content;
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
}
.plip-subtabs::-webkit-scrollbar { display: none; }

.plip-subtabs button {
	padding: 8px 18px;
	border: 0;
	border-radius: var(--plip-pill);
	background: transparent;
	color: var(--plip-text-2);
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.2 !important;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s var(--plip-ease), color .2s var(--plip-ease);
}
.plip-subtabs button:hover:not(.is-active) { background: var(--plip-hover); color: var(--plip-text); }
.plip-subtabs button.is-active {
	background: var(--plip-surface);
	color: var(--plip-text);
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

/* ==========================================================================
   LISTES MARQUES / MODÈLES
   ========================================================================== */

.plip-terms__add {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}
.plip-terms__add .plip-input { flex: 1; }
.plip-terms__add .plip-btn { flex: none; }

.plip-terms {
	margin-top: 14px;
	max-height: 460px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: var(--plip-radius-md);
}

.plip-term {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 4px;
	border-bottom: 1px solid var(--plip-border);
}
.plip-term:last-child { border-bottom: 0; }
.plip-term[hidden] { display: none; }
.plip-term:hover { background: var(--plip-hover); }

.plip-term__name {
	flex: 1;
	min-width: 0;
	border-color: transparent !important;
	background: transparent !important;
	font-weight: 500;
	padding: 7px 10px !important;
}
.plip-term__name:hover { background: var(--plip-surface-2) !important; }
.plip-term__name:focus {
	background: var(--plip-surface-2) !important;
	border-color: var(--plip-accent) !important;
}

.plip-term .plip-chip { flex: none; }
.plip-chip--muted { opacity: .55; }

.plip-icon-btn--sm {
	width: 30px; height: 30px;
	flex: none;
	background: transparent;
	color: var(--plip-text-3);
}
.plip-icon-btn--sm svg { width: 15px; height: 15px; }
.plip-icon-btn--sm:hover {
	background: rgba(255, 59, 48, .12);
	color: var(--plip-red);
	transform: none;
}

@media (max-width: 700px) {
	.plip-terms__add { flex-direction: column; }
	.plip-term { flex-wrap: wrap; }
	.plip-term__name { flex: 1 1 100%; }
}

/* ==========================================================================
   IMPORT / EXPORT CSV
   ========================================================================== */

.plip-drop {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 34px 20px;
	border: 2px dashed var(--plip-border);
	border-radius: var(--plip-radius-lg);
	background: var(--plip-surface-2);
	color: var(--plip-text-2);
	font-size: 13.5px;
	cursor: pointer;
	text-align: center;
	transition: border-color .18s var(--plip-ease), background .18s var(--plip-ease);
}
.plip-drop:hover,
.plip-drop.is-over {
	border-color: var(--plip-accent);
	background: var(--plip-accent-soft);
	color: var(--plip-accent);
}
.plip-drop svg { width: 26px; height: 26px; }
.plip-drop b { color: var(--plip-text); }
.plip-drop:hover b, .plip-drop.is-over b { color: var(--plip-accent); }

.plip-import { margin-top: 18px; }

.plip-import__head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--plip-border);
}
.plip-import__head span { font-size: 12.5px; color: var(--plip-text-2); }

.plip-import__warn {
	margin-top: 12px;
	padding: 11px 13px;
	border-radius: var(--plip-radius-md);
	background: rgba(255, 159, 10, .14);
	color: #8a5200;
	font-size: 12.5px;
	line-height: 1.5;
}
html[data-plip-theme="dark"] .plip-import__warn { color: #ffc766; }

.plip-import__cols {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-height: 190px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px 2px;
}

.plip-import__foot {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--plip-border);
	font-size: 13px;
	color: var(--plip-text-2);
}

.plip-import__progress {
	position: relative;
	flex: 1;
	min-width: 120px;
	height: 6px;
	border-radius: var(--plip-pill);
	background: var(--plip-surface-3);
	overflow: hidden;
}
.plip-import__progress[hidden] { display: none; }
.plip-import__progress i {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: var(--plip-accent);
	border-radius: var(--plip-pill);
	transition: width .3s var(--plip-ease);
}

.plip-card code {
	padding: 1px 6px;
	border-radius: 5px;
	background: var(--plip-surface-3);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
}

/* ==========================================================================
   BOUTONS-LIENS

   .plip-link est un <button> déguisé en lien : il ne déclare aucun fond,
   c'est justement le problème. OceanWP applique un background sur
   button:hover, qui passait donc au travers et dessinait un rectangle noir
   derrière « Voir les commandes » ou « Proposer un titre ».
   Les autres boutons du dashboard imposent leur propre fond au survol et
   n'étaient pas concernés.
   ========================================================================== */

.plip .plip-link,
.plip .plip-link:link,
.plip .plip-link:visited,
.plip .plip-link:hover,
.plip .plip-link:focus,
.plip .plip-link:active {
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	padding: 0 !important;
	width: auto !important;
	min-height: 0 !important;
	height: auto !important;
	box-shadow: none !important;
	text-shadow: none !important;
	color: var(--plip-accent) !important;
	font: inherit !important;
	font-size: 13.5px !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	border-radius: 0 !important;
	transform: none !important;
}

.plip .plip-link:hover,
.plip .plip-link:focus-visible {
	text-decoration: underline !important;
	opacity: .78;
}

/* Le contour de focus clavier reste visible, lui */
.plip .plip-link:focus-visible {
	outline: 2px solid var(--plip-accent) !important;
	outline-offset: 3px;
}

/* Filet de sécurité : aucun bouton du dashboard n'hérite d'une ombre
   ou d'un halo posé par le thème */
.plip button,
.plip button:hover,
.plip button:focus,
.plip button:active {
	text-shadow: none !important;
}

/* ==========================================================================
   GÉOMÉTRIE DES BOUTONS FACE AU THÈME

   OceanWP cible ses boutons avec des sélecteurs du type
   « .entry-content button » ou « #content button » — de spécificité (0,1,1),
   donc supérieure à mes classes seules (0,1,0). Le fond noir au survol n'était
   que le symptôme visible : padding, arrondi et bordure étaient exposés au
   même risque. On repasse devant en préfixant par .plip.
   ========================================================================== */

.plip .plip-btn {
	padding: 9px 18px;
	border: 0;
	border-radius: var(--plip-pill);
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	width: auto;
	min-width: 0;
}
.plip .plip-btn--sm { padding: 6px 13px; }
.plip .plip-btn--primary { background: var(--plip-accent); color: #fff; }
.plip .plip-btn--ghost { background: transparent; color: var(--plip-text-2); }
.plip .plip-btn--danger { background: rgba(255, 59, 48, .12); color: var(--plip-red); }
.plip .plip-btn:not(.plip-btn--primary):not(.plip-btn--ghost):not(.plip-btn--danger) {
	background: var(--plip-surface-3);
	color: var(--plip-text);
}
.plip .plip-btn:hover:not(:disabled) { background: var(--plip-hover-strong); }
.plip .plip-btn--primary:hover:not(:disabled) { background: #0077ed; }
.plip .plip-btn--ghost:hover:not(:disabled) { background: var(--plip-hover); color: var(--plip-text); }

.plip .plip-icon-btn {
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--plip-surface-3);
	color: var(--plip-text);
	box-shadow: none;
}
.plip .plip-icon-btn:hover { background: var(--plip-hover-strong); }
.plip .plip-icon-btn--sm { width: 30px; height: 30px; background: transparent; color: var(--plip-text-3); }
.plip .plip-icon-btn--sm:hover { background: rgba(255, 59, 48, .12); color: var(--plip-red); }

.plip .plip-tab {
	padding: 7px 15px;
	border: 0;
	border-radius: var(--plip-pill);
	background: transparent;
	color: var(--plip-text-2);
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	width: auto;
}
.plip .plip-tab.is-active {
	background: var(--plip-surface);
	color: var(--plip-text);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.plip .plip-tab:hover:not(.is-active) { background: var(--plip-hover); color: var(--plip-text); }

.plip .plip-subtabs button {
	padding: 8px 18px;
	border: 0;
	border-radius: var(--plip-pill);
	background: transparent;
	color: var(--plip-text-2);
	text-transform: none;
	box-shadow: none;
}
.plip .plip-subtabs button.is-active {
	background: var(--plip-surface);
	color: var(--plip-text);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.plip .plip-statusbar button {
	padding: 7px 14px;
	border: 1px solid var(--plip-border);
	border-radius: var(--plip-pill);
	background: var(--plip-surface);
	color: var(--plip-text-2);
	text-transform: none;
	box-shadow: none;
}
.plip .plip-statusbar button.is-active {
	background: var(--plip-text);
	border-color: var(--plip-text);
	color: var(--plip-surface);
}

.plip .plip-prod__open,
.plip .plip-more__toggle,
.plip .plip-burger {
	border: 0;
	background: transparent;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	border-radius: var(--plip-radius-md);
}
.plip .plip-prod__open { padding: 12px 4px 12px 16px; }
.plip .plip-more__toggle { padding: 15px 4px; }
.plip .plip-burger { padding: 0 9px; width: 40px; height: 40px; }
.plip .plip-prod__open:hover,
.plip .plip-more__toggle:hover,
.plip .plip-burger:hover { background: var(--plip-hover); }
