/* Rimota Quick Order — styles du popup. Préfixe rqo- pour éviter tout conflit. */

:root {
	--rqo-cream: #f8f1e5;
	--rqo-terracotta: #c2521f;
	--rqo-olive: #5d6b2f;
	--rqo-olive-dark: #4c5826;
	--rqo-text: #3d3a33;
	--rqo-muted: #7d7768;
	--rqo-border: #e3d9c8;
	--rqo-red: #b93627;
}

/* Bouton « Acheter maintenant » sur la fiche produit */
.rqo-open-btn {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 14px 20px;
	background: var(--rqo-olive);
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .2s ease, transform .1s ease;
}
.rqo-open-btn:hover { background: var(--rqo-olive-dark); color: #fff; }
.rqo-open-btn:active { transform: scale(.98); }

/* Structure du modal */
.rqo-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.rqo-modal.rqo-open { display: flex; }
.rqo-overlay {
	position: absolute;
	inset: 0;
	background: rgba(30, 26, 18, .55);
	backdrop-filter: blur(2px);
	animation: rqo-fade .2s ease;
}
.rqo-box {
	position: relative;
	width: 100%;
	max-width: 430px;
	max-height: min(92vh, 92dvh);
	background: var(--rqo-cream);
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(40, 30, 10, .28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: rqo-pop .22s ease;
}
.rqo-scroll {
	flex: 1 1 auto;
	min-height: 0;              /* indispensable pour que le défilement s'engage en flex */
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;   /* le geste ne se transmet plus à la page arrière */
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	padding: 26px 24px 22px;
}
.rqo-close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 2;
	width: 38px;
	height: 38px;
	border: none;
	background: transparent;
	color: var(--rqo-text);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
}
.rqo-close:hover { background: rgba(0, 0, 0, .06); }
/* Blocage du défilement de la page pendant l'ouverture du popup.
   overflow:hidden seul ne suffit pas sur iOS/Safari : le corps de page est figé
   en position fixe, décalé de la position de défilement mémorisée. Celle-ci est
   restaurée à la fermeture, sans saut vers le haut. */
html.rqo-locked, html.rqo-locked body { overflow: hidden !important; }
html.rqo-locked body {
	position: fixed !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	overflow-x: hidden !important;
}
.rqo-modal { overscroll-behavior: contain; }
.rqo-overlay { touch-action: none; }

@keyframes rqo-fade { from { opacity: 0; } }
@keyframes rqo-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* En-tête */
.rqo-logo { display: block; margin: 0 auto 10px; max-height: 52px; width: auto; }
.rqo-truck, .rqo-check {
	width: 64px;
	height: 64px;
	margin: 4px auto 12px;
	border-radius: 50%;
	background: #e9e6d2;
	color: var(--rqo-olive);
	display: flex;
	align-items: center;
	justify-content: center;
}
.rqo-truck svg { width: 34px; height: 34px; }
.rqo-check { background: #dfe5c9; }
.rqo-check svg { width: 32px; height: 32px; color: var(--rqo-olive-dark); }
.rqo-title {
	margin: 0 0 8px;
	text-align: center;
	font-size: 25px;
	line-height: 1.25;
	font-weight: 800;
}
.rqo-title-a { color: var(--rqo-terracotta); }
.rqo-title-b { color: var(--rqo-olive); }
.rqo-subtitle {
	margin: 0 0 18px;
	text-align: center;
	color: var(--rqo-muted);
	font-size: 14.5px;
	line-height: 1.5;
}

/* Résumé produit */
.rqo-product {
	display: flex;
	gap: 12px;
	align-items: center;
	background: #fff;
	border: 1px solid var(--rqo-border);
	border-radius: 12px;
	padding: 10px 12px;
}
.rqo-product-img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 8px;
	flex: 0 0 64px;
}
.rqo-product-info { flex: 1; min-width: 0; }
.rqo-product-name { font-weight: 700; color: var(--rqo-text); font-size: 14.5px; line-height: 1.3; }
.rqo-product-variant { color: var(--rqo-muted); font-size: 13px; margin-top: 2px; }
.rqo-product-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
	gap: 8px;
}
.rqo-product-price { font-weight: 800; color: var(--rqo-red); font-size: 15px; white-space: nowrap; }

