/* ===== Conciergerie Service Conseil — Header ===== */

/* Filet de sécurité SCOPÉ au header uniquement : on ne touche plus à
   html/body globalement. Forcer overflow-x:hidden sur html/body pouvait
   casser le position:sticky/fixed d'autres éléments Elementor de la page
   et rogner des sections qui débordent volontairement (hero en pleine
   largeur, animations d'entrée, carrousels, etc.). */
.csc-header,
.csc-mobile-menu,
.csc-mobile-bar {
	max-width: 100%;
}

.csc-header {
	position: relative;
	width: 100%;
	max-width: 100%;
	/* Sous la admin bar WP (z-index 99999), au-dessus des sections
	   Elementor classiques (qui dépassent rarement quelques centaines). */
	z-index: 99990;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.csc-header--sticky {
	position: relative;
}

/* Seule la partie 2 (logo + menu) reste fixée en haut au scroll,
   la top bar (partie 1) défile normalement avec la page.
   Le sticky pur est limité à la hauteur de son parent (~la top bar),
   donc on bascule en position:fixed via JS une fois la top bar sortie
   de l'écran (voir header.js — classe .csc-mainbar-fixed). */
.csc-header--sticky .csc-mainbar {
	position: sticky;
	top: 0;
	z-index: 999;
}

.csc-header--sticky.csc-mainbar-fixed .csc-mainbar {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	width: 100%;
}

/* Décale le bandeau fixe sous la admin bar WordPress quand un utilisateur
   connecté la voit (32px desktop, 46px sous 782px — mêmes seuils que WP core). */
body.admin-bar .csc-header--sticky.csc-mainbar-fixed .csc-mainbar {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .csc-header--sticky.csc-mainbar-fixed .csc-mainbar {
		top: 46px;
	}
}

.csc-mainbar-spacer {
	display: none;
}

.csc-header--sticky.csc-mainbar-fixed .csc-mainbar-spacer {
	display: block;
}

/* ---------- TOP BAR ---------- */
.csc-topbar {
	background-color: #f5f5f5;
	color: #2b2b2b;
	min-height: 38px;
	font-size: 13px;
	overflow: hidden;
	transition: max-height .3s ease, opacity .25s ease, padding .3s ease;
}

/* Mode "icônes uniquement" : le texte reste dans le DOM (accessibilité)
   mais n'est plus affiché visuellement à côté des icônes. */
.csc-topbar--icon-only .csc-topbar__text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.csc-header .csc-topbar__inner {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto !important;
	height: 100%;
	min-height: 38px;
	display: flex !important;
	align-items: center;
	justify-content: space-between !important;
	padding: 0 24px;
	gap: 28px;
	flex-wrap: wrap;
	box-sizing: border-box;
}

.csc-topbar__left {
	display: flex;
	align-items: center;
	gap: 26px;
	flex-wrap: wrap;
}

.csc-topbar__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: inherit;
	text-decoration: none;
}

.csc-topbar__item svg,
.csc-topbar__item i {
	font-size: 12px;
}

.csc-topbar__social {
	display: flex;
	align-items: center;
	gap: 8px;
}

.csc-topbar__social a {
	width: 22px;
	height: 22px;
	border-radius: 0;
	background-color: transparent;
	color: #2b2b2b;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	font-size: 16px;
	transition: opacity .2s ease;
}

.csc-topbar__social a svg,
.csc-topbar__social a i {
	width: 16px;
	height: 16px;
	font-size: 16px;
	flex-shrink: 0;
}

.csc-topbar__social a:hover {
	opacity: .8;
}

/* ---------- MAIN BAR ---------- */
.csc-mainbar {
	background-color: #ffffff;
	min-height: 90px;
	transition: min-height .3s ease;
}

.csc-mainbar__inner {
	max-width: 1280px;
	margin: 0 auto;
	height: 100%;
	min-height: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	padding: 0 24px;
}

