/* ============================================================
   "Mes designs sauvegardés" — Figma spec
   Scoped to #mycompositions so it only affects this section.
   ============================================================ */

#mycompositions {
	--cvsc-fg: #1E1E1E;
	--cvsc-fg-strong: #0A0A0A;
	--cvsc-fg-muted: #4A5565;
	--cvsc-cta-bg: #070312;
	--cvsc-cta-bg-hover: #1a1325;
	--cvsc-danger: #A50D0D;
	--cvsc-divider: #D3D2D0;
	--cvsc-container-bg: #F7F7F8;
	--cvsc-card-bg: #FFFFFF;
	--cvsc-shadow: 0 4px 6px -2px rgba(36, 36, 36, 0.03), 0 12px 16px -4px rgba(36, 36, 36, 0.08);
	--cvsc-cta-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
	font-family: 'Bricolage Grotesque', system-ui, sans-serif;
	color: var(--cvsc-fg);
	text-align: left;
}

#mycompositions.cvsc-section {
	padding: 16px 24px;
	background: var(--cvsc-container-bg);
	border-radius: 4px;
	box-shadow: var(--cvsc-shadow);
}

/* ---- Section header ---- */
#mycompositions .cvsc-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 8px 0 12px;
}
#mycompositions .cvsc-section-title {
	margin: 0;
	color: var(--cvsc-fg);
	font-size: 25px;
	font-weight: 600;
	line-height: 25px;
	letter-spacing: -0.01em;
}
#mycompositions .cvsc-cta-new {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	background: var(--cvsc-cta-bg);
	color: #FFFFFF;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	border-radius: 4px;
	box-shadow: var(--cvsc-cta-shadow);
	text-decoration: none;
	transition: background-color 0.15s ease;
}
#mycompositions .cvsc-cta-new:hover {
	background: var(--cvsc-cta-bg-hover);
	color: #FFFFFF;
	text-decoration: none;
}
#mycompositions .cvsc-divider {
	height: 1px;
	background: var(--cvsc-divider);
	margin: 0 0 24px;
}

/* ---- Cards grid ---- */
#mycompositions .cvsc-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}
#mycompositions .cvsc-box {
	width: 232px;
	display: flex;
	margin: 0;
}
#mycompositions .cvsc-content {
	width: 100%;
	background: var(--cvsc-card-bg);
	border-radius: 4px;
	box-shadow: var(--cvsc-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* ---- Card image ---- */
#mycompositions .cvsc-content .show-link {
	display: block;
	color: inherit;
	text-decoration: none;
}
#mycompositions .cvsc-content .show-link:hover {
	text-decoration: none;
}
#mycompositions .cvsc-img-wrap {
	padding: 2px;
	overflow: hidden;
	border-radius: 10px;
	background: #FFFFFF;
}
#mycompositions .designer-img {
	display: block !important;
	width: 100%;
	height: auto;
	border-radius: 4px;
	transition: transform 0.25s ease;
}
#mycompositions .cvsc-content:hover .designer-img {
	transform: scale(1.02);
}

/* ---- Card body ---- */
#mycompositions .cvsc-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0 12px 12px;
}
#mycompositions .cvsc-info {
	display: flex;
	flex-direction: column;
}
#mycompositions .cvsc-title {
	display: block;
	color: var(--cvsc-fg-strong);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	word-break: break-word;
	overflow-wrap: anywhere;
}
/* Product name suffix appended after the design name with " - ".
   Truncates on its own line if the product name is longer than the
   card; the design name above keeps wrapping freely. */
#mycompositions .cvsc-title-product {
	display: inline-block;
	max-width: 100%;
	color: var(--cvsc-fg-muted);
	font-weight: 400;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: bottom;
}
#mycompositions .cvsc-subtitle {
	display: block;
	color: var(--cvsc-fg-muted);
	font-size: 12px;
	font-weight: 400;
	line-height: 18px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---- Card actions ---- */
#mycompositions .cvsc-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}
#mycompositions .cvsc-edit-btn {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 6px 8px;
	background: var(--cvsc-cta-bg);
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 400;
	line-height: 18px;
	border: 0;
	border-radius: 4px;
	box-shadow: var(--cvsc-cta-shadow);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
#mycompositions .cvsc-edit-btn:hover {
	background: var(--cvsc-cta-bg-hover);
	color: #FFFFFF;
	text-decoration: none;
}
#mycompositions .cvsc-edit-btn svg {
	flex-shrink: 0;
}
#mycompositions .cvsc-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	color: var(--cvsc-fg-muted);
	transition: background-color 0.15s ease, opacity 0.15s ease;
}
#mycompositions .cvsc-icon-btn:hover {
	background: rgba(0, 0, 0, 0.04);
}
#mycompositions .cvsc-icon-btn:focus-visible {
	outline: 2px solid var(--cvsc-cta-bg);
	outline-offset: 1px;
}
#mycompositions .cvsc-delete-btn {
	color: var(--cvsc-danger);
}
#mycompositions .cvsc-delete-btn:hover {
	background: rgba(165, 13, 13, 0.08);
}

