/* =========================================================
   SPHERCRAFT — HEADER GLOBAL
   ========================================================= */


/* =========================================================
   HEADER
   ========================================================= */

.sc-header {
	position: sticky;
	top: 0;
	z-index: 1000;

	width: 100%;

	background: rgba(11, 16, 32, 0.78);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);

	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
}


/* Barre d’administration WordPress */
.admin-bar .sc-header {
	top: 32px;
}


/* =========================================================
   CONTENU DU HEADER
   ========================================================= */

.sc-header .sc-container {
	width: min(
		calc(100% - 48px),
		1560px
	);
}

.sc-header__inner {
	position: relative;

	display: flex;
	align-items: center;

	min-height: 86px;

	gap: 32px;
}


/* =========================================================
   LOGO
   ========================================================= */

.sc-header__brand {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	flex-shrink: 0;

	text-decoration: none;
}

.sc-header__logo {
	display: block;

	width: 58px;
	height: 58px;

	object-fit: contain;

	transition:
		transform 0.3s ease,
		filter 0.3s ease;
}

.sc-header__brand:hover .sc-header__logo {
	transform: scale(1.04);

	filter:
		drop-shadow(
			0 0 18px rgba(233, 79, 216, 0.22)
		);
}


/* =========================================================
   PANNEAU DESKTOP
   Navigation + CTA
   ========================================================= */

.sc-header__panel {
	display: flex;
	align-items: center;

	gap: 28px;

	margin-left: auto;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.sc-header__nav {
	display: flex;
	align-items: center;
}

.sc-header__menu {
	display: flex;
	align-items: center;

	gap: 8px;

	margin: 0;
	padding: 0;

	list-style: none;
}

.sc-header__menu li {
	position: relative;

	margin: 0;
	padding: 0;

	list-style: none;
}

.sc-header__menu a {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 42px;

	padding: 0 16px;

	border-radius: 999px;

	color: var(--sc-muted);

	font-size: 15px;
	font-weight: 500;
	line-height: 1;

	text-decoration: none;

	transition:
		color 0.25s ease,
		background-color 0.25s ease,
		transform 0.25s ease;
}

.sc-header__menu a:hover {
	color: var(--sc-white);

	background: rgba(255, 255, 255, 0.06);
}

.sc-header__menu .current-menu-item > a,
.sc-header__menu .current_page_item > a {
	color: var(--sc-white);

	background: rgba(255, 255, 255, 0.08);
}


/* =========================================================
   SOUS-MENUS
   ========================================================= */

.sc-header__menu .sub-menu {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;

	min-width: 220px;

	margin: 0;
	padding: 10px;

	opacity: 0;
	visibility: hidden;

	list-style: none;

	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 18px;

	background: rgba(15, 20, 39, 0.96);

	box-shadow:
		0 20px 60px rgba(0, 0, 0, 0.30);

	transform: translateY(8px);

	transition:
		opacity 0.2s ease,
		visibility 0.2s ease,
		transform 0.2s ease;
}

.sc-header__menu li:hover > .sub-menu,
.sc-header__menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;

	transform: translateY(0);
}

.sc-header__menu .sub-menu a {
	width: 100%;

	justify-content: flex-start;

	padding: 0 14px;
}


/* =========================================================
   CTA
   ========================================================= */

.sc-header__cta {
	position: relative;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 46px;

	padding: 0 22px;

	flex-shrink: 0;

	overflow: hidden;

	border: 1px solid transparent;
	border-radius: 999px;

	background:
		linear-gradient(
			var(--sc-bg),
			var(--sc-bg)
		) padding-box,
		var(--sc-gradient) border-box;

	color: var(--sc-white);

	font-size: 14px;
	font-weight: 600;
	line-height: 1;

	text-decoration: none;

	box-shadow:
		0 8px 30px rgba(0, 0, 0, 0.18),
		0 0 0 rgba(108, 60, 255, 0);

	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease;
}

.sc-header__cta::before {
	content: "";

	position: absolute;
	inset: 0;

	z-index: -1;

	opacity: 0;

	background: var(--sc-gradient);

	transition: opacity 0.25s ease;
}

