/* ==========================================================================
   CPTS SUD - HEADER & NAVIGATION STYLES
   ========================================================================== */

.cpts-header {
	background-color: var(--cpts-white);
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
	transition: all 0.3s ease;
	border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.cpts-header.is-scrolled {
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
	background-color: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(8px);
}

.cpts-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--cpts-header-height);
	gap: 20px;
}

/* 1. Logo Brand */
.cpts-header-brand {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	min-width: 180px;
}

.cpts-brand-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.cpts-main-logo {
	display: block !important;
	height: 64px;
	width: auto;
	max-width: 260px;
	object-fit: contain;
	visibility: visible !important;
	opacity: 1 !important;
	transition: transform 0.2s ease;
}

.cpts-brand-link:hover .cpts-main-logo {
	transform: scale(1.02);
}

/* 2. Desktop Navigation */
.cpts-nav-desktop {
	display: flex;
	align-items: center;
	flex-grow: 1;
	justify-content: center;
}

.cpts-menu-list {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 18px;
}

.cpts-menu-list > li {
	margin: 0;
	padding: 0;
	position: relative;
}

.cpts-menu-list > li > a {
	display: block;
	font-size: 14.5px;
	font-weight: 500;
	color: #1e293b;
	padding: 8px 4px;
	position: relative;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.cpts-menu-list > li > a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2.5px;
	background: var(--cpts-magenta);
	border-radius: 2px;
	transition: width 0.25s ease-in-out;
}

.cpts-menu-list > li > a:hover,
.cpts-menu-list > li.current-menu-item > a {
	color: var(--cpts-magenta);
}

.cpts-menu-list > li > a:hover::after,
.cpts-menu-list > li.current-menu-item > a::after {
	width: 100%;
}

/* Dropdown menu (sub-menu) */
.cpts-menu-list ul.sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--cpts-white);
	min-width: 220px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	padding: 10px 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.2s ease;
	z-index: 100;
	border: 1px solid var(--cpts-border);
}

.cpts-menu-list li:hover > ul.sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.cpts-menu-list ul.sub-menu li a {
	display: block;
	padding: 8px 20px;
	font-size: 14px;
	color: #334155;
}

.cpts-menu-list ul.sub-menu li a:hover {
	background: #f8fafc;
	color: var(--cpts-magenta);
	padding-left: 24px;
}

/* 3. Action Buttons */
.cpts-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

/* Bouton Adhésion (SVG maquette) */
.cpts-btn-adhesion {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 6px;
	box-shadow: 0 3px 10px rgba(217, 40, 128, 0.18);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cpts-btn-adhesion:hover {
	transform: translateY(-1px);
	box-shadow: 0 5px 14px rgba(217, 40, 128, 0.3);
}

.cpts-btn-adhesion-img {
	display: block;
	height: 36px;
	width: auto;
}

/* Bouton Plexus (SVG maquette) */
.cpts-btn-plexus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 6px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.cpts-btn-plexus:hover {
	transform: translateY(-1px);
	opacity: 0.92;
}

.cpts-btn-plexus-img {
	display: block;
	height: 36px;
	width: auto;
}

/* Recherche */
.cpts-header-search {
	position: relative;
	display: flex;
	align-items: center;
}

.cpts-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background 0.2s ease;
}

.cpts-search-toggle:hover,
.cpts-search-toggle[aria-expanded="true"] {
	background: #f1f5f9;
}

.cpts-search-icon {
	display: block;
	width: 20px;
	height: 20px;
}

.cpts-search-panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: min(320px, calc(100vw - 40px));
	background: var(--cpts-white);
	border: 1px solid var(--cpts-border);
	border-radius: 10px;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
	padding: 10px;
	z-index: 1100;
}

.cpts-search-panel[hidden] {
	display: none !important;
}

.cpts-search-form,
.cpts-mobile-search-form {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.cpts-search-input {
	flex: 1;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--cpts-border);
	border-radius: 8px;
	font-family: var(--cpts-font);
	font-size: 14px;
	color: var(--cpts-text-dark);
	background: #fff;
}

