/* dc26-{slug} — entry point PostCSS
   Ajouter les overrides et styles spécifiques au site ici */

/* Sélecteur de langue WPML (barre du haut) : codes à droite, alignés sur une même ligne.
   Cible la classe du bloc WPML lui-même — le bloc n'a pas de classe wp-block-* exploitable par theme.json ;
   ul.horizontal-list.isHorizontal bat la règle inline de WPML. */

.wpml-language-switcher-block ul.horizontal-list.isHorizontal {
	justify-content: flex-end;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
}

.wpml-language-switcher-block li,
.wpml-language-switcher-block li > div,
.wpml-language-switcher-block li > a {
	display: flex;
	align-items: center;
	line-height: 1;
	text-decoration: none;
	color: inherit;
}

.wpml-language-switcher-block [data-wpml='language-item']:first-of-type {
	/* WPML décale le premier item de 5px : sans ça, la langue active est plus basse que les autres. */
	margin-top: 0 !important;
}

.wpml-language-switcher-block a:hover,
.wpml-language-switcher-block a:focus-visible {
	color: var(--wp--preset--color--primary);
}

/* Titre du site : sans soulignement, aligné sur le menu. */

header.wp-block-group .wp-block-site-title a {
	text-decoration: none;
}

/* En-tête : fond blanc plein (le parent le rend transparent au top, donc illisible sur la photo d'en-tête). */

header.wp-block-template-part.is-style-sticky-header > .wp-block-group,
header.wp-block-template-part.is-style-sticky-header.is-top > .wp-block-group,
header.wp-block-template-part.is-style-sticky-header.is-scrolled > .wp-block-group {
	background-color: var(--wp--preset--color--white);
	backdrop-filter: none;
}

header.wp-block-template-part.is-style-sticky-header > header.wp-block-group {
	border-bottom: 1px solid var(--wp--preset--color--gray-light);
}

/* Accueil : le parent fait chevaucher le header sur le hero (marge négative) pour un header transparent.
   Ici le header est blanc plein : il doit rester dans le flux, comme sur les autres pages. */

.home .is-style-sticky-header,
.front-page .is-style-sticky-header {
	margin-bottom: 0;
}

/* ===================================
   MOBILE (< 1024px) — aligné sur le breakpoint burger de dc26-base
   =================================== */

@media (max-width: 1023px) {
	/* En-tête compact : le header est sticky, il ne doit pas manger l'écran. */
	header.wp-block-template-part > .wp-block-group {
		position: relative;
		padding-top: var(--wp--preset--spacing--50) !important;
		padding-bottom: var(--wp--preset--spacing--50) !important;
		gap: var(--wp--preset--spacing--20);
	}

	/* Titre + sous-titre : moins d'air, retours à la ligne équilibrés. */
	header.wp-block-template-part > .wp-block-group > .wp-block-group {
		padding-bottom: 0 !important;
		gap: 0;
	}

	/* Titre + sous-titre alignés à gauche, titre plus petit. */
	header.wp-block-template-part > .wp-block-group > .wp-block-group {
		align-items: flex-start;
	}

	header.wp-block-template-part h1 {
		font-size: calc(var(--wp--preset--font-size--large) * 0.9) !important;
		text-align: left !important;
	}

	header.wp-block-template-part h5 {
		font-size: var(--wp--preset--font-size--medium) !important;
		text-align: left !important;
		text-wrap: balance;
	}

	/* Burger sur la ligne des drapeaux (en haut à droite), plus de rangée dédiée.
	   Les drapeaux se décalent pour lui laisser la place. */
	header.wp-block-template-part .dc26-nav-trigger {
		position: absolute;
		top: var(--wp--preset--spacing--30);
		right: var(--wp--preset--spacing--50);
		color: var(--wp--preset--color--primary);
	}

	header.wp-block-template-part .dc26-nav-trigger__button {
		min-width: 44px;
		min-height: 44px;
	}

	/* Drapeaux : déplacés dans le tiroir sur mobile. */
	header.wp-block-template-part > .wp-block-group > .wpml-language-switcher-block {
		display: none;
	}

	/* Burger à droite : on lui réserve la place côté droit, le texte reste collé à gauche. */
	header.wp-block-template-part > .wp-block-group {
		padding-left: var(--wp--preset--spacing--50) !important;
		padding-right: calc(44px + var(--wp--preset--spacing--50)) !important;
	}

	header.wp-block-template-part .dc26-nav-trigger {
		top: 50%;
		transform: translateY(-50%);
	}

	/* Au scroll (classe .is-scrolled posée par dc26-base) : header plus compact, avec transition douce. */
	header.wp-block-template-part > .wp-block-group,
	header.wp-block-template-part h1,
	header.wp-block-template-part h5 {
		transition: padding 0.25s ease, font-size 0.25s ease;
	}

	header.wp-block-template-part.is-scrolled > .wp-block-group {
		padding-top: var(--wp--preset--spacing--30) !important;
		padding-bottom: var(--wp--preset--spacing--30) !important;
	}

	header.wp-block-template-part.is-scrolled h1 {
		font-size: var(--wp--preset--font-size--medium) !important;
	}

	header.wp-block-template-part.is-scrolled h5 {
		font-size: var(--wp--preset--font-size--small) !important;
	}

	/* Bande blanche entre l'en-tête et la bannière. */
	main.wp-block-group > .wp-block-group.alignfull:first-child {
		padding-top: 0 !important;
	}
}

/* Retours à la ligne équilibrés dans la bannière. */

.wp-block-cover .wp-block-post-title,
.wp-block-cover h1,
.wp-block-cover h2 {
	text-wrap: balance;
}

/* Drawer — menu mobile avec la typo du menu desktop. */

.dc26-nav-drawer .dc26-nav__link {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

/* Ombre du tiroir fermé : fuyait sur le bord droit de l'écran (corrigé dans dc26-base, en attendant son déploiement). */

.dc26-nav-drawer:not(.is-open) {
	box-shadow: none;
}

/* Drapeaux dans le tiroir : sous le menu, alignés à gauche. Absents du tiroir en desktop (tiroir inutilisé). */

.dc26-nav-drawer .wpml-language-switcher-block {
	margin-top: var(--wp--preset--spacing--50);
}

.dc26-nav-drawer .wpml-language-switcher-block ul.horizontal-list.isHorizontal {
	justify-content: flex-start;
}

/* Titre et sous-titre du header : liens vers l'accueil, sans style de lien. */

header.wp-block-template-part h1 a,
header.wp-block-template-part h5 a {
	color: inherit;
	text-decoration: none;
}

/* WooCommerce overrides — dc26-kaws */