.sc-header__cta:hover {
	transform: translateY(-1px);

	box-shadow:
		0 10px 34px rgba(0, 0, 0, 0.24),
		0 0 30px rgba(108, 60, 255, 0.16);
}

.sc-header__cta:hover::before {
	opacity: 0.16;
}


/* =========================================================
   BOUTON MENU MOBILE
   ========================================================= */

.sc-header__toggle {
	display: none;

	position: relative;

	width: 46px;
	height: 46px;

	padding: 0;

	flex-shrink: 0;

	border: 1px solid var(--sc-border);
	border-radius: 14px;

	background: rgba(255, 255, 255, 0.04);

	cursor: pointer;

	transition:
		background-color 0.25s ease,
		border-color 0.25s ease;
}

.sc-header__toggle:hover {
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.18);
}

.sc-header__toggle span {
	position: absolute;
	left: 50%;

	width: 19px;
	height: 2px;

	border-radius: 999px;

	background: var(--sc-white);

	transform: translateX(-50%);

	transition:
		transform 0.25s ease,
		top 0.25s ease;
}

.sc-header__toggle span:first-child {
	top: 18px;
}

.sc-header__toggle span:last-child {
	top: 26px;
}


/* Burger → croix */

.sc-header.is-menu-open
.sc-header__toggle span:first-child {
	top: 22px;

	transform:
		translateX(-50%)
		rotate(45deg);
}

.sc-header.is-menu-open
.sc-header__toggle span:last-child {
	top: 22px;

	transform:
		translateX(-50%)
		rotate(-45deg);
}


/* =========================================================
   ACCESSIBILITÉ — FOCUS
   ========================================================= */

.sc-header a:focus-visible,
.sc-header button:focus-visible {
	outline: 2px solid var(--sc-magenta);
	outline-offset: 4px;
}


/* =========================================================
   SKIP LINK
   ========================================================= */

.sc-skip-link {
	position: fixed;
	top: 12px;
	left: 12px;

	z-index: 99999;

	padding: 12px 18px;

	border-radius: 10px;

	background: var(--sc-white);
	color: var(--sc-bg);

	font-size: 14px;
	font-weight: 600;

	text-decoration: none;

	transform: translateY(-160%);

	transition: transform 0.2s ease;
}

.sc-skip-link:focus {
	transform: translateY(0);
}

.sc-main-content-anchor {
	width: 0;
	height: 0;
}


/* =========================================================
   TABLETTE / MOBILE
   ========================================================= */

@media (max-width: 900px) {

	.sc-header .sc-container {
		width: calc(100% - 40px);
	}

	.sc-header__inner {
		min-height: 76px;

		gap: 16px;
	}

	.sc-header__logo {
		width: 52px;
		height: 52px;
	}


	/* Bouton burger */

	.sc-header__toggle {
		display: block;

		margin-left: auto;
	}


	/* Panneau mobile fermé */

	.sc-header__panel {
		position: absolute;

		top: calc(100% + 12px);
		left: 0;
		right: 0;

		display: flex;
		flex-direction: column;
		align-items: stretch;

		gap: 16px;

		margin: 0;
		padding: 18px;

		opacity: 0;
		visibility: hidden;
		pointer-events: none;

		border: 1px solid rgba(255, 255, 255, 0.10);
		border-radius: 24px;

		background: rgba(13, 18, 36, 0.96);

		-webkit-backdrop-filter: blur(22px);
		backdrop-filter: blur(22px);

		box-shadow:
			0 24px 70px rgba(0, 0, 0, 0.38);

		transform:
			translateY(-8px)
			scale(0.985);

		transform-origin: top center;

		transition:
			opacity 0.25s ease,
			visibility 0.25s ease,
			transform 0.25s ease;
	}


	/* Panneau mobile ouvert */

	.sc-header.is-menu-open
	.sc-header__panel {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;

		transform:
			translateY(0)
			scale(1);
	}


	/* Navigation mobile */

	.sc-header__nav {
		width: 100%;
	}

	.sc-header__menu {
		width: 100%;

		flex-direction: column;
		align-items: stretch;

		gap: 6px;
	}

	.sc-header__menu li {
		width: 100%;
	}

	.sc-header__menu a {
		width: 100%;

		min-height: 48px;

		justify-content: flex-start;

		padding: 0 16px;

		border-radius: 14px;

		font-size: 16px;
	}


	/* Sous-menus mobile */

	.sc-header__menu .sub-menu {
		position: static;

		min-width: 0;

		margin-top: 6px;
		padding: 6px 0 6px 14px;

		opacity: 1;
		visibility: visible;

		border: 0;

		background: transparent;

		box-shadow: none;

		transform: none;
	}


	/* CTA mobile */

	.sc-header__cta {
		width: 100%;

		min-height: 50px;

		margin-top: 2px;
	}
}