/* Variante "logo centré" : grille à 3 colonnes symétriques, pour que le
   logo soit TOUJOURS au centre exact du bandeau, même si le nombre
   d'éléments de menu diffère entre la gauche et la droite (avec un simple
   flex + justify-content:center, un déséquilibre du nombre d'items décale
   visuellement le logo — la grille corrige ça une fois pour toutes). */
.csc-mainbar__inner--center {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 40px;
	width: 100%;
}

.csc-mainbar__inner--center .csc-nav--left {
	justify-self: end;
	min-width: 0;
}

.csc-mainbar__inner--center .csc-header__logo {
	justify-self: center;
	grid-column: 2;
}

.csc-mainbar__inner--center .csc-nav--right {
	justify-self: start;
	min-width: 0;
}

.csc-mainbar__right {
	display: flex;
	align-items: center;
	gap: 24px;
}

.csc-header__logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.csc-header__logo img {
	width: 72px;
	height: auto;
	display: block;
	transition: width .3s ease;
}

/* ---------- DESKTOP NAV ---------- */
.csc-nav--full {
	display: flex;
	justify-content: center;
}

.csc-nav--left .csc-nav__list {
	justify-content: flex-end;
}

.csc-nav--right .csc-nav__list {
	justify-content: flex-start;
}

.csc-nav--desktop .csc-nav__list {
	display: flex;
	align-items: center;
	gap: 30px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.csc-nav--desktop .csc-nav__list > li {
	position: relative;
}

.csc-nav--desktop .csc-nav__list > li > a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #1b2430;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	padding: 8px 2px;
	border-bottom: 2px solid transparent;
	transition: color .2s ease, border-color .2s ease;
}

.csc-nav--desktop .csc-nav__list > li > a:hover {
	color: #e9a83c;
}

.csc-nav--desktop .csc-nav__list > li.current-menu-item > a {
	color: #e9a83c;
	border-bottom-color: #e9a83c;
}

.csc-nav--desktop .csc-caret {
	width: 8px;
	height: 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	margin-top: -3px;
}

/* dropdown desktop */
.csc-nav--desktop .csc-submenu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	max-width: min(280px, calc(100vw - 32px));
	background: #ffffff;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	list-style: none;
	margin: 10px 0 0;
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
	z-index: 10;
}

.csc-nav--desktop .csc-has-dropdown:last-child > .csc-submenu {
	left: auto;
	right: 0;
}

.csc-nav--desktop .csc-has-dropdown:hover > .csc-submenu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.csc-nav--desktop .csc-submenu li a {
	display: block;
	padding: 9px 18px;
	color: #1b2430;
	text-decoration: none;
	font-size: 14px;
	white-space: nowrap;
}

.csc-nav--desktop .csc-submenu li a:hover {
	color: #e9a83c;
	background: rgba(0, 0, 0, 0.03);
}

/* CTA button */
.csc-cta-btn {
	background-color: #e9a83c;
	color: #ffffff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	padding: 11px 24px;
	border-radius: 24px;
	white-space: nowrap;
	transition: opacity .2s ease;
	flex-shrink: 0;
}

.csc-cta-btn:hover {
	opacity: .88;
}

/* ---------- SHRINK STATE (desktop, sticky) ---------- */
.csc-header.csc-is-shrunk .csc-topbar {
	max-height: 0;
	min-height: 0;
	opacity: 0;
	padding: 0;
}

.csc-header.csc-is-shrunk .csc-mainbar {
	min-height: 60px !important;
}

.csc-header.csc-is-shrunk .csc-header__logo img {
	width: 46px !important;
}

.csc-header.csc-is-shrunk .csc-mainbar__inner {
	padding: 0px;
}