.cpts-search-input:focus {
	outline: none;
	border-color: var(--cpts-magenta);
	box-shadow: 0 0 0 3px rgba(217, 40, 128, 0.15);
}

.cpts-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 8px;
	background: var(--cpts-magenta);
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s ease;
}

.cpts-search-submit:hover {
	background: var(--cpts-magenta-hover);
}

.cpts-search-submit img {
	filter: brightness(0) invert(1);
	width: 16px;
	height: 16px;
}

.cpts-mobile-search-form {
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--cpts-border);
}

/* 4. Hamburger Button */
.cpts-burger-button {
	display: none;
	flex-direction: column;
	justify-content: space-around;
	width: 38px;
	height: 38px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 6px;
	z-index: 1001;
	border-radius: 6px;
	transition: background 0.2s ease;
}

.cpts-burger-button:hover {
	background: #f1f5f9;
}

.cpts-burger-bar {
	width: 100%;
	height: 3px;
	background-color: var(--cpts-text-dark);
	border-radius: 3px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	transform-origin: left center;
}

.cpts-burger-button.is-active .cpts-burger-bar:nth-child(1) {
	transform: rotate(45deg) translate(2px, -1px);
	background-color: var(--cpts-magenta);
}

.cpts-burger-button.is-active .cpts-burger-bar:nth-child(2) {
	opacity: 0;
	transform: translateX(-10px);
}

.cpts-burger-button.is-active .cpts-burger-bar:nth-child(3) {
	transform: rotate(-45deg) translate(2px, 1px);
	background-color: var(--cpts-magenta);
}

/* 5. Mobile Drawer */
.cpts-mobile-drawer {
	display: none;
	position: fixed;
	top: var(--cpts-header-height);
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: 999;
}

.cpts-mobile-drawer.is-open {
	opacity: 1;
	visibility: visible;
}

.cpts-mobile-drawer-inner {
	background: var(--cpts-white);
	width: 100%;
	max-height: calc(100vh - var(--cpts-header-height));
	overflow-y: auto;
	padding: 24px 20px 32px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	transform: translateY(-20px);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cpts-mobile-drawer.is-open .cpts-mobile-drawer-inner {
	transform: translateY(0);
}

.cpts-mobile-menu-list {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	border-bottom: 1px solid var(--cpts-border);
	padding-bottom: 16px;
}

.cpts-mobile-menu-list li a {
	display: block;
	font-size: 17px;
	font-weight: 500;
	color: #1e293b;
	padding: 12px 0;
	border-bottom: 1px dashed #f1f5f9;
}

.cpts-mobile-menu-list li a:hover {
	color: var(--cpts-magenta);
	padding-left: 8px;
}

.cpts-mobile-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cpts-btn-mobile {
	width: 100%;
	padding: 0;
	justify-content: center;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (HEADER)
   ========================================================================== */

@media (max-width: 1120px) {
	.cpts-menu-list {
		gap: 12px;
	}
	.cpts-menu-list > li > a {
		font-size: 13.5px;
	}
	.cpts-btn-adhesion-img,
	.cpts-btn-plexus-img {
		height: 32px;
	}
}

@media (max-width: 991px) {
	.cpts-nav-desktop,
	.cpts-header-actions {
		display: none;
	}
	.cpts-burger-button,
	.cpts-mobile-drawer {
		display: flex;
	}
	.cpts-header-inner {
		height: 72px;
	}
	:root {
		--cpts-header-height: 72px;
	}
	.cpts-main-logo {
		height: 48px;
		max-width: 190px;
	}
	.cpts-btn-mobile {
		box-shadow: none;
	}
	.cpts-btn-mobile .cpts-btn-adhesion-img,
	.cpts-btn-mobile .cpts-btn-plexus-img {
		height: 42px;
		width: auto;
		max-width: 100%;
	}
}