/* Quantité */
.rqo-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--rqo-border);
	border-radius: 8px;
	overflow: hidden;
	background: #faf7f0;
}
.rqo-qty button {
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	font-size: 18px;
	color: var(--rqo-olive-dark);
	cursor: pointer;
	line-height: 1;
	padding: 0;
}
.rqo-qty button:hover { background: #efe9db; }
.rqo-qty-input {
	width: 34px;
	height: 32px;
	border: none;
	background: transparent;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	color: var(--rqo-text);
	padding: 0;
}

/* Totaux */
.rqo-totals { margin: 12px 0 16px; padding: 2px 4px; }
.rqo-row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: var(--rqo-text);
	padding: 3px 0;
}
.rqo-total-row { font-weight: 800; font-size: 16px; border-top: 1px solid var(--rqo-border); margin-top: 6px; padding-top: 8px; }
.rqo-total-row span:last-child { color: var(--rqo-red); }
.rqo-ship-free { color: var(--rqo-olive); font-weight: 700; }
.rqo-ship-note { font-size: 12px; color: var(--rqo-muted); margin-top: 4px; }

/* Formulaire */
.rqo-label {
	display: block;
	margin: 12px 0 6px;
	font-weight: 700;
	font-size: 14px;
	color: var(--rqo-olive-dark);
}
.rqo-field { position: relative; }
.rqo-icon {
	position: absolute;
	top: 50%;
	left: 13px;
	transform: translateY(-50%);
	color: #a49b88;
	pointer-events: none;
}
.rqo-field-area .rqo-icon { top: 16px; transform: none; }
.rqo-icon svg { width: 18px; height: 18px; display: block; }
.rqo-field input,
.rqo-field textarea {
	width: 100%;
	padding: 13px 14px 13px 42px;
	background: #fff;
	border: 1px solid var(--rqo-border);
	border-radius: 10px;
	font-size: 15px;
	color: var(--rqo-text);
	box-shadow: none;
	resize: vertical;
}
.rqo-field input:focus,
.rqo-field textarea:focus {
	outline: none;
	border-color: var(--rqo-olive);
	box-shadow: 0 0 0 3px rgba(93, 107, 47, .12);
}
.rqo-field ::placeholder { color: #b0a896; opacity: 1; }
.rqo-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* Erreur */
.rqo-error {
	margin-top: 12px;
	padding: 10px 12px;
	background: #fdecea;
	color: var(--rqo-red);
	border: 1px solid #f3c4bd;
	border-radius: 8px;
	font-size: 13.5px;
}

/* Bouton principal */
.rqo-submit {
	display: block;
	width: 100%;
	margin-top: 16px;
	padding: 15px 20px;
	background: var(--rqo-olive);
	color: #fff;
	border: none;
	border-radius: 12px;
	font-size: 15.5px;
	font-weight: 800;
	letter-spacing: 2px;
	cursor: pointer;
	transition: background .2s ease;
	min-height: 52px;
}
.rqo-submit:hover { background: var(--rqo-olive-dark); }
.rqo-submit:disabled { opacity: .75; cursor: wait; }
.rqo-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: rqo-spin .7s linear infinite;
	vertical-align: middle;
}
@keyframes rqo-spin { to { transform: rotate(360deg); } }
.rqo-secure {
	margin: 10px 0 0;
	text-align: center;
	font-size: 12.5px;
	color: var(--rqo-muted);
}