/* ---------- BARRE PLEINE LARGEUR + BOUTON ROND CENTRÉ PAR-DESSUS ---------- */
.csc-mobile-bar {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: calc(var(--csc-bar-height, 56px) + env(safe-area-inset-bottom, 0) + var(--csc-vv-bottom, 0px));
	padding-bottom: calc(env(safe-area-inset-bottom, 0) + var(--csc-vv-bottom, 0px));
	box-sizing: border-box;
	background-color: var(--csc-bar-bg, #ffffff);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
	z-index: 2147483000;
}

.csc-mobile-toggle {
	display: none;
	position: fixed;
	left: 50%;
	right: auto;
	bottom: calc(var(--csc-bar-height, 56px) - (var(--csc-toggle-size, 56px) / 2) + var(--csc-vv-bottom, 0px) + env(safe-area-inset-bottom, 0));
	transform: translateX(-50%);
	width: var(--csc-toggle-size, 56px);
	height: var(--csc-toggle-size, 56px);
	padding: 0;
	box-sizing: border-box;
	border-radius: 50%;
	background-color: #ffffff;
	border: none;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2147483001;
}

.csc-mobile-toggle__bars {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.csc-mobile-toggle__bars span {
	display: block;
	width: 22px;
	height: 2px;
	background-color: #1b2430;
	border-radius: 2px;
	transition: opacity .2s ease;
}

.csc-mobile-toggle__close {
	display: none;
	color: #1b2430;
	font-size: 26px;
	line-height: 1;
}

.csc-header.csc-menu-open .csc-mobile-toggle__bars {
	display: none;
}

.csc-header.csc-menu-open .csc-mobile-toggle__close {
	display: block;
}

/* ---------- MENU PLEIN ÉCRAN (mobile / tablette) ---------- */
.csc-mobile-menu {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: var(--csc-vv-bottom, 0px);
	height: var(--csc-vv-height, 100vh);
	background-color: rgba(255, 255, 255, 0.98);
	z-index: 2147482999;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
	overflow-y: auto;
}

.csc-header.csc-menu-open .csc-mobile-menu {
	opacity: 1;
	visibility: visible;
}

.csc-mobile-menu__inner {
	min-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 28px;
	padding: 90px 24px 120px;
	text-align: center;
}

.csc-nav--mobile .csc-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
}

.csc-nav--mobile .csc-nav__list > li > a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #1b2430;
	text-decoration: none;
	font-size: 19px;
	font-weight: 500;
}

.csc-nav--mobile .csc-caret {
	width: 9px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s ease;
}

.csc-nav--mobile .csc-has-dropdown.csc-open > a .csc-caret {
	transform: rotate(-135deg);
}

.csc-nav--mobile .csc-submenu {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: none;
	flex-direction: column;
	gap: 14px;
}

.csc-nav--mobile .csc-has-dropdown.csc-open .csc-submenu {
	display: flex;
}

.csc-nav--mobile .csc-submenu a {
	color: #5a6472;
	text-decoration: none;
	font-size: 16px;
}

.csc-mobile-menu__social {
	justify-content: center;
}

.csc-mobile-menu__hours {
	margin: 0;
	font-size: 14px;
	color: #4a5568;
}

.csc-mobile-menu__hours strong {
	font-weight: 600;
}

/* ---------- BREAKPOINT PAR DÉFAUT (991px) ---------- */
@media (max-width: 991px) {
	.csc-topbar {
		display: none;
	}

	.csc-nav--desktop {
		display: none;
	}

	.csc-cta-btn {
		display: none;
	}

	.csc-mobile-toggle {
		display: flex;
	}

	.csc-mobile-bar {
		display: block;
	}

	body.csc-has-mobile-bar {
		padding-bottom: calc(96px + env(safe-area-inset-bottom, 0));
	}

	.csc-mainbar {
		min-height: 64px;
	}

	.csc-header__logo img {
		width: 60px;
	}
}

@media (min-width: 992px) {
	.csc-mobile-toggle,
	.csc-mobile-bar,
	.csc-mobile-menu {
		display: none !important;
	}
}

/* Verrouille le scroll de la page quand le menu plein écran est ouvert */
body.csc-scroll-lock {
	overflow: hidden;
}
