/*
 * template-fullwidth.css — neutralise les wrappers GeneratePress par défaut
 * quand la page utilise le template "Full Width" (templates/page-fullwidth.php).
 *
 * GP wrap par défaut <div class="site grid-container container hfeed"> (max-w ~1200px)
 * + sidebar auto. Sur les pages brand KP on owne tout le viewport.
 *
 * Loaded inconditionnellement — selectors scopés via body.page-template-page-fullwidth
 * OU via body:has(.kp-fullwidth-main) (fallback robuste basé sur la class unique du main).
 */

body.page-template-page-fullwidth #page,
body.page-template-page-fullwidth .site.grid-container,
body.page-template-page-fullwidth .site.container,
body.page-template-page-fullwidth .site-content,
body.page-template-page-fullwidth .content-area,
body.page-template-page-fullwidth .kp-fullwidth-main,
body:has(.kp-fullwidth-main) #page,
body:has(.kp-fullwidth-main) .site.grid-container,
body:has(.kp-fullwidth-main) .site.container,
body:has(.kp-fullwidth-main) .site-content,
body:has(.kp-fullwidth-main) .content-area,
body:has(.kp-fullwidth-main) .kp-fullwidth-main {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
}

body.page-template-page-fullwidth .widget-area,
body.page-template-page-fullwidth #right-sidebar,
body.page-template-page-fullwidth #left-sidebar,
body.page-template-page-fullwidth .sidebar,
body:has(.kp-fullwidth-main) .widget-area,
body:has(.kp-fullwidth-main) #right-sidebar,
body:has(.kp-fullwidth-main) #left-sidebar,
body:has(.kp-fullwidth-main) .sidebar {
	display: none !important;
}

body.page-template-page-fullwidth .site-header,
body.page-template-page-fullwidth #site-navigation,
body.page-template-page-fullwidth #masthead,
body.page-template-page-fullwidth .main-navigation,
body:has(.kp-fullwidth-main) .site-header,
body:has(.kp-fullwidth-main) #site-navigation,
body:has(.kp-fullwidth-main) #masthead,
body:has(.kp-fullwidth-main) .main-navigation {
	display: none !important;
}

body.page-template-page-fullwidth .site-footer,
body:has(.kp-fullwidth-main) .site-footer {
	display: none !important;
}

/* Wrappers WP/GP intérieurs : reset padding/margin SANS toucher aux <article>
 * imbriqués des patterns (ex: <article class="kp-card-*">). */
body.page-template-page-fullwidth .inside-article,
body.page-template-page-fullwidth .entry-content,
body.page-template-page-fullwidth article.hentry,
body:has(.kp-fullwidth-main) .inside-article,
body:has(.kp-fullwidth-main) .entry-content,
body:has(.kp-fullwidth-main) article.hentry {
	padding: 0;
	margin: 0;
}

/* Clip horizontal page-level (modern, ne casse pas sticky descendants). */
body.page-template-page-fullwidth,
body:has(.kp-fullwidth-main) {
	overflow-x: clip;
	/* KP est un site dark : fond near-black continu (cf. tokens.css). */
	background: var(--kp-color-surface-deep, #0a0a0a);
}

/* ------------------------------------------------------------------ *
 * FULL-BLEED — les sections brand débordent en pleine largeur viewport.
 *
 * GP impose un padding sur ses conteneurs (.grid-container 20px,
 * .site-content 30px). Plutôt que lutter en cascade, chaque section brand
 * casse hors du conteneur via la technique 100vw breakout : elle s'étend
 * d'un bord à l'autre du viewport, immunisée contre le padding parent.
 * Le gutter de contenu est alors géré UNIQUEMENT par le padding propre de
 * chaque section (audience = 0 → vrai full-bleed ; autres = 72px Figma).
 *
 * Exclus : navbar (position:fixed) + footer (carte arrondie inset).
 * ------------------------------------------------------------------ */
.kp-hero-home,
.kp-hero-page,
.kp-audience,
.kp-intro,
.kp-mission,
.kp-values,
.kp-reassurance,
.kp-cta,
.kp-promesse,
.kp-scenarios,
.kp-mission-features,
.kp-features-2x2,
.kp-expertise,
.kp-typologies,
.kp-solutions,
.kp-perimeter,
.kp-trust-section,
.kp-contact-block,
.kp-contact-gallery,
.kp-manifeste,
.kp-bureau-gallery,
.kp-team-grid,
.kp-network,
.kp-group-trio,
.kp-guarantees {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