/* Vue confirmation */
.rqo-success-lead { text-align: center; font-size: 15px; color: var(--rqo-text); margin: 0 0 6px; }
.rqo-card {
	background: #fff;
	border: 1px solid var(--rqo-border);
	border-radius: 12px;
	padding: 14px;
	margin-top: 14px;
	font-size: 14px;
}
.rqo-card-title { font-weight: 800; color: var(--rqo-olive-dark); margin-bottom: 10px; }
.rqo-card-product {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--rqo-border);
	margin-bottom: 8px;
}
.rqo-card-product > div { flex: 1; min-width: 0; }
.rqo-success-img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: 0 0 56px; }
.rqo-success-pname { font-weight: 700; line-height: 1.3; }
.rqo-success-variant, .rqo-success-qty { color: var(--rqo-muted); font-size: 13px; margin-top: 2px; }
.rqo-success-price { font-weight: 800; color: var(--rqo-red); white-space: nowrap; }
.rqo-success-address, .rqo-success-phone { margin: 0 0 4px; color: var(--rqo-text); line-height: 1.45; }
.rqo-success-phone { color: var(--rqo-red); font-weight: 700; }
.rqo-continue {
	display: block;
	width: 100%;
	margin-top: 16px;
	padding: 13px;
	background: transparent;
	border: 2px solid var(--rqo-olive);
	color: var(--rqo-olive-dark);
	border-radius: 12px;
	font-weight: 700;
	cursor: pointer;
}
.rqo-continue:hover { background: rgba(93, 107, 47, .08); }

/* Toast (variante non sélectionnée, erreurs hors popup) */
.rqo-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%) translateY(10px);
	background: #2f2b22;
	color: #fff;
	padding: 12px 18px;
	border-radius: 10px;
	font-size: 14px;
	z-index: 1000000;
	opacity: 0;
	transition: opacity .25s ease, transform .25s ease;
	max-width: 92vw;
	text-align: center;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.rqo-toast-in { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Masque les anciens boutons buy-now (WPC / Custom Buy Now) si encore actifs */
.wpcbn-btn, .cbn-buy-now { display: none !important; }

/* Mobile */
@media (max-width: 480px) {
	.rqo-modal { padding: 10px; align-items: flex-end; }
	.rqo-box { max-width: 100%; border-radius: 16px 16px 12px 12px; max-height: min(94vh, 94dvh); }
	.rqo-scroll { padding: 22px 16px 18px; }
	.rqo-title { font-size: 22px; }
}

/* Renfort de spécificité contre les styles du thème Freshio */
#rqo-modal .rqo-field input,
#rqo-modal .rqo-field textarea {
	padding: 13px 14px 13px 42px !important;
	background: #fff !important;
	border: 1px solid var(--rqo-border) !important;
	border-radius: 10px !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	min-height: 0 !important;
	height: auto !important;
	box-shadow: none !important;
}
#rqo-modal .rqo-field input:focus,
#rqo-modal .rqo-field textarea:focus {
	border-color: var(--rqo-olive) !important;
	box-shadow: 0 0 0 3px rgba(93, 107, 47, .12) !important;
}
#rqo-modal .rqo-qty-input {
	width: 34px !important;
	height: 32px !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	text-align: center !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	color: var(--rqo-text) !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}
#rqo-modal .rqo-qty button {
	width: 32px !important;
	height: 32px !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--rqo-olive-dark) !important;
	font-size: 18px !important;
	line-height: 1 !important;
}
#rqo-modal .rqo-submit,
#rqo-modal .rqo-continue { letter-spacing: 2px !important; text-transform: none !important; }

/* Pied du popup de confirmation */
.rqo-help {
	margin: 16px 0 2px;
	text-align: center;
	font-size: 13.5px;
	color: var(--rqo-text);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	flex-wrap: wrap;
}
.rqo-help svg { width: 16px; height: 16px; color: var(--rqo-olive); flex: 0 0 auto; }
.rqo-help a { color: var(--rqo-terracotta); font-weight: 700; text-decoration: none; }
.rqo-help a:hover { text-decoration: underline; }
.rqo-success-ship-note { margin-top: 8px; }
