/*
 * NDMedics Quote — frontend styles
 * Uses v2 design tokens (custom properties defined in ndmedics-v2/style.css).
 * Tokens: --color-primary #1B3A5C · --color-secondary #00897B · --color-warning #F39C12
 *         --color-border · --color-bg · --font-sans · --font-mono · --radius-* · --space-*
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   ADD-TO-QUOTE BUTTON (loop + single product page)
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-add-to-quote {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	padding: .6rem 1.25rem;
	font-family: var(--font-sans, 'Inter', sans-serif);
	font-size: .8125rem;
	font-weight: 600;
	line-height: 1;
	border: 2px solid var(--color-primary, #1B3A5C);
	border-radius: var(--radius-md, 8px);
	background: transparent;
	color: var(--color-primary, #1B3A5C);
	cursor: pointer;
	transition: all 200ms ease;
	text-decoration: none;
	white-space: nowrap;
	width: 100%;
}
.ndm-add-to-quote:hover:not(:disabled) {
	background: var(--color-primary, #1B3A5C);
	color: #fff;
}
.ndm-add-to-quote:disabled,
.ndm-add-to-quote.is-in-quote {
	background: var(--color-primary-light, #E8F4FD);
	border-color: var(--color-primary, #1B3A5C);
	color: var(--color-primary, #1B3A5C);
	cursor: default;
}
.ndm-add-to-quote svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* Variant: fiche produit — même apparence que le bouton loop, juste taille augmentée */
.ndm-add-to-quote--single {
	padding: .9rem 1.75rem;
	font-size: .875rem;
	margin-top: .75rem;
}