/* =========================================================
   BARRE ADMIN WORDPRESS — MOBILE
   ========================================================= */

@media screen and (max-width: 782px) {

	.admin-bar .sc-header {
		top: 46px;
	}
}


/* =========================================================
   PETITS MOBILES
   ========================================================= */

@media (max-width: 480px) {

	.sc-header .sc-container {
		width: calc(100% - 28px);
	}

	.sc-header__inner {
		min-height: 70px;
	}

	.sc-header__logo {
		width: 48px;
		height: 48px;
	}

	.sc-header__toggle {
		width: 44px;
		height: 44px;
	}

	.sc-header__panel {
		top: calc(100% + 8px);

		padding: 14px;

		border-radius: 20px;
	}
}


/* =========================================================
   RÉDUCTION DES ANIMATIONS
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	.sc-header *,
	.sc-header *::before,
	.sc-header *::after,
	.sc-skip-link {
		scroll-behavior: auto !important;

		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}


/* =========================================================
   MENU FLOTTANT V1 (nov. 2026)
   Barre en pilule translucide, liens centrés, CTA dégradé.
   Le passage mobile reste à 900px (header.js).
   Pour revenir en arrière : supprimer ce bloc.
   ========================================================= */

/* La bande du header devient transparente : seule la pilule est visible */
.sc-header {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 12px 0;
}

/* La pilule */
.sc-header .sc-container.sc-header__inner {
  width: min(100% - 32px, 1180px);
  min-height: 62px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(26, 16, 52, 0.78), rgba(40, 14, 52, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.sc-header .sc-header__logo {
  width: 44px;
  height: 44px;
}

/* Bouton de contact en dégradé */
.sc-header .sc-header__cta {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #6C3CFF, #E94FD8);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(233, 79, 216, 0.35);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.sc-header .sc-header__cta:hover,
.sc-header .sc-header__cta:focus-visible {
  color: #FFFFFF;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Ordinateur et tablette paysage : liens centrés dans la pilule */
@media (min-width: 901px) {
  .sc-header .sc-header__panel {
    flex: 1;
    justify-content: space-between;
    margin-left: 24px;
  }

  .sc-header .sc-header__nav {
    flex: 1;
    justify-content: center;
  }

  .sc-header .sc-header__menu {
    gap: 6px;
  }

  .sc-header .sc-header__menu a {
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #C9C3E6;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease, background-color 0.2s ease;
  }

  .sc-header .sc-header__menu a:hover,
  .sc-header .sc-header__menu a:focus-visible {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.06);
  }
}

/* Téléphone : panneau opaque, défilable si l'écran est trop bas */
@media (max-width: 900px) {
  .sc-header .sc-header__panel {
    background: #0D1224;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    max-height: calc(100dvh - 140px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-header .sc-header__cta {
    transition: none;
  }

  .sc-header .sc-header__cta:hover {
    transform: none;
  }
}

/* =========================================================
   SLOGAN À CÔTÉ DU LOGO (15 nov. 2026)
   Positionné en absolu pour ne pas décaler le menu.
   ========================================================= */
.sc-header__brand {
  position: relative;
}

.sc-header__tagline {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--sc-font-text, "Inter", system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #C9CEDB;
  pointer-events: none;
}

/* Largeurs intermédiaires : le menu est trop proche du logo */
@media (min-width: 768px) and (max-width: 1279px) {
  .sc-header__tagline {
    display: none;
  }
}

@media (max-width: 767px) {
  .sc-header__tagline {
    left: calc(100% + 10px);
    font-size: 12px;
  }
}

@media (max-width: 359px) {
  .sc-header__tagline {
    font-size: 11px;
    letter-spacing: 0;
  }
}
