/*
 * Touba Carrosserie — styles du thème.
 *
 * Les couleurs viennent des « Couleurs globales » d'Elementor quand elles
 * existent (Réglages du site), sinon des valeurs ci-dessous.
 */

:root {
	--tb-navy: var(--e-global-color-primary, #0f1b2d);
	--tb-orange: var(--e-global-color-secondary, #ff7a1a);
	--tb-text: var(--e-global-color-text, #5d6677);
	--tb-sun: var(--e-global-color-accent, #ffc533);
	--tb-ink: var(--e-global-color-tbink, #14213d);
	--tb-cream: var(--e-global-color-tbcream, #fff8ee);
	--tb-line: var(--e-global-color-tbline, #e9e4da);
	--tb-white: #ffffff;
	--tb-display: "Sora", "Plus Jakarta Sans", system-ui, sans-serif;
	--tb-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--tb-wrap: 1220px;
}

/* ------------------------------------------------------------ Base -------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
	margin: 0;
	background: var(--tb-white);
	color: var(--tb-text);
	font-family: var(--tb-body);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--tb-orange); }

:focus-visible { outline: 3px solid var(--tb-sun); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 12px; left: 12px; z-index: 100000;
	width: auto; height: auto; clip: auto;
	padding: 12px 18px; margin: 0;
	background: var(--tb-white); color: var(--tb-navy);
	border-radius: 8px; font-weight: 700;
}

.site-main { display: block; }

/* ------------------------------------------ Contenus hors Elementor ------- */
.touba-wrap {
	width: 100%;
	max-width: var(--tb-wrap);
	margin: 0 auto;
	padding-left: max(24px, env(safe-area-inset-left, 0px));
	padding-right: max(24px, env(safe-area-inset-right, 0px));
}

.touba-content { padding-top: 64px; padding-bottom: 80px; }

.touba-page-title {
	font-family: var(--tb-display);
	color: var(--tb-navy);
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.1;
	margin: 0 0 24px;
	text-wrap: balance;
}

.touba-entry__content { max-width: 760px; }
.touba-entry__content h2,
.touba-entry__content h3 { font-family: var(--tb-display); color: var(--tb-ink); line-height: 1.25; }
.touba-entry__thumb img { border-radius: 22px; margin-bottom: 24px; }
.touba-meta { font-size: 14px; color: var(--tb-text); margin: 0 0 8px; }

.touba-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.touba-card { border: 1px solid var(--tb-line); border-radius: 22px; overflow: hidden; background: var(--tb-white); }
.touba-card__thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.touba-card__body { padding: 20px 22px 24px; }
.touba-card__title { font-family: var(--tb-display); font-size: 21px; line-height: 1.3; margin: 0 0 8px; }
.touba-card__title a { color: var(--tb-ink); text-decoration: none; }

.touba-btn {
	display: inline-block;
	padding: 14px 26px;
	border-radius: 999px;
	background: var(--tb-orange);
	color: var(--tb-white);
	font-weight: 700;
	text-decoration: none;
}
.touba-btn:hover { background: var(--tb-navy); color: var(--tb-white); }

.touba-eyebrow-text,
.touba-404 .touba-eyebrow { color: var(--tb-orange); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }

/* ------------------------------------------------------ En-tête ----------- */
.site-header--elementor,
.site-header--fallback {
	position: sticky;
	top: 0;
	z-index: 999;
}
.admin-bar .site-header--elementor,
.admin-bar .site-header--fallback { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .site-header--elementor,
	.admin-bar .site-header--fallback { top: 0; position: relative; }
}

.site-header--fallback { background: var(--tb-navy); }
.touba-fallback-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.touba-fallback-brand { color: var(--tb-white); font-family: var(--tb-display); font-weight: 700; font-size: 20px; text-decoration: none; }
.touba-fallback-logo { display: block; width: 64px; height: auto; }
.site-footer--fallback { background: var(--tb-navy); color: #c8ced8; font-size: 14px; padding: 32px 0; }

/* ----------------------------------------- Petits titres et accents ------- */
.touba-eyebrow .elementor-heading-title {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}
.touba-eyebrow .elementor-heading-title::before {
	content: "";
	width: 28px;
	height: 3px;
	border-radius: 3px;
	background: currentColor;
	flex: none;
}
.elementor-widget-heading.touba-eyebrow.elementor-widget__width-initial,
.touba-eyebrow[class*="align-center"] .elementor-heading-title { justify-content: center; }

.touba-accent { color: var(--tb-orange); }

.touba-letter p:first-child { font-size: 1.12em; color: var(--tb-ink); }
.touba-letter p { margin: 0 0 1.1em; }
.touba-letter p:last-child { margin-bottom: 0; }

.touba-signature .elementor-heading-title { font-style: italic; }

.touba-product-card { transition: transform .25s ease, box-shadow .25s ease; }
.touba-product-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -18px rgba(15, 27, 45, .25); }
.touba-product-card .elementor-widget-image img { background: #fff; }

.touba-map iframe { border-radius: 20px; }

/* ----------------------------------------------- Élément « Menu » --------- */
.touba-menu {
	--tm-link: #ffffff;
	--tm-link-hover: var(--tb-orange);
	--tm-gap: 28px;
	--tm-align: center;
	--tm-toggle: #ffffff;
	--tm-panel-bg: var(--tb-navy);
	--tm-panel-link: #ffffff;
	position: relative;
	display: flex;
	justify-content: var(--tm-align);
}

.touba-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--tm-align);
	gap: 8px var(--tm-gap);
}

.touba-menu__list li { position: relative; margin: 0; }

.touba-menu .touba-menu__list a {
	display: inline-block;
	padding: 8px 0;
	color: var(--tm-link);
	text-decoration: none;
	font-family: var(--tb-body);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	transition: color .2s ease;
}

.touba-menu .touba-menu__list a:hover,
.touba-menu .touba-menu__list a:focus-visible,
.touba-menu .touba-menu__list .current-menu-item > a:not([href*="#"]) { color: var(--tm-link-hover); }

/* Sous-menus */
.touba-menu__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 10px 0;
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 220px;
	background: var(--tm-panel-bg);
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(15, 27, 45, .25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
	z-index: 20;
}
.touba-menu__list li:hover > .sub-menu,
.touba-menu__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.touba-menu .touba-menu__list .sub-menu a { display: block; padding: 8px 18px; color: var(--tm-panel-link); }

/* Bouton hamburger */
.touba-menu .touba-menu__toggle,
.touba-menu .touba-menu__toggle:hover,
.touba-menu .touba-menu__toggle:focus {
	background: var(--tb-orange);
	border: 0;
	color: var(--tm-toggle);
}
.touba-menu.is-open .touba-menu__toggle {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .3);
}
.touba-menu__toggle {
	display: none;
	width: 46px;
	height: 46px;
	padding: 0;
	margin-left: auto;
	border-radius: 50%;
	cursor: pointer;
	position: relative;
	color: var(--tm-toggle);
}
.touba-menu__bars,
.touba-menu__bars::before,
.touba-menu__bars::after {
	position: absolute;
	left: 50%;
	width: 18px;
	height: 2px;
	margin-left: -9px;
	background: currentColor;
	border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
}
.touba-menu__bars { top: 50%; margin-top: -1px; }
.touba-menu__bars::before,
.touba-menu__bars::after { content: ""; left: 0; margin-left: 0; }
.touba-menu__bars::before { top: -6px; }
.touba-menu__bars::after { top: 6px; }
.touba-menu.is-open .touba-menu__bars { background: transparent; }
.touba-menu.is-open .touba-menu__bars::before { transform: translateY(6px) rotate(45deg); background: currentColor; }
.touba-menu.is-open .touba-menu__bars::after { transform: translateY(-6px) rotate(-45deg); background: currentColor; }
.touba-menu.is-open .touba-menu__bars::before,
.touba-menu.is-open .touba-menu__bars::after { background: var(--tm-toggle); }

@media (max-width: 1024px) {
	.touba-menu--bp-tablet .touba-menu__toggle { display: block; }
	.touba-menu--bp-tablet .touba-menu__panel { display: none; }
}
@media (max-width: 767px) {
	.touba-menu--bp-mobile .touba-menu__toggle { display: block; }
	.touba-menu--bp-mobile .touba-menu__panel { display: none; }
}

/* Menu ouvert sur téléphone et tablette */
.touba-menu.is-open .touba-menu__panel {
	display: block;
	position: fixed;
	left: 0;
	right: 0;
	top: var(--tm-top, 76px);
	max-height: calc(100vh - var(--tm-top, 76px));
	overflow-y: auto;
	padding: 12px max(20px, env(safe-area-inset-right, 0px)) 28px max(20px, env(safe-area-inset-left, 0px));
	background: var(--tm-panel-bg);
	box-shadow: 0 24px 40px rgba(15, 27, 45, .3);
	z-index: 1000;
}
.touba-menu.is-open .touba-menu__list { flex-direction: column; align-items: stretch; gap: 0; }
.touba-menu.is-open .touba-menu__list a {
	display: block;
	padding: 14px 4px;
	font-size: 17px;
	color: var(--tm-panel-link);
	border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.touba-menu.is-open .touba-menu__list .sub-menu {
	position: static; opacity: 1; visibility: visible; transform: none;
	box-shadow: none; padding: 0 0 0 16px; background: transparent; min-width: 0;
}

.touba-menu__empty { margin: 0; padding: 8px 12px; border: 1px dashed currentColor; border-radius: 8px; font-size: 13px; color: #fff; }

/* -------------------------------------- Élément « Bandeau défilant » ------ */
.touba-marquee {
	--tmq-duration: 40s;
	overflow: hidden;
	display: flex;
	user-select: none;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.touba-marquee__track {
	display: flex;
	flex: none;
	width: max-content;
	animation: touba-marquee var(--tmq-duration) linear infinite;
}
.touba-marquee--reverse .touba-marquee__track { animation-direction: reverse; }
.touba-marquee:hover .touba-marquee__track { animation-play-state: paused; }
.touba-marquee__group {
	display: flex;
	flex: none;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}
.touba-marquee__item {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	font-family: var(--tb-display);
	font-weight: 600;
	font-size: 21px;
}
.touba-marquee__sep { display: inline-block; margin: 0 28px; color: var(--tb-sun); }

@keyframes touba-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.touba-marquee__track { animation: none; }
	.touba-marquee { -webkit-mask-image: none; mask-image: none; }
	.touba-marquee__group[aria-hidden="true"] { display: none; }
	.touba-marquee__group { flex-wrap: wrap; row-gap: 8px; }
	.touba-product-card { transition: none; }
}

/* ------------------------------------ Élément « Formulaire de contact » --- */
.touba-form {
	--tf-label: var(--tb-ink);
	--tf-field-bg: #ffffff;
	--tf-field-border: var(--tb-line);
	--tf-radius: 14px;
	--tf-btn-bg: var(--tb-orange);
	--tf-btn-color: #ffffff;
	--tf-btn-bg-hover: var(--tb-navy);
	display: grid;
	gap: 20px;
}
.touba-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 18px;
}
.touba-form__field { margin: 0; display: grid; gap: 6px; min-width: 0; }
.touba-form__field--full { grid-column: 1 / -1; }
.touba-form label {
	color: var(--tf-label);
	font-family: var(--tb-body);
	font-weight: 600;
	font-size: 14px;
}
.touba-form input,
.touba-form select,
.touba-form textarea {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--tf-field-border);
	border-radius: var(--tf-radius);
	background: var(--tf-field-bg);
	color: var(--tb-ink);
	font: 16px/1.4 var(--tb-body);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.touba-form textarea { min-height: 120px; resize: vertical; }
.touba-form input:focus,
.touba-form select:focus,
.touba-form textarea:focus {
	outline: none;
	border-color: var(--tb-orange);
	box-shadow: 0 0 0 4px rgba(255, 122, 26, .18);
}
.touba-form__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.touba-form__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 14px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--tf-btn-bg);
	color: var(--tf-btn-color);
	font: 700 15px/1.2 var(--tb-body);
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease;
}
.touba-form__btn:hover,
.touba-form__btn:focus-visible { background: var(--tf-btn-bg-hover); color: #fff; }
.touba-form__btn--wa { background: #1fa855; }
.touba-form__btn--wa::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.7.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.7-1.3.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.7 11.9 11.9 0 0 0 4.6 4c1.7.7 2.4.8 3.2.7a2.8 2.8 0 0 0 1.8-1.3 2.3 2.3 0 0 0 .2-1.3c-.1-.1-.2-.2-.5-.3z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.7.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.7-1.3.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.7 11.9 11.9 0 0 0 4.6 4c1.7.7 2.4.8 3.2.7a2.8 2.8 0 0 0 1.8-1.3 2.3 2.3 0 0 0 .2-1.3c-.1-.1-.2-.2-.5-.3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.touba-form__btn--wa:hover { background: var(--tf-btn-bg-hover); }
.touba-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.touba-form__notice {
	padding: 14px 18px;
	border-radius: 14px;
	font-weight: 600;
	font-size: 15px;
}
.touba-form__notice--ok { background: #e7f7ee; color: #146c3a; }
.touba-form__notice--error { background: #fdecec; color: #9b1c1c; }

@media (max-width: 600px) {
	.touba-form__grid { grid-template-columns: 1fr; }
	.touba-form__actions .touba-form__btn { flex: 1 1 100%; }
}