/* ---- Empty state ---- */
#mycompositions .cvsc-empty {
	flex: 1 1 100%;
	padding: 32px 16px;
	background: #FFFFFF;
	border-radius: 4px;
	color: var(--cvsc-fg-muted);
	font-size: 14px;
	text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
	#mycompositions.cvsc-section {
		padding: 12px 16px;
	}
	#mycompositions .cvsc-section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	#mycompositions .cvsc-grid {
		gap: 16px;
		justify-content: center;
	}
}

/* ============================================================
   Account-sidebar tile icon — kept from previous design (the
   warehouse theme dashboard tile for "Mes créations"). Outside
   the #mycompositions scope on purpose.
   ============================================================ */
.my-account-page-content-wrapper a#mycompositions-link .link-item .fa,
.my-account-page-content-wrapper a#mycompositions-link .link-item .material-icons {
	display: none !important;
}
.my-account-page-content-wrapper a#mycompositions-link .link-item::before {
	content: url('/img/cms/icones/icone dashboard/picto-informations.svg') !important;
}

/* Mes créations page: hide the warehouse customer-page footer
   block (my-account-links) — only when actually on that page. */
.page-module-configurateurvisuel-mycompositions .page-footer {
	display: none;
}


/* ============================================================
   Modals — Rename + Delete (Figma "Nom de votre design" / "Supprimer ce design ?")
   Plain JS show/hide via [hidden] attribute, no framework dep.
   ============================================================ */
.cvsc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.49);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: 'Bricolage Grotesque', system-ui, sans-serif;
}
.cvsc-modal-overlay[hidden] {
	display: none !important;
}
.cvsc-modal-overlay .cvsc-modal {
	width: 100%;
	max-width: 600px;
	padding-bottom: 24px;
	background: #FFFFFF;
	border-radius: 4px;
	box-shadow: 0 24px 32px rgba(93, 107, 130, 0.12);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.cvsc-modal-overlay .cvsc-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 24px;
}
.cvsc-modal-overlay .cvsc-modal-title {
	margin: 0;
	color: #0C0C3D;
	font-size: 20px;
	font-weight: 600;
	line-height: 28px;
}
.cvsc-modal-overlay .cvsc-modal-close {
	flex-shrink: 0;
	background: none;
	border: 0;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: #101828;
	padding: 0 4px;
}
.cvsc-modal-overlay .cvsc-modal-close:hover {
	opacity: 0.7;
}
.cvsc-modal-overlay .cvsc-modal-body {
	width: 552px;
	max-width: calc(100% - 48px);
	align-self: center;
	display: flex;
	flex-direction: column;
	gap: 32px;
}
.cvsc-modal-overlay .cvsc-modal-input,
.cvsc-modal-overlay .cvsc-modal-readonly {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	background: #FFFFFF;
	border: 1px solid #E2E1E6;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	color: #B0B0B0;
}
.cvsc-modal-overlay .cvsc-modal-input {
	color: #2E2E2E;
}
.cvsc-modal-overlay .cvsc-modal-input::placeholder {
	color: #B0B0B0;
}
.cvsc-modal-overlay .cvsc-modal-input:focus {
	outline: none;
	border-color: #C1C6D6;
	box-shadow: 0 0 0 3px rgba(7, 3, 18, 0.08);
}
.cvsc-modal-overlay .cvsc-modal-warning {
	margin: 0;
	color: #3C3C3C;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}
.cvsc-modal-overlay .cvsc-modal-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 16px;
}
.cvsc-modal-overlay .cvsc-modal-actions-single {
	justify-content: center;
}
.cvsc-modal-overlay .cvsc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 26px;
	border: 0;
	border-radius: 4px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cvsc-modal-overlay .cvsc-btn-primary {
	background: #070312;
	color: #FFFFFF;
}
.cvsc-modal-overlay .cvsc-btn-primary:hover {
	background: #1a1325;
}
.cvsc-modal-overlay .cvsc-btn-outline {
	background: #FFFFFF;
	color: #070312;
	border: 1px solid rgba(18, 18, 18, 0.24);
}
.cvsc-modal-overlay .cvsc-btn-outline:hover {
	background: #F5F5F5;
}
.cvsc-modal-overlay .cvsc-btn-danger {
	background: #A50D0D;
	color: #FFFFFF;
}
.cvsc-modal-overlay .cvsc-btn-danger:hover {
	background: #870A0A;
}

/* Override theme h3 font on Mes créations page */
.aw_h3_home h3,
h3 {
	font-family: 'Bricolage Grotesque', system-ui, sans-serif !important;
}
