/*
Theme Name: Solea
Theme URI: https://github.com/dnd/solea-wp
Author: DND Agency
Author URI: https://dnd.fr
Description: Custom full-site editing (FSE) block theme for Solea.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.3
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: solea
*/

/*
 * Breakpoint convention for this theme: there's no preprocessor/build step,
 * so this is documentation, not an enforced value (plain CSS can't use
 * var() inside an @media condition). New `@media (max-width: …)` rules
 * should use one of these three values unless a component has a genuine
 * component-specific need (e.g. blocks/site-nav/style.css's 1180px desktop
 * nav switch):
 *   640px  — mobile
 *   768px  — tablet
 *   960px  — small desktop / large tablet
 */

/*
 * `100vw` includes the scrollbar's own width, so on any page tall enough to
 * scroll it overshoots the real (scrollbar-excluded) viewport — this is what
 * caused full-bleed sections to sit ~scrollbar-width/2 to the left of
 * viewport-anchored elements like the sticky header's logo badge (fixed via
 * `.solea-logo-badge`'s own `left`, not `.full-bleed`). The actual pixel
 * value is set on the root element by the inline script in functions.php
 * (wp_head, priority 1) — it can't be derived in plain CSS because a
 * percentage stored in a custom property only resolves once substituted into
 * a real property, against THAT property's own containing block, not against
 * whatever element defined the custom property.
 */
:root {
	--solea-scrollbar-width: 0px;
}

/*
 * Full-bleed escape shared by every edge-to-edge section (solea/hero-panels,
 * solea/service-hero, solea/pricing-tabs, solea/faq-accordion, the site
 * footer's bottom bar). !important is required for blocks stamped with the
 * "alignfull" class: theme.json's useRootPaddingAwareAlignments zeroes out
 * `.has-global-padding > .alignfull`'s margins, which otherwise wins on
 * specificity and silently cancels the negative margins below — see
 * blocks/hero-panels/style.css for the full rationale. Non-alignfull callers
 * (site-footer) don't need the override but are unaffected by it.
 */
.full-bleed {
	width: calc(100vw - var(--solea-scrollbar-width)) !important;
	max-width: calc(100vw - var(--solea-scrollbar-width)) !important;
	margin-left: calc(50% - 50vw + var(--solea-scrollbar-width) / 2) !important;
	margin-right: calc(50% - 50vw + var(--solea-scrollbar-width) / 2) !important;
}