/* Lien "→ Voir mon devis" qui apparaît après ajout */
.ndm-quote-hint {
	display: block;
	margin-top: .4rem;
	font-size: .75rem;
	font-weight: 600;
	color: var(--color-secondary, #00897B);
	text-decoration: none;
	transition: color 150ms ease;
}
.ndm-quote-hint:hover { color: var(--color-secondary-dark, #00695C); }

.ndm-quote-inline-error {
	display: block;
	margin-top: .35rem;
	font-size: .75rem;
	color: var(--color-error, #E74C3C);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HEADER QUOTE BADGE
   ═══════════════════════════════════════════════════════════════════════════════ */
.header-quote-count {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	background: var(--color-warning, #F39C12);
	color: var(--color-primary, #1B3A5C);
	font-size: 10px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ALERTS (form errors)
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf-alert {
	display: flex;
	align-items: flex-start;
	gap: .625rem;
	padding: .875rem 1.25rem;
	border-radius: var(--radius-md, 8px);
	margin-bottom: 1.5rem;
	font-size: .875rem;
	font-weight: 500;
}
.ndm-qf-alert svg { flex-shrink: 0; margin-top: 1px; }
.ndm-qf-alert--error {
	background: var(--color-error-bg, #FDEDEC);
	border: 1px solid #FECACA;
	color: #B91C1C;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SUCCESS / EMPTY STATES
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf-state {
	text-align: center;
	padding: 0;
	max-width: 560px;
	margin: 0 auto;
}
.ndm-qf-state__icon {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.75rem;
}
.ndm-qf-state--success .ndm-qf-state__icon {
	background: var(--color-success-bg, #EAFAF1);
	color: var(--color-success, #27AE60);
}
.ndm-qf-state--empty .ndm-qf-state__icon {
	background: var(--color-primary-light, #E8F4FD);
	color: var(--color-primary, #1B3A5C);
}
.ndm-qf-state h2 {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-primary, #1B3A5C);
	margin-bottom: .75rem;
}
.ndm-qf-state p {
	color: var(--color-text-light, #637381);
	font-size: 1rem;
	margin-bottom: 2rem;
}
.ndm-qf-state__steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .75rem;
	flex-wrap: wrap;
	margin-bottom: 2rem;
}
.ndm-qf-state__step {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .8125rem;
	font-weight: 500;
	color: var(--color-text-light, #637381);
}
.ndm-qf-state__step span {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--color-bg, #F8FAFB);
	border: 1.5px solid var(--color-border, #E2E8EF);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .75rem;
	font-weight: 700;
}
.ndm-qf-state__step--done { color: var(--color-success, #27AE60); }
.ndm-qf-state__step--done span {
	background: var(--color-success-bg, #EAFAF1);
	border-color: var(--color-success, #27AE60);
	color: var(--color-success, #27AE60);
}
.ndm-qf-state__step-sep { color: var(--color-border, #E2E8EF); font-size: 1.25rem; }

/* Generic CTA buttons used in states */
.ndm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	padding: .8125rem 1.75rem;
	font-family: var(--font-sans, 'Inter', sans-serif);
	font-size: .875rem;
	font-weight: 600;
	border-radius: var(--radius-md, 8px);
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: all 200ms ease;
}
.ndm-btn--primary {
	background: var(--color-primary, #1B3A5C);
	color: #fff;
	border-color: var(--color-primary, #1B3A5C);
}
.ndm-btn--primary:hover {
	background: var(--color-primary-dark, #142d47);
	border-color: var(--color-primary-dark, #142d47);
	color: #fff;
}
.ndm-btn--teal {
	background: var(--color-secondary, #00897B);
	color: #fff;
	border-color: var(--color-secondary, #00897B);
}
.ndm-btn--teal:hover {
	background: var(--color-secondary-dark, #00695C);
	border-color: var(--color-secondary-dark, #00695C);
	color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   QUOTE FORM — MAIN GRID (2 cols: main 2fr + sidebar 1fr)
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf {
	padding: 0;
}
.ndm-qf-grid {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 2rem;
	align-items: start;
}
.ndm-qf-main {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}
.ndm-qf-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	position: sticky;
	top: 100px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SECTION CARDS (numbered)
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-sc {
	background: #fff;
	border: 1.5px solid var(--color-border, #E2E8EF);
	border-radius: var(--radius-xl, 16px);
	padding: 1.75rem;
}
.ndm-sc__header {
	display: flex;
	align-items: center;
	gap: .875rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--color-border-light, #F0F4F8);
}
.ndm-sc__num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--color-primary, #1B3A5C);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}
.ndm-sc__title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-primary, #1B3A5C);
	margin: 0 0 .125rem;
}
.ndm-sc__subtitle {
	font-size: .75rem;
	color: var(--color-text-light, #637381);
	margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRODUCT LINES (section 1)
   ═══════════════════════════════════════════════════════════════════════════════ */
#ndm-quote-tbody { display: flex; flex-direction: column; gap: .5rem; }

.ndm-qf-product-line {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding: .875rem 1rem;
	background: var(--color-bg, #F8FAFB);
	border: 1px solid var(--color-border, #E2E8EF);
	border-radius: var(--radius-lg, 12px);
}
.ndm-qf-product-line__info { flex: 1; min-width: 0; }
.ndm-qf-product-line__meta {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin-bottom: .25rem;
}
.ndm-ref-mono {
	font-family: var(--font-mono, 'Roboto Mono', monospace);
	font-size: .8125rem;
	font-weight: 500;
	color: var(--color-primary, #1B3A5C);
	letter-spacing: .02em;
}
.ndm-qf-product-line__cat {
	font-size: .75rem;
	color: var(--color-text-light, #637381);
}
.ndm-qf-product-line__name {
	font-size: .875rem;
	font-weight: 500;
	color: var(--color-text, #2C3E50);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
}
.ndm-qf-product-line__qty {
	display: flex;
	align-items: center;
	gap: .5rem;
	flex-shrink: 0;
}
.ndm-qf-product-line__qty-label {
	font-size: .75rem;
	color: var(--color-text-light, #637381);
	white-space: nowrap;
}
@media (max-width: 640px) { .ndm-qf-product-line__qty-label { display: none; } }

.ndm-qf-qty-input {
	width: 72px;
	padding: .375rem .5rem;
	font-family: var(--font-sans, 'Inter', sans-serif);
	font-size: .875rem;
	font-weight: 600;
	text-align: center;
	border: 1.5px solid var(--color-border, #E2E8EF);
	border-radius: var(--radius-md, 8px);
	outline: none;
	transition: border-color 150ms ease;
	background: #fff;
	color: var(--color-text, #2C3E50);
}
.ndm-qf-qty-input:focus { border-color: var(--color-primary, #1B3A5C); }

.ndm-qf-remove-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: var(--radius-md, 8px);
	border: none;
	background: transparent;
	color: var(--color-text-light, #637381);
	cursor: pointer;
	transition: all 150ms ease;
	flex-shrink: 0;
	padding: 0;
}
.ndm-qf-remove-btn svg { width: 16px; height: 16px; }
.ndm-qf-remove-btn:hover {
	background: var(--color-error-bg, #FDEDEC);
	color: var(--color-error, #E74C3C);
}

/* "Ajouter un produit de la boutique" dashed link */
.ndm-qf-add-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	margin-top: .875rem;
	padding: .875rem 1rem;
	width: 100%;
	border: 2px dashed var(--color-border, #E2E8EF);
	border-radius: var(--radius-xl, 16px);
	background: transparent;
	font-family: var(--font-sans, 'Inter', sans-serif);
	font-size: .875rem;
	font-weight: 500;
	color: var(--color-text-light, #637381);
	text-decoration: none;
	cursor: pointer;
	transition: all 200ms ease;
}
.ndm-qf-add-more svg { width: 16px; height: 16px; flex-shrink: 0; }
.ndm-qf-add-more:hover {
	border-color: var(--color-secondary, #00897B);
	color: var(--color-secondary, #00897B);
	background: var(--color-secondary-light, #E0F2F1);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FORM GRIDS (inside sections)
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf-grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}
.ndm-qf-grid3 {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: .5rem;
}
.ndm-qf-col-span2 { grid-column: 1 / -1; }

@media (max-width: 600px) {
	.ndm-qf-grid2 { grid-template-columns: 1fr; }
	.ndm-qf-col-span2 { grid-column: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FORM FIELDS
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf-subsection-label {
	display: flex;
	flex-direction: column;
	gap: var(--space-1, 4px);
	font-size: var(--text-xs, 12px);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--color-text-light, #637381);
	padding-top: var(--space-3, 12px);
	border-top: 1px solid var(--color-border, #E2E8EF);
	margin-top: var(--space-1, 4px);
}
.ndm-qf-subsection-label__desc {
	font-size: var(--text-sm, 14px);
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: var(--color-text-light, #637381);
}

.ndm-qf-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text, #2C3E50);
	margin-bottom: 6px;
}
.ndm-qf-req { color: var(--color-error, #E74C3C); margin-left: 2px; }
.ndm-qf-hint {
	font-size: .75rem;
	color: var(--color-text-light, #637381);
	margin-top: 4px;
}

.ndm-qf-input {
	width: 100%;
	padding: 10px 14px;
	font-family: var(--font-sans, 'Inter', sans-serif);
	font-size: .875rem;
	font-weight: 400;
	color: var(--color-text, #2C3E50);
	background: #fff;
	border: 1.5px solid var(--color-border, #E2E8EF);
	border-radius: var(--radius-md, 8px);
	outline: none;
	transition: border-color 150ms ease, box-shadow 150ms ease;
	-webkit-appearance: none;
	appearance: none;
}
.ndm-qf-input:focus {
	border-color: var(--color-primary, #1B3A5C);
	box-shadow: 0 0 0 3px rgba(27, 58, 92, .08);
}
.ndm-qf-input::placeholder { color: #9CA3AF; }
.ndm-qf-input--mono { font-family: var(--font-mono, 'Roboto Mono', monospace); }
.ndm-qf-input--select { cursor: pointer; }
.ndm-qf-input--textarea {
	resize: vertical;
	min-height: 110px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FILE UPLOAD ZONE
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf-upload-zone {
	display: block;
	border: 2px dashed var(--color-border, #E2E8EF);
	border-radius: var(--radius-lg, 12px);
	padding: 2rem 1.5rem;
	text-align: center;
	cursor: pointer;
	transition: border-color 200ms ease, background 200ms ease;
	background: var(--color-bg, #F8FAFB);
}
.ndm-qf-upload-zone:hover {
	border-color: var(--color-primary, #1B3A5C);
	background: var(--color-primary-light, #E8F4FD);
}
.ndm-qf-upload-zone svg {
	width: 40px;
	height: 40px;
	color: #D1D5DB;
	margin: 0 auto .5rem;
	display: block;
}
.ndm-qf-upload-zone__input { display: none; }
.ndm-qf-upload-zone__title {
	font-size: .875rem;
	font-weight: 500;
	color: var(--color-text, #2C3E50);
	margin-bottom: .25rem;
}
.ndm-qf-upload-zone__cta { color: var(--color-secondary, #00897B); }
.ndm-qf-upload-zone__hint {
	font-size: .75rem;
	color: var(--color-text-light, #637381);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RGPD BLOCK
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf-rgpd {
	display: flex;
	align-items: flex-start;
	gap: .75rem;
	padding: 1rem 1.25rem;
	background: var(--color-bg, #F8FAFB);
	border: 1px solid var(--color-border, #E2E8EF);
	border-radius: var(--radius-xl, 16px);
}
.ndm-qf-rgpd__check {
	width: 16px;
	height: 16px;
	margin-top: 2px;
	flex-shrink: 0;
	accent-color: var(--color-secondary, #00897B);
	cursor: pointer;
}
.ndm-qf-rgpd__label {
	font-size: .75rem;
	color: var(--color-text-light, #637381);
	line-height: 1.6;
	cursor: pointer;
}
.ndm-qf-rgpd__link {
	color: var(--color-secondary, #00897B);
	text-decoration: none;
}
.ndm-qf-rgpd__link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ANTI-SPAM (honeypot — champ piège invisible)
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SUBMIT BUTTON + NOTE
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf-submit {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .75rem;
	padding: 1rem 1.5rem;
	font-family: var(--font-sans, 'Inter', sans-serif);
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--color-secondary, #00897B), var(--color-secondary-dark, #00695C));
	border: none;
	border-radius: var(--radius-xl, 16px);
	cursor: pointer;
	transition: box-shadow 200ms ease, transform 200ms ease;
	box-shadow: 0 4px 14px rgba(0, 137, 123, .3);
}
.ndm-qf-submit:hover {
	box-shadow: 0 6px 20px rgba(0, 137, 123, .4);
	transform: translateY(-1px);
}
.ndm-qf-submit svg { flex-shrink: 0; }
.ndm-qf-submit-note {
	text-align: center;
	font-size: .8125rem;
	color: var(--color-text-light, #637381);
	margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SIDEBAR CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */
.ndm-qf-scard {
	background: #fff;
	border: 1px solid var(--color-border, #E2E8EF);
	border-radius: var(--radius-xl, 16px);
	padding: 1.25rem;
}
.ndm-qf-scard--dark {
	background: var(--color-primary, #1B3A5C);
	border-color: transparent;
}
.ndm-qf-scard__title {
	font-size: .875rem;
	font-weight: 700;
	color: var(--color-primary, #1B3A5C);
	margin: 0 0 1rem;
}
.ndm-qf-scard__title--light { color: #fff; margin-bottom: .375rem; }
.ndm-qf-scard__subdesc {
	font-size: .75rem;
	color: rgba(255, 255, 255, .65);
	margin-bottom: 1rem;
}
.ndm-qf-scard__phone {
	display: flex;
	align-items: center;
	gap: .5rem;
	color: #fff;
	font-size: 1.0625rem;
	font-weight: 700;
	text-decoration: none;
	margin-bottom: .375rem;
	transition: opacity 150ms ease;
}
.ndm-qf-scard__phone svg { width: 20px; height: 20px; color: var(--color-secondary, #00897B); flex-shrink: 0; }
.ndm-qf-scard__phone:hover { opacity: .85; }
.ndm-qf-scard__email {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .875rem;
	color: rgba(255, 255, 255, .6);
	text-decoration: none;
	transition: color 150ms ease;
}
.ndm-qf-scard__email svg { width: 16px; height: 16px; flex-shrink: 0; }
.ndm-qf-scard__email:hover { color: #fff; }

/* SLA items */
.ndm-qf-sla-list { display: flex; flex-direction: column; gap: .875rem; }
.ndm-qf-sla-item {
	display: flex;
	align-items: flex-start;
	gap: .875rem;
}
.ndm-qf-sla-item__icon {
	width: 32px;
	height: 32px;
	border-radius: var(--radius-md, 8px);
	background: var(--color-secondary-light, #E0F2F1);
	color: var(--color-secondary, #00897B);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.ndm-qf-sla-item__icon svg { width: 16px; height: 16px; }
.ndm-qf-sla-item__title {
	font-size: .875rem;
	font-weight: 600;
	color: var(--color-text, #2C3E50);
	margin: 0 0 .125rem;
}
.ndm-qf-sla-item__desc {
	font-size: .75rem;
	color: var(--color-text-light, #637381);
	margin: 0;
}

/* Certification items */
.ndm-qf-cert-list { display: flex; flex-direction: column; gap: .625rem; }
.ndm-qf-cert-item {
	display: flex;
	align-items: center;
	gap: .625rem;
	font-size: .8125rem;
	color: var(--color-text, #2C3E50);
}
.ndm-qf-cert-item svg {
	width: 20px;
	height: 20px;
	color: var(--color-secondary, #00897B);
	flex-shrink: 0;
}
.ndm-qf-cert-item__badge {
	width: 22px;
	height: 22px;
	border-radius: 4px;
	background: var(--color-primary-light, #E8F4FD);
	color: var(--color-primary, #1B3A5C);
	font-size: .6875rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
	.ndm-qf-grid {
		grid-template-columns: 1fr;
	}
	.ndm-qf-sidebar {
		position: static;
		/* On mobile, sidebar goes below the form */
	}
}

@media (max-width: 768px) {
	.ndm-sc { padding: 1.25rem; }
	.ndm-qf-submit { font-size: .9375rem; padding: .9375rem 1.25rem; }
}

@media (max-width: 480px) {
	.ndm-qf-grid3 { grid-template-columns: 1fr; }
	.ndm-qf-product-line { flex-wrap: wrap; }
	.ndm-qf-product-line__qty { width: 100%; justify-content: flex-end; }
}
