/*
Theme Name: URLR
Theme URI: https://urlr.me
Author: Hugo
Author URI: https://urlr.me
Description: FSE block theme for URLR.
Version: 3.38
License: Proprietary
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: urlr
*/

/* Base reset — complements block styles */
* {
    box-sizing: border-box;
}

/* Utility: cap a block to half width, full width on mobile.
   Apply via the block's "Additional CSS class(es)" field in the editor —
   core blocks have no built-in width control for Stack/Flow layouts. */
.has-half-width {
    max-width: 50%;
}

@media (max-width: 782px) {
    .has-half-width {
        max-width: 100%;
    }
}

/* Utility: cap a block to 70% width, full width on mobile. */
.has-70-width {
    max-width: 70%;
}

@media (max-width: 782px) {
    .has-70-width {
        max-width: 100%;
    }
}

/* Utility: cap a block to 60% width, full width on mobile. */
.has-60-width {
    max-width: 60%;
}

@media (max-width: 782px) {
    .has-60-width {
        max-width: 100%;
    }
}

/* Utility: vertically center a Grid layout's children in their tracks.
   Apply via the block's "Additional CSS class(es)" field in the editor —
   WP's grid layout exposes no vertical alignment control in the UI. */
.urlr-grid-center-v {
    align-items: center;
}

/* overflow-x: hidden lives on body only, not html too: when only one of
   an element's overflow-x/overflow-y is non-visible, the other is
   forced to 'auto' (CSS Overflow spec) — with it on BOTH html and body,
   each independently became its own scroll container, and that extra
   nested scroll container was silently breaking position: sticky for
   descendants (computed style said "sticky", but it behaved exactly
   like static — verified by inspecting the live post sidebar). */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* Inline images can sit directly in a p or nested in inline elements (strong, em...). */
p img {
    vertical-align: middle;
}

pre,
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: var(--wp--preset--color--surface);
    border-radius: 0.375rem;
}

pre {
    padding: 1rem;
    overflow-x: auto;
}

code {
    padding: 0.125rem 0.25rem;
    font-size: 0.875em;
}

::selection {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary-contrast);
}

/* Sticky footer: grid (not flex) on .wp-site-blocks — its 5 direct
   children are always header-locale-banner, header-banner, header, main,
   footer-wrapper, in that order (see templates/*.html), so an explicit
   row per child lets main (row 4) take the remaining space via 1fr.
   This used to be flexbox (flex-direction: column, main flex-grow: 1),
   but a flex item sized by flex-grow (an auto/algorithmic height, not a
   definite one) breaks position: sticky for descendants nested deep
   inside it — however deeply nested (e.g. the post sidebar in
   templates/single.html) — in both Chrome and Firefox. Grid's 1fr row
   track doesn't have this problem. */
body {
    min-height: 100dvh;
}

.wp-site-blocks {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    /* The implicit column track is auto-sized, and a grid item's default
       min-width is auto: any content with an intrinsic min-content wider
       than the viewport (an image grid cell, a nowrap flex row) then
       stretched main — and the header/footer with it — past the viewport
       and created a horizontal page gutter. minmax(0, 1fr) pins the
       single column to the viewport instead. */
    grid-template-columns: minmax(0, 1fr);
}

.wp-site-blocks > * {
    margin-block-start: 0;
}

/* Sticky header, keyed to the header tag rather than a position: the
   header-locale-banner part was later inserted as a first child of
   .wp-site-blocks, which silently shifted :nth-child(2) from the header
   to the promo banner above it — making the banner follow the scroll
   instead of the header. */
.wp-site-blocks > header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--wp--preset--color--secondary);
}

/* Transparent-at-rest header (overlay style): when JS is running
   (assets/js/header.js adds .urlr-transparent-header to <html> and
   publishes --urlr-header-h), the header drops its background at rest so
   the hero behind it (slid up below) shows through, and picks the solid
   secondary background back up as soon as the page is scrolled. No-JS
   visitors keep the solid header above. */
html.urlr-transparent-header .wp-site-blocks > header.wp-block-template-part {
    background: transparent;
    transition: background-color 0.2s ease;
}

html.urlr-transparent-header .wp-site-blocks > header.wp-block-template-part.is-scrolled {
    background: var(--wp--preset--color--secondary);
}

/* Heroes slide up behind the header so their background (per-page
   gradient, solid color) fills the header band. Page heroes are the first
   backgrounded group of the post content (4rem authored top padding);
   single posts and comparisons use the .urlr-post-hero block (3rem). Top
   padding is re-issued with the header height added so hero content keeps
   its exact on-screen position, clear of the nav — hence the !important
   overriding the authored inline value: this is a design rule of the
   overlay header, not an authoring choice. Pages without a hero keep
   their content below the header as today. */
html.urlr-transparent-header .wp-site-blocks > main .wp-block-post-content > .has-background:first-child {
    margin-top: calc(-1 * var(--urlr-header-h, 0px)) !important;
    padding-top: calc(var(--wp--preset--spacing--80) + var(--urlr-header-h, 0px)) !important;
}

/* Page hero (first backgrounded group of the post content): grids inside it
   (feature pages /liens/, /utm/, ... and the home hero) hold two columns
   side by side, so center both columns vertically against each other. The
   tool boxes carry align-self: start against grid-row stretching, so
   re-center them when they are a direct column of the hero grid. Not gated
   on html.urlr-transparent-header: unlike the slide-up above, centering
   must also apply for no-JS visitors. */
.wp-site-blocks > main .wp-block-post-content > .has-background:first-child .is-layout-grid {
    align-items: center;
}

.wp-site-blocks > main .wp-block-post-content > .has-background:first-child .is-layout-grid > .urlr-shortener,
.wp-site-blocks > main .wp-block-post-content > .has-background:first-child .is-layout-grid > .urlr-utm-generator,
.wp-site-blocks > main .wp-block-post-content > .has-background:first-child .is-layout-grid > .urlr-qrcode-generator {
    align-self: center;
}

html.urlr-transparent-header .wp-site-blocks > main > .urlr-post-hero {
    margin-top: calc(-1 * var(--urlr-header-h, 0px)) !important;
    padding-top: calc(var(--wp--preset--spacing--70) + var(--urlr-header-h, 0px)) !important;
}

/* Reset figure margins and padding from core/image */
figure.wp-block-image {
    margin: 0;
    padding: 0;
}

figure.wp-block-image img {
    display: block;
    margin: 0;
    padding: 0;
}

/* Keep button labels on one line on desktop so constrained containers
   (comparison table cells, flex rows) can't squeeze a label and break it
   mid-word. Below 782px labels may wrap between words again. */
.wp-block-button__link,
.wp-element-button {
    white-space: nowrap;
}

@media (max-width: 782px) {
    .wp-block-button__link,
    .wp-element-button {
        white-space: normal;
    }
}

/* Normalize outline button to match fill: 1px border, same padding */
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-outline {
    border-width: 1px;
    padding: 0.5rem 1.5rem;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Hover for contour (outline) buttons: light surface fill, text and
   border colors unchanged */
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link.is-style-outline:hover {
    background-color: var(--wp--preset--color--brand-domain);
    color: var(--wp--preset--color--contrast);
    border-color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-urlr-outline-white > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-urlr-outline-white {
    transition: background-color 0.5s ease, color 0.5s ease;
}

.wp-block-button.is-style-urlr-outline-white > .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link.is-style-urlr-outline-white:hover {
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast);
    border-color: var(--wp--preset--color--base);
}

/* Désactivé (is-style-urlr-disabled) button: the theme.json variation
   (styles/button/urlr-disabled.json) sets the dimmed colors; here we
   remove the interaction affordances. pointer-events: none also kills
   :hover, so no hover override is needed. */
.wp-block-button.is-style-urlr-disabled > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-urlr-disabled {
    pointer-events: none;
    cursor: default;
}

/* Hover for the primary (fill) button comes from the theme.json button
   element :hover (primary-hover background, text color unchanged). */
.wp-block-button.is-style-fill > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-fill {
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Classic footer: stairs shape at top, same as trust-us bottom stairs.
   Painted with contrast color (the CTA bg above) at the footer's top edge. */
.urlr-footer-wrapper {
    overflow: visible;
}

.urlr-footer-wrapper > .wp-block-template-part > .wp-block-group.has-background {
    position: relative;
    overflow: visible;
}

.urlr-footer-wrapper > .wp-block-template-part > .wp-block-group.has-background::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    pointer-events: none;

    --s: 1.25;
    --w: calc(32px * var(--s));
    --h: calc(28px * var(--s));
    --c: var(--wp--preset--color--contrast);

    height: var(--h);
    background: var(--c);

    --stair-left:  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 28'><path d='M0 0H32A8 8 0 0 0 24 8V12A8 8 0 0 1 16 20H8A8 8 0 0 0 0 28Z'/></svg>");
    --stair-right: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 28'><path d='M32 0H0A8 8 0 0 1 8 8V12A8 8 0 0 0 16 20H24A8 8 0 0 1 32 28Z'/></svg>");

    -webkit-mask: var(--stair-left) left top / var(--w) var(--h) no-repeat,
                  var(--stair-right) right top / var(--w) var(--h) no-repeat;
            mask: var(--stair-left) left top / var(--w) var(--h) no-repeat,
                  var(--stair-right) right top / var(--w) var(--h) no-repeat;
}

/* Trust-us section: inverted radius top corners + stairs bottom corners.
   Shapes painted on neighboring sections using trust-us bg color (contrast). */

/* Previous sibling bottom: inverted radius (concave corners at top of trust-us) */
*:has(+ .trust-us) {
    position: relative;
}

*:has(+ .trust-us)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32px;
    pointer-events: none;
    background:
        radial-gradient(circle at 100% 0%, transparent 32px, var(--wp--preset--color--contrast) calc(32px + .5px))
            left bottom / 32px 32px no-repeat,
        radial-gradient(circle at 0% 0%, transparent 32px, var(--wp--preset--color--contrast) calc(32px + .5px))
            right bottom / 32px 32px no-repeat;
}

/* Next sibling top: stairs shape (at bottom of trust-us) */
/* Next sibling top: stairs shape (at bottom of trust-us) */
.trust-us + * {
    position: relative;
}

.trust-us + *::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    pointer-events: none;

    /* Scale factor: 1 = 32 × 28px per side */
    --s: 1.25;
    --w: calc(32px * var(--s));
    --h: calc(28px * var(--s));
    --c: var(--wp--preset--color--contrast);

    height: var(--h);
    background: var(--c);

    --stair-left:  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 28'><path d='M0 0H32A8 8 0 0 0 24 8V12A8 8 0 0 1 16 20H8A8 8 0 0 0 0 28Z'/></svg>");
    --stair-right: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 28'><path d='M32 0H0A8 8 0 0 1 8 8V12A8 8 0 0 0 16 20H24A8 8 0 0 1 32 28Z'/></svg>");

    -webkit-mask: var(--stair-left) left top / var(--w) var(--h) no-repeat,
                  var(--stair-right) right top / var(--w) var(--h) no-repeat;
            mask: var(--stair-left) left top / var(--w) var(--h) no-repeat,
                  var(--stair-right) right top / var(--w) var(--h) no-repeat;
}

/* ── Trust-us logo marquee (homepage) ─────────────────────────
   The trust-us band's static logo grid becomes an infinite horizontal
   scroll. assets/js/trust-us-marquee.js moves the grid tiles into a
   runtime viewport + track and clones the set; one set's width is set
   as --trust-us-marquee-shift so the keyframe loops seamlessly however
   many logo blocks the editor holds. Without JS (or with reduced
   motion) the static grid simply stays. */
.trust-us-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
            mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}

.trust-us .trust-us-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    animation: trust-us-marquee-scroll var(--trust-us-marquee-duration, 40s) linear infinite;
}

.trust-us .trust-us-marquee-track > * {
    flex: 0 0 auto;
    width: 12rem;
    height: 7rem;
    margin-right: var(--wp--preset--spacing--70);
}

/* Tiles size to their card, not to the logo's natural width (some logos
   are 1000px+ wide SVGs, which would blow the tile up); the marquee
   shift is measured from the rendered tiles, so fixed tile dimensions
   also keep the loop seamless before the images finish loading. The
   fixed height makes every card the same height; the figure fills the
   card's content box so the logo can use the full card size. */
.trust-us .trust-us-marquee-track figure {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

.trust-us .trust-us-marquee-track img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.trust-us-marquee:hover .trust-us-marquee-track,
.trust-us-marquee:focus-within .trust-us-marquee-track {
    animation-play-state: paused;
}

@keyframes trust-us-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-1 * var(--trust-us-marquee-shift, 50%))); }
}

@media (prefers-reduced-motion: reduce) {
    .trust-us .trust-us-marquee-track {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        animation: none;
    }
}

/* ── Mega menu (hover and click triggered panels) ───────────── */

.urlr-header-nav {
    position: relative;
}

/* Desktop trigger nav — hidden on mobile */
.urlr-mega-nav {
    display: flex;
    align-items: center;
}

.urlr-mega-nav p {
    margin: 0;
}

.urlr-mega-nav a {
    text-decoration: none;
    color: var(--wp--preset--color--contrast);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    cursor: pointer;
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
    border-radius: 6px;
    transition: background 0.5s ease;
}

.urlr-mega-nav a:hover {
    background: #E6EFF5;
}

.mega-trigger-wrap a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.mega-trigger-wrap a::after {
    content: "";
    display: inline-block;
    width: 0.3rem;
    height: 0.3rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.5s ease;
}

.mega-trigger-wrap a[aria-expanded="true"]::after {
    transform: rotate(-135deg) translateY(1px);
}

/* Mega panels — absolute, overlay page content */
.mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: var(--wp--preset--spacing--30);
    border-radius: 24px;
    border: 1px solid #E6EFF5;
    box-shadow: 0px 0px 40px 0px #2A18201A, 0px 0px 4px 0px #2A18201F;
    overflow: hidden;
    display: none;
    z-index: 200;
}

.mega-panel.is-open {
    display: block;
}

/* Cards inside panels */
.mega-card {
    position: relative;
    border-radius: 10px;
    border: 1px solid rgba(42, 24, 32, 0.08);
    background: var(--wp--preset--color--base);
    transition: background 0.5s ease;
    height: 100%;
}

.mega-card:hover {
    background: var(--wp--preset--color--surface);
}

/* Coming-soon card: no stretched link underneath, so suppress the
   hover surface and keep the default cursor. Same (0,2,0) as the
   :hover rule but later in the file, so it wins. */
.mega-card--disabled,
.mega-card--disabled:hover {
    background: var(--wp--preset--color--base);
    cursor: default;
}

.mega-card a {
    text-decoration: none;
    font-weight: 600;
    color: var(--wp--preset--color--contrast);
}

.mega-card h3 {
    margin: 0;
}

.mega-card p {
    margin: 0;
}

/* "Bientôt" pill next to a card title — same shape as the billing
   badge (.urlr-billing-badge): bordered pill, one size under body text.
   background: none lets it sit on the card's hover surface unchanged. */
.mega-card-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.375rem;
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--wp--preset--color--primary);
    border-radius: 999px;
    background: none;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--wp--preset--color--contrast);
    white-space: nowrap;
}

/* Stretched-link: whole card clickable via heading link */
.mega-card-link {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

.mega-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

/* Card icons */
.mega-card-icon {
    display: block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}

/* Mega panel footer card icon — left-aligned, vertically centered */
.mega-card-footer .mega-card-icon {
    margin-bottom: 0;
    align-self: center;
}

/* Big-card bottom preview image. The card itself (mega-card-media) has no
   padding: the text group carries it, and the figure is a direct child of the
   card so it spans the full card width and sits flush against the bottom edge.
   margin-top: auto pins it to the card bottom (cards stretch to equal height). */
.mega-card .mega-card-image {
    margin: auto 0 0;
    width: 100%;
}

.mega-card .mega-card-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0 0 10px 10px;
}

/* Icon-left link items (Solutions, Sécurité, Ressources panels) — no card chrome */
.mega-link-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--20);
    padding: var(--wp--preset--spacing--20);
    border-radius: 8px;
    transition: background 0.5s ease;
}

.mega-link-item:hover {
    background: var(--wp--preset--color--surface);
}

.mega-link-item .mega-card-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0;
}

/* Solutions panel icons are larger than other mega-link-item icons */
.mega-panel-solutions .mega-link-item .mega-card-icon {
    width: 40px;
    height: 40px;
}

/* External-link indicator */
.mega-link-external-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mega-link-item a {
    text-decoration: none;
    font-weight: 600;
    color: var(--wp--preset--color--contrast);
}

.mega-link-item h3,
.mega-link-item p {
    margin: 0;
}

/* Small eyebrow title above a mega panel column's link list */
.mega-column-title {
    margin: 0 0 var(--wp--preset--spacing--20);
    padding: 0 var(--wp--preset--spacing--20);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2A1820;
}

/* Sécurité panel third column — promo card, full-bleed to the panel's
   top/right/bottom edges (clipped by the panel's own border-radius).
   Absolutely positioned against the column (already position:relative from
   the divider rule below) so its size isn't a percentage of a flex-stretched
   ancestor — top/right/bottom/left fully determine its box, nothing to
   mis-resolve. */
.mega-securite-promo {
    position: absolute;
    top: calc(-1 * var(--wp--preset--spacing--50));
    right: calc(-1 * var(--wp--preset--spacing--60));
    bottom: calc(-1 * var(--wp--preset--spacing--50));
    left: 0;
    margin: 0;
    border-radius: 0;
    transition: background-color 0.5s ease;
}

/* Matches the .mega-card:hover treatment; !important needed since the
   block's own has-secondary-background-color class carries the same
   specificity WP gives its color utility classes. */
.mega-securite-promo:hover {
    background-color: var(--wp--preset--color--surface) !important;
}

.mega-securite-promo-image {
    display: block;
    width: 100%;
    height: 150px;
    max-height: 150px;
    border-radius: 8px;
    margin-bottom: var(--wp--preset--spacing--30);
    object-fit: cover;
}

.mega-securite-promo .mega-link-item .mega-card-icon {
    width: 16px;
    height: 16px;
}

/* .mega-link-item is position:relative elsewhere (containing the
   stretched .mega-card-link::after), which would otherwise clip the
   clickable area to just the icon+label row instead of the whole promo
   panel. Neutralize it here so the ::after escapes up to
   .mega-securite-promo (already position:absolute), covering the full
   card including the image above the link. */
.mega-securite-promo .mega-link-item {
    position: static;
}

/* Vertical divider between mega panel columns (Solutions, Sécurité, Ressources) */
/* Uses an inset pseudo-element rather than border-left so the line reaches the
   panel's full padded height, not just the column content's height. */
.mega-panel-solutions > .wp-block-columns > .wp-block-column:not(:first-child),
.mega-panel-securite > .wp-block-columns > .wp-block-column:not(:first-child),
.mega-panel-ressources > .wp-block-columns > .wp-block-column:not(:first-child) {
    position: relative;
    padding-left: var(--wp--preset--spacing--40);
}

.mega-panel-solutions > .wp-block-columns > .wp-block-column:not(:first-child)::before,
.mega-panel-securite > .wp-block-columns > .wp-block-column:not(:first-child)::before,
.mega-panel-ressources > .wp-block-columns > .wp-block-column:not(:first-child)::before {
    content: "";
    position: absolute;
    top: calc(-1 * var(--wp--preset--spacing--50));
    bottom: calc(-1 * var(--wp--preset--spacing--50));
    left: 0;
    width: 1px;
    background: #E6EFF5;
}

/* Card is its own visual separator — drop the column divider on the last column.
   min-height reserves room for the promo card even though it's absolutely
   positioned (out of flow, so it wouldn't otherwise count toward the row's
   height) — without this the row stretches to match columns 1/2 only, which
   can be shorter than the card's own content, clipping it. */
.mega-panel-securite > .wp-block-columns > .wp-block-column:last-child {
    padding-left: 0;
    min-height: 220px;
}

.mega-panel-securite > .wp-block-columns > .wp-block-column:last-child::before {
    display: none;
}

/* Mega panel footer — #FBFBF8 background, breaks out of panel padding */
.mega-panel-footer {
    max-width: none !important;
    width: calc(100% + var(--wp--preset--spacing--50) * 2) !important;
    margin-inline: 0 !important;
    margin-left: calc(-1 * var(--wp--preset--spacing--50)) !important;
    margin-right: calc(-1 * var(--wp--preset--spacing--50)) !important;
}

/* Ressources panel uses 60px horizontal padding instead of 50px */
.mega-panel-ressources .mega-panel-footer {
    width: calc(100% + var(--wp--preset--spacing--60) * 2) !important;
    margin-left: calc(-1 * var(--wp--preset--spacing--60)) !important;
    margin-right: calc(-1 * var(--wp--preset--spacing--60)) !important;
}

/* Mobile hamburger toggle — hidden on desktop */
.urlr-mobile-toggle {
    display: none !important;
}

.urlr-mobile-toggle button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--wp--preset--color--contrast);
    padding: 0;
    line-height: 1;
}

/* Mobile fullscreen menu — hidden on desktop */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 300;
    overflow-y: auto;
    flex-direction: column;
    margin: 0 !important;
    max-width: none !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.mobile-menu::-webkit-scrollbar {
    display: none;
}

.mobile-menu > .wp-block-group,
.mobile-menu {
    margin-block-start: 0;
}

.mobile-menu.is-open {
    display: flex;
}

.mobile-menu-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(42, 24, 32, 0.08);
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100%;
    box-sizing: border-box;
}

.mobile-menu-bar p {
    margin: 0;
}

.mobile-menu-bar button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--wp--preset--color--contrast);
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}

.mobile-menu-bar button img,
.urlr-mobile-toggle button img {
    display: block;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--30);
    box-sizing: border-box;
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100%;
}

.mobile-menu-links p,
.mobile-submenu p {
    margin: 0;
}

.mobile-submenu {
    width: 100%;
}

.mobile-submenu-trigger {
    margin: 0;
    width: 100%;
}

.mobile-menu-links a {
    text-decoration: none;
    color: var(--wp--preset--color--contrast);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--medium);
}

.mobile-submenu-trigger a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding-right: 4px;
}

.mobile-submenu-trigger a::after {
    content: "";
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.5s ease;
    margin-left: 0.5rem;
}

.mobile-submenu-trigger a[aria-expanded="true"]::after {
    transform: rotate(-135deg) translateY(1px);
}

.mobile-submenu-panel {
    display: none;
    flex-direction: column;
    gap: var(--wp--preset--spacing--20);
}

.mobile-submenu-panel.is-open {
    display: flex;
}

.mobile-submenu-panel p {
    margin: 0;
}

.mobile-submenu-panel a,
.mobile-submenu-panel .mobile-submenu-label {
    font-weight: 400;
    font-size: var(--wp--preset--font-size--small);
}

/* Column, not row: Connexion and S'inscrire stack below each other (and
   below the Démo link) instead of sitting side by side. flex-start keeps
   the text links at their content width. */
.mobile-menu-actions .wp-block-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--20);
}

.mobile-menu-actions {
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100%;
    box-sizing: border-box;
}

/* ── FAQ (urlr/faq pattern) ─────────────────────────────────── */

.urlr-faq .wp-block-details {
    border-bottom: 1px solid var(--wp--preset--color--contrast);
    margin-block: 0;
}

.urlr-faq .wp-block-details > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--40);
    padding: var(--wp--preset--spacing--50) 0;
    font-weight: 600;
    font-size: var(--wp--preset--font-size--medium);
}

.urlr-faq .wp-block-details > summary::-webkit-details-marker {
    display: none;
}

.urlr-faq .wp-block-details > summary::after {
    content: "";
    display: inline-block;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background-image: url("assets/icons/plus.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.5s ease;
}

.urlr-faq .wp-block-details[open] > summary::after {
    transform: rotate(45deg);
}

.urlr-faq .wp-block-details p {
    margin-top: 0;
    padding-bottom: var(--wp--preset--spacing--50);
    color: var(--wp--preset--color--contrast);
    opacity: 0.85;
}

/* ── Shared form feedback messages (shortener + newsletter) ─── */

.urlr-form-error,
.urlr-form-success {
    margin-top: var(--wp--preset--spacing--30);
    font-size: var(--wp--preset--font-size--small);
}

.urlr-form-error[hidden],
.urlr-form-success[hidden] {
    display: none;
}

.urlr-form-error {
    color: #dc2626;
}

.urlr-form-success {
    color: #16a34a;
}

/* Honeypot: kept in normal flow (not display:none) so it still catches
   bots that check computed visibility, just moved off-screen. */
.urlr-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    left: -9999px;
}

/* ── Tool box titles (shortener / UTM / QR code) ──────────── */

.urlr-tool-title {
    margin: 0 0 var(--wp--preset--spacing--30);
    font-family: var(--wp--preset--font-family--body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp--preset--color--contrast);
}

/* The QR code card is a two-column grid; its title spans both columns.
   The card's row-gap would add spacing-40 below the title on top of its
   own margin, so the title's margin is zeroed and the row gap carries
   the spacing instead (same rhythm as the other two boxes). */
.urlr-qrcode-generator-card .urlr-tool-title {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

/* Inner card of the shortener / UTM boxes: same nested look as the
   QR code card, but in a light tint of the links hue (#E4DF67). */
.urlr-shortener-card,
.urlr-utm-generator-card {
    background: #f8f7dc;
    border-radius: 0.5rem;
    padding: var(--wp--preset--spacing--40);
}

/* ── URL shortener form ────────────────────────────────────── */

.urlr-shortener {
    width: 100%;
    /* Grid/flex item: without this it stretches to the full height of
       its grid row (e.g. the /liens/ two-column layout, where the
       right column is taller) instead of hugging the form. No effect
       in normal block flow; width stays 100% via the rule above. */
    align-self: start;
    background: rgba(228, 223, 103, 0.08);
    border: 1px solid rgba(228, 223, 103, 0.5);
    border-radius: 12px;
    padding: 1rem;
}

.urlr-shortener-input-wrap {
    position: relative;
    width: 100%;
}

.urlr-shortener-input,
input.urlr-shortener-input {
    width: 100%;
    border: 1px solid rgba(42, 24, 32, 0.15);
    border-radius: 0.5rem;
    padding: 1rem 8rem 1rem 1rem;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast);
    background: var(--wp--preset--color--base);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.urlr-shortener-input::placeholder {
    color: rgba(42, 24, 32, 0.4);
}

.urlr-shortener-button {
    position: absolute;
    top: 0.375rem;
    bottom: 0.375rem;
    right: 0.375rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--wp--preset--color--links);
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--preset--font-family--body);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    padding: 0 1.25rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.5s ease;
}

.urlr-shortener-button:hover {
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
}

.urlr-shortener-button:disabled {
    opacity: 0.6;
    cursor: default;
}

@media (max-width: 782px) {
    /* Phones: swap the button label for a scissors emoji. The text stays
       in the DOM at font-size 0, so it remains the button's accessible
       name for screen readers. */
    .urlr-shortener-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
        padding: 0 0.875rem;
    }

    .urlr-shortener-button::after {
        content: "✂️";
        font-size: 0.875rem;
        line-height: 1;
        /* Solid dark silhouette instead of the colored emoji; on hover the
           button colors swap, so invert the silhouette there too. */
        filter: brightness(0);
    }

    .urlr-shortener-button:hover::after {
        filter: brightness(0) invert(1);
    }

    /* The icon-only button is narrower: reserve less space for it on the
       input's right. */
    .urlr-shortener-input,
    input.urlr-shortener-input {
        padding-right: 3.25rem;
    }
}

.urlr-shortener-result,
.urlr-utm-generator-result {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--30);
    margin-top: var(--wp--preset--spacing--30);
    padding: var(--wp--preset--spacing--40);
    background: var(--wp--preset--color--surface);
    border-radius: 0.5rem;
}

.urlr-shortener-result[hidden],
.urlr-utm-generator-result[hidden] {
    display: none;
}

.urlr-shortener-link,
.urlr-utm-generator-link {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    word-break: break-all;
}

.urlr-shortener-link:hover,
.urlr-utm-generator-link:hover {
    text-decoration: underline;
}

.urlr-shortener-copy,
.urlr-utm-generator-copy {
    background: none;
    border: 1px solid rgba(42, 24, 32, 0.15);
    border-radius: 0.375rem;
    padding: 0.25rem 0.75rem;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.5s ease;
}

.urlr-shortener-copy:hover,
.urlr-utm-generator-copy:hover {
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
}

/* ── UTM generator form ───────────────────────────────────── */

.urlr-utm-generator {
    width: 100%;
    /* Same as .urlr-shortener: don't stretch to the grid row's height. */
    align-self: start;
    background: rgba(228, 223, 103, 0.08);
    border: 1px solid rgba(228, 223, 103, 0.5);
    border-radius: 12px;
    padding: 1rem;
}

.urlr-utm-generator-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--wp--preset--spacing--40);
}

.urlr-utm-generator-field-wide {
    grid-column: 1 / -1;
}

.urlr-utm-generator-actions {
    grid-column: 1 / -1;
}

.urlr-utm-generator-label,
.urlr-qrcode-generator-label {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    color: var(--wp--preset--color--contrast);
}

.urlr-utm-generator-input,
input.urlr-utm-generator-input,
.urlr-qrcode-generator-input,
input.urlr-qrcode-generator-input,
select.urlr-qrcode-generator-select {
    width: 100%;
    border: 1px solid rgba(42, 24, 32, 0.15);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-family: var(--wp--preset--font-family--body);
    font-weight: normal;
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast);
    background: var(--wp--preset--color--base);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.urlr-utm-generator-input::placeholder {
    color: rgba(42, 24, 32, 0.4);
    opacity: 1;
}

.urlr-utm-generator-button {
    border: none;
    border-radius: 0.375rem;
    background: var(--wp--preset--color--links);
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--preset--font-family--body);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.5s ease;
}

.urlr-utm-generator-button:hover {
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
}

@media (max-width: 782px) {
    .urlr-utm-generator-form {
        grid-template-columns: 1fr;
    }
}

/* ── QR code generator ────────────────────────────────────── */

.urlr-qrcode-generator {
    width: 100%;
    /* Same as .urlr-shortener: don't stretch to the grid row's height. */
    align-self: start;
    background: rgba(255, 119, 97, 0.05);
    border: 1px solid rgba(255, 214, 208, 1);
    border-radius: 12px;
    padding: 1rem;
}

.urlr-qrcode-generator-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--wp--preset--spacing--40);
    row-gap: var(--wp--preset--spacing--30);
    align-items: center;
    background: rgba(255, 241, 239, 1);
    border-radius: 0.5rem;
    padding: var(--wp--preset--spacing--40);
}

.urlr-qrcode-generator-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
}

.urlr-qrcode-generator-qrcode {
    border: 1px solid rgba(230, 239, 245, 1);
    border-radius: 8px;
    line-height: 0;
}

.urlr-qrcode-generator-fields {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--40);
}

/* Input and select must render at the exact same height: UA defaults
   differ between the two, so pin both. The select also needs a custom
   chevron since appearance: none removed the native arrow. */
.urlr-qrcode-generator-input,
input.urlr-qrcode-generator-input,
select.urlr-qrcode-generator-select {
    height: 3rem;
    line-height: 1.5;
}

/* The whole card is coral-themed, so its focus treatment is coral too —
   an exception to the global yellow. */
.urlr-qrcode-generator-input:focus,
input.urlr-qrcode-generator-input:focus,
select.urlr-qrcode-generator-select:focus {
    outline: none;
    border-color: rgba(255, 133, 113, 1);
    box-shadow: 0 0 0 3px rgba(255, 133, 113, 0.25);
}

select.urlr-qrcode-generator-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%232A1820' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.25rem;
    cursor: pointer;
}

.urlr-qrcode-generator-download {
    border: none;
    border-radius: 0.375rem;
    background: rgba(255, 133, 113, 1);
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--preset--font-family--body);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.5s ease;
}

.urlr-qrcode-generator-download:hover {
    background: rgba(255, 105, 82, 1);
}

.urlr-qrcode-generator-download:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 133, 113, 0.25);
}

@media (max-width: 782px) {
    .urlr-qrcode-generator-card {
        grid-template-columns: 1fr;
    }
}

/* ── Newsletter form (footer) ──────────────────────────────── */

.urlr-newsletter-form {
    width: 100%;
    max-width: 24rem;
}

.urlr-newsletter-input-wrap {
    position: relative;
    width: 100%;
}

.urlr-newsletter-input,
input.urlr-newsletter-input {
    width: 100%;
    border: 1px solid rgba(42, 24, 32, 0.15);
    border-radius: 0.5rem;
    padding: 1rem 7rem 1rem 1rem;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast);
    background: var(--wp--preset--color--base);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.urlr-newsletter-input::placeholder {
    color: rgba(42, 24, 32, 0.4);
}

.urlr-newsletter-button {
    position: absolute;
    top: 0.375rem;
    bottom: 0.375rem;
    right: 0.375rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--wp--preset--color--links);
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--preset--font-family--body);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    padding: 0 1.25rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.5s ease;
}

.urlr-newsletter-button:hover {
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
}

.urlr-newsletter-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: var(--wp--preset--spacing--30);
    font-weight: normal;
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast);
    opacity: 0.85;
    cursor: pointer;
}

.urlr-newsletter-consent input[type="checkbox"] {
    margin-top: 0.2rem !important;
    flex-shrink: 0;
}

/* ── Separator (core/separator with a background color) ───────
   WP core sets border:none on filled separators and relies on
   height to draw the bar; nothing else here supplies it. */

.wp-block-separator.has-background {
    width: 100%;
    height: 1px;
}

.wp-block-separator {
    border-top: 1px solid;
}

/* ── Footer link grid ───────────────────────────────────────── */

.urlr-footer .wp-block-separator {
    border-top-width: 1px;
    height: 1px;
    margin-top: var(--wp--preset--spacing--70);
}

.urlr-footer .wp-block-heading {
    text-transform: uppercase;
}

.urlr-footer .wp-block-columns .wp-block-column:first-child .wp-block-heading {
    font-size: var(--wp--preset--font-size--small);
}

.urlr-footer .wp-block-column .wp-block-heading {
    font-size: var(--wp--preset--font-size--small);
    margin-bottom: var(--wp--preset--spacing--20);
    letter-spacing: 0.08em;
}

.urlr-footer .wp-block-columns .wp-block-navigation {
    font-size: var(--wp--preset--font-size--small);
    gap: var(--wp--preset--spacing--20);
    margin-block-start: 0;
}

.urlr-footer .wp-block-navigation .wp-block-navigation-item {
    margin: 0;
}

.urlr-footer .wp-block-navigation + .wp-block-heading {
    margin-top: var(--wp--preset--spacing--50);
}

.urlr-footer .wp-block-social-links {
    gap: var(--wp--preset--spacing--30);
    margin-block: 0;
}

.urlr-footer .wp-block-social-links .wp-block-social-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

.urlr-lang-switcher {
    width: auto;
    min-width: 16rem;
    flex-shrink: 0;
    background-color: var(--wp--preset--color--base);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%232A1820' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--wp--preset--spacing--30) center;
    background-size: 12px;
    color: var(--wp--preset--color--contrast);
    border: 1px solid rgba(42, 24, 32, 0.15);
    border-radius: 0.5rem;
    padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--60) var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
    font-size: 1rem;
    cursor: pointer;
}

.urlr-lang-switcher option {
    color: var(--wp--preset--color--contrast);
    background-color: var(--wp--preset--color--base);
}

/* ── Bandeau de suggestion de langue ([urlr_locale_banner]) ──── */

/* The banner and its items use [hidden] plus flex layout, so the hidden
   state needs an explicit guard — flex overrides the attribute. */
.urlr-locale-banner,
.urlr-locale-banner-item {
    display: flex;
}

.urlr-locale-banner[hidden],
.urlr-locale-banner-item[hidden] {
    display: none;
}

.urlr-locale-banner {
    position: fixed;
    top: var(--wp--preset--spacing--40);
    right: var(--wp--preset--spacing--40);
    align-items: flex-start;
    justify-content: flex-end;
    z-index: 400;
    pointer-events: none;
}

.urlr-locale-banner-item {
    position: relative;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: var(--wp--preset--spacing--30);
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
    max-width: min(420px, calc(100vw - 2 * var(--wp--preset--spacing--40)));
    background-color: var(--wp--preset--color--base);
    border: 1px solid rgba(42, 24, 32, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(42, 24, 32, 0.14);
    pointer-events: auto;
    animation: urlr-locale-banner-in 0.25s ease-out;
}

@keyframes urlr-locale-banner-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
}

.urlr-locale-banner-text {
    margin: 0;
    color: var(--wp--preset--color--contrast);
    font-size: var(--wp--preset--font-size--small);
    text-align: left;
}

.urlr-locale-banner-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}

.urlr-locale-banner-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
    border-radius: 999px;
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.urlr-locale-banner-link:hover,
.urlr-locale-banner-link:focus {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--contrast);
}

.urlr-locale-banner-dismiss {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: none;
    border: 0;
    border-radius: 999px;
    color: var(--wp--preset--color--contrast);
    font-size: var(--wp--preset--font-size--small);
    cursor: pointer;
    opacity: 0.6;
    transition: background-color 0.5s ease, opacity 0.5s ease;
}

.urlr-locale-banner-dismiss:hover,
.urlr-locale-banner-dismiss:focus {
    opacity: 1;
    background-color: var(--wp--preset--color--surface);
}

/* ── Carte URLR (is-style-urlr-card group style) ──────────────── */

/* Clip children to the card's own rounded corners — needed so the
   "Image à la une" style (below) gets rounded top corners instead of
   overhanging the card. */
.is-style-urlr-card {
    overflow: hidden;
}

/* Image block style "Image à la une" (registered in assets/js/editor.js):
   an editor-chosen option, not an automatic first-child guess. Breaks
   the image out of the card's own padding to span the full card width,
   ratio untouched. Only takes effect inside a Carte URLR card. */
.is-style-urlr-card .wp-block-image.is-style-urlr-featured {
    width: calc(100% + (2 * var(--wp--preset--spacing--50)));
    /* Lift any max-width cap (e.g. the 100% on .wp-block-urlr-multilingual-image,
       which would otherwise pin the figure to the content box and stop the
       bleed) so the wider width actually applies. */
    max-width: none;
    margin: calc(-1 * var(--wp--preset--spacing--50)) calc(-1 * var(--wp--preset--spacing--50)) var(--wp--preset--spacing--40);
}

.is-style-urlr-card .wp-block-image.is-style-urlr-featured img {
    display: block;
    width: 100%;
    border-radius: 0;
}

/* Image-only card: when the featured image is the card's last child
   there is no content below, so the usual bottom gap (spacing 40,
   meant to separate the image from the text) is dead space. Bleed
   the image to the card's bottom edge as well, and flex: 1 lets the
   figure grow to the full card height (grids stretch cards to equal
   height), so the picture covers the whole card. object-fit cover
   crops it to the card's shape; the card's overflow: hidden clips it
   flush with the rounded corners. */
.is-style-urlr-card .wp-block-image.is-style-urlr-featured:last-child {
    flex: 1;
    margin-bottom: calc(-1 * var(--wp--preset--spacing--50));
}

.is-style-urlr-card .wp-block-image.is-style-urlr-featured:last-child img {
    height: 100%;
    object-fit: cover;
}

/* Image block style "Image à la une (bas)" (registered in assets/js/editor.js):
   same full-card-width breakout, but for an image at the bottom of the card.
   The card's overflow: hidden clips the bleed flush with the card bottom.
   margin-top: auto pins the image to the card bottom when a grid stretches
   cards to equal height (cards are vertical flex groups), padding-top keeps a
   minimum gap above when content is taller than the card. */
.is-style-urlr-card .wp-block-image.is-style-urlr-featured-bottom {
    width: calc(100% + (2 * var(--wp--preset--spacing--50)));
    /* Same max-width lift as urlr-featured above: without it the
       .wp-block-urlr-multilingual-image cap keeps the figure at the
       content-box width instead of bleeding to the card edges. */
    max-width: none;
    margin: auto calc(-1 * var(--wp--preset--spacing--50)) calc(-1 * var(--wp--preset--spacing--50));
    padding-top: var(--wp--preset--spacing--40);
}

.is-style-urlr-card .wp-block-image.is-style-urlr-featured-bottom img {
    display: block;
    width: 100%;
    border-radius: 0;
}

/* Image block styles "Image à la une (gauche)/(droite)" (registered in
   assets/js/editor.js): sideways counterpart of the top/bottom variants —
   the image spans the card's full height, bleeding into the padding on
   the top, bottom and one side. Works in a card laid out as Flex (row)
   or Grid: align-self: stretch makes the figure's outer box fill the
   row/column height, justify-self pins it to the start/end edge of its
   grid track (ignored in flex), and the negative top/bottom margins
   push it out to the card's top and bottom edges (grids stretch cards
   to equal height). The img fills the figure exactly via width/height
   100% + object-fit: cover, so the strip is always flush (no gutters)
   — the price is a crop when the image's aspect ratio doesn't match the
   strip's (a taller row crops the sides, a shorter one crops top and
   bottom). The figure is fit-content, so the strip thickness is the
   image's intrinsic width, not an editor-set width. flex-basis and
   max-width: none outrank the .wp-container-content-* rule WordPress
   generates for a width set on an image inside a flex layout (flex-basis
   would otherwise pin the strip to that width), and the !important
   outranks the inline width style WP can write on the figure. The card's
   overflow: hidden clips the strip flush with the card's rounded
   corners. Only takes effect inside a Carte URLR card. */
.is-style-urlr-card .wp-block-image.is-style-urlr-featured-left {
    align-self: stretch;
    justify-self: start;
    flex-basis: auto;
    max-width: none;
    min-width: 0;
    width: fit-content !important;
    margin: calc(-1 * var(--wp--preset--spacing--50)) 0 calc(-1 * var(--wp--preset--spacing--50)) calc(-1 * var(--wp--preset--spacing--50));
}

.is-style-urlr-card .wp-block-image.is-style-urlr-featured-right {
    align-self: stretch;
    justify-self: end;
    flex-basis: auto;
    max-width: none;
    min-width: 0;
    width: fit-content !important;
    margin: calc(-1 * var(--wp--preset--spacing--50)) calc(-1 * var(--wp--preset--spacing--50)) calc(-1 * var(--wp--preset--spacing--50)) 0;
}

.is-style-urlr-card .wp-block-image.is-style-urlr-featured-left img,
.is-style-urlr-card .wp-block-image.is-style-urlr-featured-right img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Narrow screens: a card too small for a side strip stacks its children
   (grid auto-fill wraps to one column), where the strip's negative top
   margin would overlap the block above and its fixed width could overflow.
   Degrade both variants to a full-width image anchored to the card bottom,
   same geometry as urlr-featured-bottom: side bleed to the card edges,
   a normal gap above, height auto so the image keeps its ratio. The
   !important on width is required to beat the base rule's own !important
   (later in the file wins between same-specificity !important rules). */
@media (max-width: 782px) {
    .is-style-urlr-card .wp-block-image.is-style-urlr-featured-left,
    .is-style-urlr-card .wp-block-image.is-style-urlr-featured-right {
        align-self: auto;
        justify-self: stretch;
        width: calc(100% + (2 * var(--wp--preset--spacing--50))) !important;
        min-width: 0;
        margin: var(--wp--preset--spacing--40) calc(-1 * var(--wp--preset--spacing--50)) calc(-1 * var(--wp--preset--spacing--50));
    }

    .is-style-urlr-card .wp-block-image.is-style-urlr-featured-left img,
    .is-style-urlr-card .wp-block-image.is-style-urlr-featured-right img {
        height: auto;
    }
}

/* ── Blog card grid ─────────────────────────────────────────── */

/* Force the 3-column grid ourselves: WP's own `layout: grid` block
   attribute isn't taking effect for the Post Template block on this
   install (renders `is-layout-flow` instead), so this can't rely on
   core's generated grid CSS. */
.urlr-post-grid {
    display: grid;
    /* A card's featured-image figure is width: calc(100% + 3rem) with
       negative side margins (bleeding to the card edges), which gives
       every card an intrinsic min-content wider than a phone screen.
       Plain 1fr tracks can't shrink below a grid item's min-content, so
       on /blog/ the single mobile column came out 349px inside a 298px
       content box and pushed the whole page 51px past the viewport.
       minmax(0, 1fr) lets the track shrink; the figure keeps resolving
       against the item width, and the card's overflow: hidden clips the
       bleed as before. */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--40);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* WP's flow-layout defaults give every <li> a margin-block-start except
   the very first one in the whole list — fine for a single column, but
   in a 3-column grid that means only the top-left card sits flush with
   its row while its row-mates get pushed down, since "first child" only
   ever matches one cell. `gap` above already spaces every row, so this
   margin is pure redundant misalignment. */
.urlr-post-grid > li {
    margin-block-start: 0;
}

@media (max-width: 782px) {
    .urlr-post-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.urlr-blog-card.is-style-urlr-card {
    background-color: var(--wp--preset--color--secondary);
    border: 1px solid #E6EFF5;
    border-radius: 12px;
    padding: 1.5rem;
    overflow: hidden;
}

.urlr-blog-card {
    display: flex;
    flex-direction: column;
    position: relative;
    /* The grid stretches each card's <li> wrapper to the row's tallest
       card (default align-items: stretch), but this div doesn't fill
       that height on its own — without this, the card's own bordered
       box (and its margin-top: auto meta row) is sized by its excerpt
       length alone, so cards in the same row end up misaligned. */
    height: 100%;
}

/* Stretched-link: whole card clickable via the title link, same
   technique as .mega-card-link. The category link below sits above it
   (own stacking context, z-index:1) so it stays independently clickable. */
.urlr-blog-card .wp-block-post-title a {
    color: inherit;
    text-decoration: none;
}

.urlr-blog-card .wp-block-post-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.urlr-blog-card .wp-block-post-terms a {
    position: relative;
    z-index: 1;
}

.wp-block-post-terms.urlr-category-badge a {
    display: inline-block;
    padding: 0.125rem 0.625rem;
    background-color: var(--wp--preset--color--secondary);
    border: 1px solid var(--wp--preset--color--primary);
    border-radius: 999px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
}

/* Pull the featured image out to the card's top/left/right edges
   (undoing the card's own padding on those sides) while keeping the
   text content below inset as normal. */
.urlr-blog-card .wp-block-post-featured-image {
    width: calc(100% + 3rem);
    margin: -1.5rem -1.5rem 1rem;
}

/* Card images keep their uploaded ratio: no frame, no crop, no zoom,
   width fills the card and the height follows. height:auto is what
   undoes the img's width/height attributes once width goes fluid,
   without it the image squashes. max-height only clamps an abuse-tall
   upload; object-fit:contain then keeps the whole image visible inside
   the clamped box (side bands in that case alone), never cropping. */
.urlr-blog-card .wp-block-post-featured-image img {
    border-radius: 0;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

.urlr-blog-card .wp-block-post-title {
    margin: 0 0 var(--wp--preset--spacing--20);
}

.urlr-blog-card .wp-block-post-excerpt {
    margin: 0 0 var(--wp--preset--spacing--40);
    color: var(--wp--preset--color--contrast);
    opacity: 0.75;
}

.urlr-blog-card-meta {
    width: 100%;
    margin-top: auto;
    align-items: center;
}

.urlr-blog-card-go-icon {
    flex-shrink: 0;
}

.urlr-blog-card-date {
    align-items: center;
    gap: var(--wp--preset--spacing--20);
}

/* ── Pagination (Query Pagination block) ───────────────────────── */

.wp-block-query-pagination {
    justify-content: center;
    align-items: center;
    gap: var(--wp--preset--spacing--30);
    margin-top: var(--wp--preset--spacing--50);
}

.wp-block-query-pagination-numbers {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--20);
}

.wp-block-query-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    color: var(--wp--preset--color--contrast);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.wp-block-query-pagination .page-numbers:hover {
    background-color: var(--wp--preset--color--surface);
}

.wp-block-query-pagination .page-numbers.current {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary-contrast);
}

.wp-block-query-pagination .page-numbers.dots {
    background: none;
    opacity: 0.5;
}

.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--wp--preset--color--primary);
    border-radius: 999px;
    color: var(--wp--preset--color--primary);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary-contrast);
}

/* ── Single post hero ───────────────────────────────────────── */

/* Decorative dot pattern (assets/hero-bg.svg) layered on top of every
   block that uses the hero gradient: right edge, full height. The
   gradient is applied by the editor as an inline `background:`
   shorthand, so these longhands need !important to sit on top of it.
   The first background-image layer paints above the gradient layers
   and below the block's content. */
[style*="--wp--preset--gradient--hero"] {
    background-image: url("/wp-content/themes/urlr/assets/hero-bg.svg"), var(--wp--preset--gradient--hero) !important;
    background-repeat: no-repeat !important;
    background-position: right center !important;
    background-size: auto 100% !important;
}

/* Mobile: drop the dot pattern layer and keep only the gradient, the
   dots crowd the narrow hero. Same selector and !important as above,
   later in the file so it wins inside the media query. */
@media (max-width: 782px) {
    [style*="--wp--preset--gradient--hero"] {
        background-image: var(--wp--preset--gradient--hero) !important;
    }
}

.urlr-post-hero-meta {
    align-items: center;
    gap: var(--wp--preset--spacing--30);
}

.urlr-post-hero-columns.wp-block-columns {
    gap: var(--wp--preset--spacing--60);
}

.urlr-post-hero-columns .wp-block-post-featured-image {
    margin: 0;
}

.urlr-post-hero-columns .wp-block-post-featured-image img {
    width: 100%;
    max-height: 320px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* ── Single post sidebar (table of contents) ────────────────── */

/* Plain floats, not flex/grid: Firefox has a long-standing bug where
   position: sticky doesn't engage for a descendant of a flex or grid
   item (see https://bugzilla.mozilla.org/show_bug.cgi?id=1488080).
   Floats have no such issue and are fully sticky-compatible. */
.urlr-post-layout.wp-block-columns {
    display: block;
}

.urlr-post-layout.wp-block-columns::after {
    content: "";
    display: table;
    clear: both;
}

.urlr-post-sidebar {
    float: left;
    width: 30%;
    box-sizing: border-box;
    padding-right: var(--wp--preset--spacing--60);
}

.urlr-post-layout .wp-block-column:not(.urlr-post-sidebar) {
    float: left;
    width: 70%;
    box-sizing: border-box;
}

.urlr-post-layout--no-toc .urlr-post-sidebar {
    display: none;
}

.urlr-post-layout--no-toc .wp-block-column:not(.urlr-post-sidebar) {
    width: 100%;
}

/* ── Content links (post/page body only — not header/footer/nav) ── */

.entry-content p a {
    color: var(--wp--preset--color--primary);
    font-weight: bold;
    text-decoration-line: underline;
    text-decoration-thickness: .14em;
    text-underline-offset: .24em;
    text-decoration-color: color-mix(in srgb, var(--wp--preset--color--primary) 45%, white);
    transition: text-decoration-color 1s ease-in-out;
}

.entry-content p a:hover {
    text-decoration-color: var(--wp--preset--color--primary);
}

.urlr-post-toc {
    position: sticky;
    top: 100px;
    background-color: var(--wp--preset--color--secondary);
    border: 1px solid #E6EFF5;
    border-radius: 12px;
    padding: var(--wp--preset--spacing--40);
}

.urlr-post-toc .wp-block-heading {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.urlr-post-toc-tree {
    position: relative;
    list-style: none;
    margin: var(--wp--preset--spacing--30) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--20);
}

/* A full-height line behind the list, so the gaps between items (from
   the flex gap above) don't visually break the left border into
   disconnected segments — each li's own border then sits on top of it,
   at the same 2px position, reading as one continuous rail. */
.urlr-post-toc-tree::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: #D0E4FB;
    z-index: -1;
}

.urlr-post-toc-tree li {
    border-left: 2px solid #D0E4FB;
    padding-left: var(--wp--preset--spacing--30);
}

.urlr-post-toc-tree li.is-current {
    border-left-color: var(--wp--preset--color--primary);
}

.urlr-post-toc-tree a {
    color: var(--wp--preset--color--contrast);
    opacity: 0.75;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.3;
}

.urlr-post-toc-tree a:hover {
    opacity: 1;
    color: var(--wp--preset--color--primary);
}

.urlr-author-box {
    align-items: center;
    gap: var(--wp--preset--spacing--40);
}

.urlr-author-box-avatar {
    flex-shrink: 0;
}

.urlr-author-box-content {
    min-width: 0;
}

.urlr-author-box-bio {
    margin: var(--wp--preset--spacing--20) 0 0;
}

@media (max-width: 782px) {
    /* display: block overrides WP core's own flex-based mobile stacking
       for .wp-block-columns, so re-stack explicitly here. */
    .urlr-post-sidebar,
    .urlr-post-layout .wp-block-column:not(.urlr-post-sidebar) {
        float: none;
        width: 100%;
        padding-right: 0;
    }

    .urlr-post-toc {
        position: static;
    }

    /* Overrides the inline min-height assets/js/toc.js sets to give the
       sticky box scroll room — not needed once columns are stacked. */
    .urlr-post-sidebar {
        min-height: 0 !important;
    }
}

/* Muted meta text (dates, author names, de-emphasized copy) — the
   "secondary" palette color is a near-white background tint, not a text
   color, so it was invisible against the (also near-white) page
   background wherever it was used as textColor. */
.urlr-text-muted {
    color: var(--wp--preset--color--contrast);
    opacity: 0.6;
}

/* ── Forms & inputs ──────────────────────────────────────────── */

/* iOS Safari and Chrome zoom the viewport when a focused field's
   font-size is below 16px. Pin every field to 16px so focusing never
   triggers that zoom, while user zoom stays available (the viewport
   meta keeps user-scalable enabled). !important because the component
   input rules below set a smaller font-size with higher specificity. */
input,
textarea,
select {
    font-size: 16px !important;
}

/* Custom-styled checkboxes & radios. WPForms renders plain native
   inputs for these fields (no hidden-input/custom-span markup), so
   this covers its forms too — no plugin-specific override needed. */

input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 1.125rem !important;
    height: 1.125rem !important;
    flex-shrink: 0;
    margin: 0 !important;
    border: 1.5px solid rgba(42, 24, 32, 0.25) !important;
    background-color: var(--wp--preset--color--base) !important;
    cursor: pointer;
    position: relative;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

input[type="checkbox"] {
    border-radius: 0.25rem !important;
}

input[type="radio"] {
    border-radius: 50% !important;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: var(--wp--preset--color--primary) !important;
}

input[type="checkbox"]:checked {
    background-color: var(--wp--preset--color--primary) !important;
    border-color: var(--wp--preset--color--primary) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 0.75rem !important;
}

/* Radio dot drawn as a thick ring (no pseudo-element) so it can't be
   knocked out by WPForms' own ::before/::after usage. */
input[type="radio"]:checked {
    border-width: 5px !important;
    border-color: var(--wp--preset--color--primary) !important;
    background-color: var(--wp--preset--color--base) !important;
    background-image: none !important;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(228, 223, 103, 0.25) !important;
}

/* WPForms draws its own checkbox/radio fill via ::before/::after
   pseudo-elements; kill both everywhere so nothing shows through
   underneath our background-image/border-based styling above. */
input[type="checkbox"]::before,
input[type="checkbox"]::after,
input[type="radio"]::before,
input[type="radio"]::after,
.wpforms-container input[type="checkbox"]::before,
.wpforms-container input[type="checkbox"]::after,
.wpforms-container input[type="radio"]::before,
.wpforms-container input[type="radio"]::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

input[type="text"]:not(.urlr-shortener-input),
input[type="email"]:not(.urlr-shortener-input):not(.urlr-newsletter-input),
input[type="url"]:not(.urlr-shortener-input):not(.urlr-qrcode-generator-input),
input[type="password"]:not(.urlr-shortener-input),
input[type="search"]:not(.urlr-shortener-input),
input[type="number"]:not(.urlr-shortener-input),
input[type="tel"]:not(.urlr-shortener-input),
input[type="date"]:not(.urlr-shortener-input),
input[type="datetime-local"]:not(.urlr-shortener-input),
input[type="time"]:not(.urlr-shortener-input),
textarea:not(.urlr-shortener-input),
select {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast);
    background-color: var(--wp--preset--color--base);
    border: 1px solid rgba(42, 24, 32, 0.15);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
    max-width: 100%;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
    -webkit-appearance: none;
    appearance: none;
}

/* Global focus treatment for all form fields: brand yellow border + ring,
   coherent with the yellow action components (shortener, utm generator,
   newsletter). The QR generator card is coral-themed, so its input and
   select get their own coral rule in their section. */
.wp-block-search__input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus:not(.urlr-qrcode-generator-input),
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--wp--preset--color--links);
    box-shadow: 0 0 0 3px rgba(228, 223, 103, 0.25);
}

/* Global focus treatment for plain buttons (keyboard focus only, so mouse
   clicks don't show a ring): brand yellow ring. Block buttons override
   this below with a ring matching their own style color. */
button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(228, 223, 103, 0.25);
}

/* Block buttons: the focus ring matches each button style's own color.
   Default block buttons are blue (primary). */
.wp-element-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(100, 166, 243, 0.25);
}

.wp-block-button.is-style-urlr-links .wp-block-button__link:focus-visible {
    box-shadow: 0 0 0 3px rgba(228, 223, 103, 0.25);
}

.wp-block-button.is-style-urlr-qr-codes .wp-block-button__link:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 95, 69, 0.25);
}

.wp-block-button.is-style-urlr-stats .wp-block-button__link:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 233, 185, 0.25);
}

.wp-block-button.is-style-urlr-api .wp-block-button__link:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 204, 228, 0.25);
}

.wp-block-button.is-style-urlr-contrast .wp-block-button__link:focus-visible {
    box-shadow: 0 0 0 3px rgba(42, 24, 32, 0.25);
}

/* Hover for the contrast button. The [class*=...] form also matches the
   suffixed class (is-style-urlr-contrast--6) WP emits when the style is
   registered more than once. */
.wp-block-button[class*="is-style-urlr-contrast"] > .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link[class*="is-style-urlr-contrast"]:hover {
    background-color: var(--wp--preset--color--contrast-hover);
    border-color: var(--wp--preset--color--contrast-hover);
}

.wp-block-button.is-style-urlr-outline-white .wp-block-button__link:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

textarea {
    min-height: 6rem;
    resize: vertical;
    line-height: 1.6;
}

/* Search block */
.wp-block-search {
    gap: var(--wp--preset--spacing--30);
}

.wp-block-search .wp-block-search__input {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast);
}

.wp-block-search .wp-block-search__button {
    border: none;
    border-radius: 0.5rem;
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--preset--font-family--body);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: background 0.5s ease;
}

.wp-block-search .wp-block-search__button:hover {
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
}

/* Form labels */
.wp-block-search__label,
label {
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast);
    margin-bottom: var(--wp--preset--spacing--20);
    display: block;
}

/* Form buttons match theme button style */
.wp-block-form .wp-block-button__link,
form button[type="submit"]:not(.urlr-shortener-button):not(.urlr-newsletter-button):not(.urlr-utm-generator-button) {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--preset--font-family--body);
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: background 0.5s ease;
}

.wp-block-form .wp-block-button__link:hover,
form button[type="submit"]:not(.urlr-shortener-button):not(.urlr-newsletter-button):not(.urlr-utm-generator-button):hover {
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
}

/* ── WPForms plugin ─────────────────────────────────────────── */
/* Overrides the plugin's own bundled styling so its forms match the
   theme's input/button design tokens instead of WPForms' defaults. */

.wpforms-container .wpforms-field-label,
.wpforms-container .wpforms-field-sublabel,
.wpforms-container .wpforms-field-label-inline {
    font-family: var(--wp--preset--font-family--body) !important;
    color: var(--wp--preset--color--contrast) !important;
}

.wpforms-container .wpforms-field-label {
    font-weight: 600 !important;
    font-size: var(--wp--preset--font-size--small) !important;
}

.wpforms-container .wpforms-field-sublabel {
    font-size: var(--wp--preset--font-size--small) !important;
    opacity: 0.6;
}

.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="url"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="number"],
.wpforms-container input[type="password"],
.wpforms-container select,
.wpforms-container textarea {
    font-family: var(--wp--preset--font-family--body) !important;
    font-size: 16px !important;
    color: var(--wp--preset--color--contrast) !important;
    background-color: var(--wp--preset--color--base) !important;
    border: 1px solid rgba(42, 24, 32, 0.15) !important;
    border-radius: 0.5rem !important;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.wpforms-container input[type="text"]:focus,
.wpforms-container input[type="email"]:focus,
.wpforms-container input[type="url"]:focus,
.wpforms-container input[type="tel"]:focus,
.wpforms-container input[type="number"]:focus,
.wpforms-container input[type="password"]:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
    outline: none !important;
    border-color: var(--wp--preset--color--links) !important;
    box-shadow: 0 0 0 3px rgba(228, 223, 103, 0.25) !important;
}

.wpforms-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wpforms-container .wpforms-submit {
    background: var(--wp--preset--color--primary) !important;
    color: var(--wp--preset--color--contrast) !important;
    font-family: var(--wp--preset--font-family--body) !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 0.5rem !important;
    cursor: pointer;
    transition: background 0.5s ease;
}

.wpforms-container .wpforms-submit:hover {
    background: var(--wp--preset--color--contrast) !important;
    color: var(--wp--preset--color--base) !important;
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Tablet: reduce side padding + switch to mobile menu */
@media (max-width: 1024px) {
    .urlr-header-nav {
        padding-left: var(--wp--preset--spacing--40) !important;
        padding-right: var(--wp--preset--spacing--40) !important;
    }

    .urlr-footer-wrapper {
        padding-left: var(--wp--preset--spacing--40) !important;
        padding-right: var(--wp--preset--spacing--40) !important;
    }

    .urlr-footer {
        padding-left: var(--wp--preset--spacing--60) !important;
        padding-right: var(--wp--preset--spacing--60) !important;
    }

    .urlr-mega-nav {
        display: none !important;
    }

    /* Header bar buttons and "Démo" link — the copies in the mobile menu
       actions stay visible below the demo link, hence the :not() exclusions. */
    .urlr-header-nav .wp-block-buttons:not(.mobile-menu .wp-block-buttons) {
        display: none !important;
    }

    .urlr-header-nav .urlr-demo-link:not(.mobile-menu .urlr-demo-link) {
        display: none !important;
    }

    .urlr-mobile-toggle {
        display: flex !important;
    }
}

/* Middle widths (783px–1479px window): the 1400px content/wide grid from
   theme.json is wider than the viewport, so constrained content would sit
   flush against the edges with no side gutter (mobile gets 20px at
   <=782px, desktop gets natural centering above 1480px). Cap the global
   content/wide sizes to the viewport minus an 80px gutter (40px per
   side; 2.5rem has no spacing preset, hence the raw value). At 1480px
   the 1400px grid fits the viewport again and centers on its own, so the
   cap hands over seamlessly. alignfull sections follow the constrained
   width, exactly like on desktop. */
@media (min-width: 783px) and (max-width: 1479px) {
    :root {
        --wp--style--global--content-size: calc(100vw - 80px);
        --wp--style--global--wide-size: calc(100vw - 80px);
    }
}

/* Mobile: single-owner 20px gutters.
   main carries the page gutter: every top-level block that isn't
   full-bleed sits 20px from the viewport edges. Full-bleed (.alignfull)
   sections escape that gutter and re-apply it for their own content, so
   a gutter is always provided by exactly one box — the outermost one —
   and never re-applied by nested groups. This replaced an earlier model
   that padded every constrained group plus every nested
   group/columns/cover: gutters then depended on markup depth (a
   paragraph inside two nested constrained groups sat at 40px while its
   section heading sat at 20px), authored inline padding:0 opted whole
   subtrees out, and cards had their own padding silently overridden.
   Desktop is untouched: everything in this block is mobile-only. */
@media (max-width: 782px) {
    .wp-site-blocks > main {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Full-bleed sections: break out of the enclosing 20px gutter
       (main's, or an outer section's). The same rule works at any
       nesting depth: an alignfull inside an alignfull bleeds exactly
       back to the viewport edge, because the parent's 20px padding
       (below, !important) offsets these -20px margins — no
       special-cased nested rules. */
    .wp-site-blocks > main .alignfull {
        margin-left: -20px !important;
        margin-right: -20px !important;
        width: calc(100% + 40px) !important;
    }

    /* Full-bleed section containers carry the gutter for their content.
       !important is what makes the model depth-proof: authored inline
       side padding (e.g. a section set to padding 0 so its inner
       full-bleed grid could escape the old double-padding) would
       otherwise leave the child alignfull overshooting the viewport by
       20px on each side. Side gutting on mobile is a design rule
       (always 20px), not an authoring choice. Container blocks only:
       a full-bleed image or separator must stay edge-to-edge, not
       gain 20px white bands. */
    .wp-site-blocks > main .alignfull:is(.wp-block-group, .wp-block-columns, .wp-block-cover) {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Opt-out — the trust-us logo band (homepage): the tiles are the
       section's design, and the first/last tile of each row must stick
       to the viewport sides, so its gutter is cancelled. The nested
       logo grid also drops the -20px breakout: with an unpadded parent
       it would push the grid 20px past the viewport on both sides, so
       it settles at width 100% of the (flush) section instead. The
       section itself keeps the breakout above — the dark band still
       bleeds full width. */
    .wp-site-blocks > main .alignfull.trust-us:is(.wp-block-group, .wp-block-columns, .wp-block-cover),
    .wp-site-blocks > main .trust-us .alignfull:is(.wp-block-group, .wp-block-columns, .wp-block-cover) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .wp-site-blocks > main .trust-us .alignfull {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    /* main already carries the 20px side padding above; the constrained
       post-content wrapper (templates page.html and single.html) would
       add a second 20px on top and give text a 40px gutter on mobile. */
    .wp-site-blocks > main .wp-block-post-content.is-layout-constrained {
        padding-left: 0;
        padding-right: 0;
    }

    /* Top-level content sections that carry a background but weren't
       authored alignfull (the /blog/ hero, the /liens/ feature bands)
       are section containers on mobile, not content: break them out the
       same way as alignfull — background bleeding to the viewport edges,
       20px padding keeping their text on the standard gutter (same
       !important reasoning as the alignfull rule above). Direct
       children of the post content only: a nested card with a
       background must stay inside its section. Their alignfull children
       re-bleed to the viewport edge via the rule above, since this
       padding offsets its -20px margins. */
    .wp-site-blocks > main .wp-block-post-content > .wp-block-group.has-background:not(.alignfull) {
        margin-left: -20px !important;
        margin-right: -20px !important;
        width: calc(100% + 40px) !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Trust-us corner shapes: the band breaks out full-bleed above, but
       the scoops and stairs painted on its siblings (*:has(+ .trust-us)::after
       above it, .trust-us + *::before below it) sit at the siblings' own
       edges. A sibling that is not full-bleed itself stays inside main's
       20px gutter, so where the neighbours are plain constrained sections
       (as on /qui-sommes-nous/) the shapes end up 20px inside the band's
       corners on mobile only (desktop is unaffected: content and wide
       sizes are both 1400px, so band and siblings share the same width).
       Extend the shapes by the gutter so they land on the band's edges.
       Full-bleed siblings (alignfull, or has-background broken out above)
       already span the viewport and are excluded. */
    .wp-site-blocks > main .wp-block-post-content > *:has(+ .trust-us):not(.alignfull):not(.has-background)::after {
        left: -20px;
        right: -20px;
    }

    .wp-site-blocks > main .wp-block-post-content > .trust-us + *:not(.alignfull):not(.has-background)::before {
        left: -20px;
        right: -20px;
    }

    /* Ensure panels never show on mobile */
    .mega-panel {
        display: none !important;
    }

    /* Hide top banner on mobile (the locale suggestion bandeau stays) */
    .urlr-top-banner {
        display: none !important;
    }

    .urlr-header-nav {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .urlr-footer-wrapper {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .urlr-footer {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Footer CTA buttons (urlr/footer-cta): the columns stack full-width
       on mobile, so left-align the button row instead of right-justifying
       it. Scoped with body:not(.block-editor-iframe__body) so it outranks
       WP's .is-content-justification-right on the frontend only; the
       editor keeps the authored right alignment. */
    body:not(.block-editor-iframe__body) .urlr-footer-wrapper .wp-block-buttons.is-content-justification-right {
        justify-content: flex-start;
    }
}

/* ── Pricing table (urlr/pricing-table pattern) ─────────────── */

/* All visual design for the pricing table lives here, keyed to the
   pattern's stable classNames — so a CSS edit propagates to every
   inserted instance while text/prices stay editable in the editor. */

/* Both controls in the row share one fixed height so the currency select
   lines up exactly with the billing toggle (the global 16px !important
   select font-size would otherwise make it taller than the toggle). */
.urlr-pricing-controls {
    --urlr-control-height: 3.25rem;
    gap: var(--wp--preset--spacing--40);
    margin-bottom: var(--wp--preset--spacing--60);
}

/* Billing toggle — segmented control box. JS (assets/js/pricing.js) sets
   .is-selected on the active button and data-billing / data-currency on
   the section root. */
.urlr-billing-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--20);
    height: var(--urlr-control-height);
    padding: 4px;
    background: var(--wp--preset--color--secondary);
    border: 1px solid var(--wp--preset--color--brand-domain);
    border-radius: 10px;
}

/* Scoped under .urlr-billing-toggle so these outrank the theme.json
   global button rules (:root :where(.wp-element-button:hover, ...)) —
   at (0,1,0) they would otherwise invert the pills on hover. */
.urlr-billing-toggle .urlr-billing-option {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--20);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: #6A5D63;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}

.urlr-billing-toggle .urlr-billing-option.is-selected {
    background-color: var(--wp--preset--color--base);
    background-image: linear-gradient(119.36deg, rgba(100, 166, 243, 0) 50%, rgba(100, 166, 243, 0.2) 100%);
    border-color: #D0E4FB;
    color: var(--wp--preset--color--contrast);
}

/* "2 mois offerts" badge inside the annual option */
.urlr-billing-badge {
    padding: 0.125rem 0.5rem;
    border: 1px solid #64A6F3;
    border-radius: 999px;
    background: transparent;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Currency select — same box as the billing toggle next to it: shared
   height, background, border and radius. line-height centers the label
   inside the fixed height (box-sizing is border-box globally). The
   font-size !important outranks the global 16px !important select rule
   (iOS zoom guard) so the text matches the toggle's small pills. */
.urlr-currency-select {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    max-width: 100%;
    height: var(--urlr-control-height, 3.25rem);
    background-color: var(--wp--preset--color--secondary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%232A1820' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--wp--preset--spacing--30) center;
    background-size: 12px;
    color: var(--wp--preset--color--contrast);
    border: 1px solid var(--wp--preset--color--brand-domain);
    border-radius: 10px;
    padding: 0 var(--wp--preset--spacing--60) 0 var(--wp--preset--spacing--40);
    font-size: var(--wp--preset--font-size--small) !important;
    font-weight: 600;
    line-height: calc(var(--urlr-control-height, 3.25rem) - 2px);
    cursor: pointer;
    margin: 0;
    transition: border-color 0.5s ease;
}

.urlr-currency-select:hover {
    border-color: var(--wp--preset--color--primary);
}

/* Price variants: each card's price paragraph holds one span per
   billing+currency combination ([data-price="monthly-eur"] etc.). JS sets
   data-billing / data-currency on the section root; CSS shows only the
   matching span. Without JS (or before it runs) the default annual-eur
   combination stays visible. In the editor all four spans stay visible
   so every variant remains editable. */
body:not(.block-editor-iframe__body) .urlr-pricing [data-price] {
    display: none;
}

body:not(.block-editor-iframe__body) .urlr-pricing:not([data-billing="monthly"]):not([data-currency="usd"]) [data-price="annual-eur"],
body:not(.block-editor-iframe__body) .urlr-pricing:not([data-billing="monthly"])[data-currency="usd"] [data-price="annual-usd"],
body:not(.block-editor-iframe__body) .urlr-pricing[data-billing="monthly"]:not([data-currency="usd"]) [data-price="monthly-eur"],
body:not(.block-editor-iframe__body) .urlr-pricing[data-billing="monthly"][data-currency="usd"] [data-price="monthly-usd"] {
    display: inline;
}

.urlr-pricing-plans {
    gap: var(--wp--preset--spacing--50);
    margin-bottom: var(--wp--preset--spacing--50);
}

.urlr-pricing-card {
    border: 1px solid #E6EFF5;
    border-radius: 12px;
    padding: var(--wp--preset--spacing--40);
    background-color: var(--wp--preset--color--base);
    height: 100%;
    box-sizing: border-box;
    position: relative;
}

.urlr-pricing-card--featured {
    border-color: var(--wp--preset--color--primary);
}

/* Plan icon, inline in the plan heading. Size lives here (not on the
   img attributes) so future size tweaks need no pattern re-insert.
   Horizontal gap comes from the heading's flex gap. */
.urlr-pricing-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* Card header box: tinted box holding icon/name, price and CTA;
   features list sits below it. */
.urlr-pricing-card-header {
    background-color: var(--wp--preset--color--secondary);
    border: 1px solid #E6EFF5;
    border-radius: 10px;
    padding: var(--wp--preset--spacing--40);
    margin-bottom: var(--wp--preset--spacing--50);
}

/* Resting state for the boxes the hover rule below sweeps: a fully
   transparent twin of the hover gradient (same type, same stop count)
   lets browsers interpolate the stops, so the transition fades instead
   of snapping; where gradient interpolation is unsupported it just
   switches instantly. */
.urlr-pricing-card-header,
.urlr-compare-plan,
.urlr-compare-section {
    background-image: linear-gradient(119.36deg, rgba(100, 166, 243, 0) 50%, rgba(100, 166, 243, 0) 100%);
    transition: background-image 0.5s ease;
}

/* Hover of a whole pricing card (plan card, free banner, or the smaller
   comparison table card) sweeps its inner secondary (#FBFBF8) boxes with
   the shared blue gradient. background-image layers over the surface
   color, so the gradient's transparent half keeps the #FBFBF8 showing.
   The featured Pro cell keeps its own #E6EFF5 fill. */
.urlr-pricing-card:hover .urlr-pricing-card-header,
.urlr-pricing-free:hover .urlr-pricing-card-header--free,
.urlr-compare:hover .urlr-compare-plan:not(.urlr-compare-plan--featured),
.urlr-compare:hover .urlr-compare-section {
    background-image: var(--wp--preset--gradient--review);
}

.urlr-pricing-card-header .wp-block-heading {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--40);
    font-size: var(--wp--preset--font-size--large);
    margin: 0 0 var(--wp--preset--spacing--40);
}

/* Free banner header: horizontal row, name left / button right */
.urlr-pricing-card-header--free .wp-block-heading {
    margin: 0;
}

/* (0,3,0): must outrank the later .urlr-pricing .urlr-pricing-cta
   block-start margin (1rem), which would otherwise push the button
   down inside the banner's centered flex row. */
.urlr-pricing .urlr-pricing-card-header--free .urlr-pricing-cta {
    margin-block-start: 0;
}

/* Same pill as the comparison table's badge (.urlr-compare-badge):
   one size down and line-height 1 so only ~8px straddles the card's
   top border — the card's --40 padding keeps it clear of the header
   box below, no overlap with icon/name. */
.urlr-pricing-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.25rem 0.5rem;
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--contrast);
    border-radius: 6px;
    font-size: 0.6875rem;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* Price and its "HT/mois" suffix share one line: both render inline so
   the period sits at the price's baseline, bottom-right of the digits.
   The period stays a separate (editable) paragraph — no pattern change. */
.urlr-pricing-price {
    display: inline;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

/* padding-left (not margin-left): constrained-group children get
   margin-left: auto !important from WP's layout styles
   (.is-layout-constrained > :where(...)), which would zero any
   horizontal margin here. Padding is not affected by that rule. */
.urlr-pricing .urlr-pricing-period {
    display: inline;
    font-size: var(--wp--preset--font-size--small);
    padding-left: var(--wp--preset--spacing--40);
    opacity: 0.75;
}

/* Feature bullets: check.svg instead of the default disc marker */
.urlr-pricing-features {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.urlr-pricing-features li {
    margin-bottom: var(--wp--preset--spacing--20);
    padding-left: calc(14px + var(--wp--preset--spacing--20));
    background-image: url("assets/icons/check.svg");
    background-repeat: no-repeat;
    /* Vertically center the 14px check in the first text line:
       (line-height 1.6em − icon 14px) / 2 */
    background-position: 0 calc(0.8em - 7px);
    background-size: 14px;
}

/* margin-block-start with (0,2,0) specificity: the global
   :root :where(.is-layout-constrained) > * rule also declares a
   24px block-start margin at (0,1,0) and prints later, so a plain
   margin-top here could never win the cascade. */
.urlr-pricing .urlr-pricing-cta {
    margin-block-start: var(--wp--preset--spacing--40);
    margin-block-end: 0;
}

/* All pricing CTAs: dark fill. Scoped above the theme.json global button
   rules (:root :where(...)) so neither base nor hover states invert. */
/* Plan card CTAs span the full header width (Free banner button excluded) */
.urlr-pricing-card .urlr-pricing-cta .wp-block-button,
.urlr-pricing-card .urlr-pricing-cta .wp-block-button__link {
    width: 100%;
}

.urlr-pricing-cta .wp-block-button__link,
.urlr-pricing-card-header--free .wp-block-button__link {
    background-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
    transition: filter 0.5s ease;
}

.urlr-pricing-cta .wp-block-button__link:hover,
.urlr-pricing-card-header--free .wp-block-button__link:hover {
    filter: brightness(1.2);
}

/* Free plan — wide banner below the 4 columns */
.urlr-pricing-free {
    border: 1px solid #E6EFF5;
    border-radius: 12px;
    padding: var(--wp--preset--spacing--40);
    background-color: var(--wp--preset--color--base);
}

/* "Inclus l'offre X, plus :" — lead-in above the features list */
.urlr-pricing-includes {
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    margin: 0 0 var(--wp--preset--spacing--30);
}

/* ── Header "Démo" link (desktop nav + mobile menu actions) ─── */

.urlr-demo-link {
    margin: 0;
}

.urlr-demo-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--wp--preset--color--contrast);
    font-weight: 600;
    text-decoration: none;
}

.urlr-demo-link a:hover {
    text-decoration: underline;
}

.urlr-demo-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Mobile menu actions: Connexion/S'inscrire render as plain semibold text
   links like the Démo link above, so the actions row stays consistent.
   Scoped to .mobile-menu so the desktop header bar buttons keep their
   fill/outline styles. Specificity beats the theme.json button element
   rules (.wp-block-button__link, .is-style-fill/.is-style-outline and
   their :hover variants). */
.mobile-menu .mobile-menu-actions .wp-block-button__link,
.mobile-menu .mobile-menu-actions .wp-block-button__link.is-style-fill,
.mobile-menu .mobile-menu-actions .wp-block-button__link.is-style-outline {
    display: inline-flex;
    align-items: center;
    width: auto;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    color: var(--wp--preset--color--contrast);
    font-weight: 600;
    text-decoration: none;
}

.mobile-menu .mobile-menu-actions .wp-block-button__link:hover,
.mobile-menu .mobile-menu-actions .wp-block-button__link.is-style-fill:hover,
.mobile-menu .mobile-menu-actions .wp-block-button__link.is-style-outline:hover {
    background: none;
    border-color: transparent;
    color: var(--wp--preset--color--contrast);
    text-decoration: underline;
}

/* Free banner: features as two columns of checks, hugging the left
   edge — fit-content keeps each column at its content size but lets
   long items wrap past 20rem instead of pushing the grid wide. */
.urlr-pricing-free .urlr-pricing-features {
    display: grid;
    grid-template-columns: repeat(2, fit-content(20rem));
    gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--80);
}

.urlr-pricing-free .urlr-pricing-features li {
    margin-bottom: 0;
}

@media (max-width: 782px) {
    .urlr-pricing-controls,
    .urlr-pricing-plans {
        gap: var(--wp--preset--spacing--40);
    }

    .urlr-pricing-free .urlr-pricing-features {
        grid-template-columns: fit-content(20rem);
    }
}

/* Lower middle widths (783px–1024px window, the mobile-menu band): 4
   cards in one row would shrink to ~140–220px each and wrap badly, so
   stack them like on mobile, one full-width card per line. Above 1024px
   the window is wide enough for two cards per line (next block).
   Grid, not flex-wrap: core's own nowrap rule for .wp-block-columns
   prints after style.css and beats a plain class selector, which left
   the columns on one overflowing row. (0,2,0) beats core's (0,1,0)
   display: flex, and grid items ignore core's flex-basis on the
   columns. minmax(0, 1fr) lets the track shrink below the card's
   min-content instead of overflowing. */
@media (min-width: 783px) and (max-width: 1024px) {
    .urlr-pricing-plans.wp-block-columns {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .urlr-pricing-plans.wp-block-columns > .wp-block-column {
        min-width: 0;
    }
}

/* Upper middle widths (1025px–1479px window): the content grid is still
   capped to viewport − 80px in this band (see Responsive above), so 4
   plan cards in one row would shrink to ~200–310px each and their
   headers, prices and full-width CTAs wrap. Show two cards per line
   instead; above 1480px the 1400px content grid gives each card ~314px
   so the single row of 4 fits again. Same grid override as above. */
@media (min-width: 1025px) and (max-width: 1479px) {
    .urlr-pricing-plans.wp-block-columns {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .urlr-pricing-plans.wp-block-columns > .wp-block-column {
        min-width: 0;
    }
}

/* ── Comparatif des forfaits (urlr/pricing-comparison pattern) ── */

/* All visual design for the comparison table lives here, keyed to the
   pattern's stable classNames — same approach as the pricing table: a
   CSS edit propagates to every inserted instance while the content
   (labels, cell values) stays editable in the editor. */

/* Comparison card: no bottom padding — the last feature row ends
   flush with the card's bottom border. (0,2,0) overrides the Carte
   URLR block style's 1.5rem padding. */
.urlr-compare.is-style-urlr-card {
    padding-bottom: 0;
}

/* Scroll container: rows keep a readable min-width (below) and scroll
   horizontally as one block on narrow screens instead of squashing
   the 5 columns. The card itself (is-style-urlr-card) clips children,
   so scrolling has to live on this inner group. */
.urlr-compare .urlr-compare-scroll {
    overflow-x: auto;
    /* The rows' screen-reader spans are position: absolute; without a
       positioned ancestor inside the scroll container they anchor to
       the section above it, escape the horizontal clip, and hold the
       document ~100px wider than the viewport on mobile (scrollWidth
       475 in a 378px viewport). Relative here keeps them anchored to
       the scrolled content; measured on the live comparison page, row
       and logo geometry are unchanged. */
    position: relative;
    /* First child of the constrained card section: without this the
       global 24px block-start rule doubles the card's top padding.
       The .urlr-compare prefix lifts specificity to (0,2,0) — WP's
       layout rules (:root :where(.is-layout-constrained) > *) declare
       the same margin at (0,1,0) but print after style.css, so a
       plain class rule would lose the cascade. */
    margin-block-start: 0;
}

/* Rows and section cards are direct children of this flow group, and
   WP puts 24px block-start on every child except the first — again
   at (0,1,0), printed after style.css. Same (0,2,0) override, so the
   feature rows stay stuck to the section cards above and below. */
.urlr-compare .urlr-compare-scroll > * {
    margin-block-start: 0;
}

/* One row = one grid: label column + 4 plan columns. Every row (header
   included) repeats the same template, so the columns stay aligned
   vertically across rows without a shared grid parent. No gap and no
   row padding: spacing lives on the cells (below), so the column
   borders and the Pro band run continuously down the table.
   Plan track min is 12rem: a plan header cell's min-content is ~190px
   (8px side margins + 2px borders + 24px padding + 32px icon + 12px gap
   + plan name at medium size), and a minmax track never grows for
   content beyond its min — with a smaller min the header cards
   overflowed their tracks and overlapped each other on narrow tables.
   The row min-width (10rem + 4 × 12rem) keeps every row the same width,
   so the tracks line up across rows; below it the whole table scrolls
   as one block instead. */
.urlr-compare-row {
    display: grid;
    grid-template-columns: minmax(10rem, 1.4fr) repeat(4, minmax(12rem, 1fr));
    align-items: stretch;
    min-width: 58rem;
}

/* Mobile and middle widths (up to a 1024px window): the full table's
   58rem min-width needs ~928px of content, i.e. a window of at least
   ~1008px (content is capped to viewport − 80px in the middle band), so
   below 1025px it would scroll horizontally. Compact it instead so it
   fits with no scroll at all: plan header cells stack their icon over
   the name (centered, small size) instead of laying them out inline —
   the inline min-content (~190px) would force a 928px-wide table on a
   phone, while the stacked cell fits an 8rem track (40rem min-width
   fits any window above ~720px). Above 1024px the window gives ≥944px
   of content and the full 58rem table fits without scrolling. */
@media (max-width: 1024px) {
    .urlr-compare-row {
        grid-template-columns: minmax(8rem, 1.4fr) repeat(4, minmax(8rem, 1fr));
        min-width: 40rem;
    }

    .urlr-compare-plan {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .urlr-compare-plan .wp-block-heading {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--wp--preset--spacing--20);
        font-size: var(--wp--preset--font-size--small);
    }

    /* The badge pill is nowrap and wider than the compact 8rem track;
     * a size down keeps it from overhanging the neighbouring plan cells. */
    .urlr-compare-badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.375rem;
    }
}

/* Zero the flow-layout block-start margins WP puts on group children,
   otherwise every cell below the first gets pushed down inside its
   grid area. (0,2,0) via the .urlr-compare prefix: WP's flow rule
   declares the same margin at (0,1,0) but prints after style.css. */
.urlr-compare .urlr-compare-row > * {
    margin-block-start: 0;
}

/* Feature row cells: each cell stretches to the row's height and
   carries its own padding, so borders/backgrounds fill the whole
   column instead of just the text box. Block display, not flex: flex
   fragments inline content into separate items, which drops the
   spaces between them (<strong>300</strong> liens/mois rendered as
   300liens/mois) and ignores <br>. The icon cells don't need flex
   either — background-position centers the icon in the stretched
   cell. */
.urlr-compare-row:not(.urlr-compare-header) > * {
    padding: var(--wp--preset--spacing--30);
    margin-block-start: 0;
}

/* Column separators between the plan columns — no closing border on
   the right edge, the card frames the table. */
.urlr-compare-row:not(.urlr-compare-header) > :not(:first-child) {
    border-left: 1px solid #E6EFF5;
}

/* Pro column band: 3rd cell of every feature row, straight under the
   featured header cell — the only tinted column, others stay white. */
.urlr-compare-row:not(.urlr-compare-header) > :nth-child(3) {
    background-color: #E6EFF5;
}

/* Plan header row: sits on the card's white background. Children keep
   their own box styling and get side margins instead of a grid gap —
   a gap would shrink the tracks and misalign the header with the
   feature columns below. */
.urlr-compare-header {
    padding-block: var(--wp--preset--spacing--40);
}

.urlr-compare-header > * {
    margin-inline: var(--wp--preset--spacing--20);
}

/* Plan header cells: same box as the pricing cards' header (secondary
   background + light-blue border, see .urlr-pricing-card-header) so
   both tables read as one system on the pricing page. Padding is one
   step down (--30 vs the cards' --40) to keep the table dense. */
.urlr-compare-plan {
    /* Cells stretch to equal height in the header row; center the
       icon/name heading vertically inside the card instead of
       leaving it at the top. */
    display: flex;
    align-items: center;
    background-color: var(--wp--preset--color--secondary);
    border: 1px solid #E6EFF5;
    border-radius: 10px;
    padding: var(--wp--preset--spacing--30);
    text-align: left;
}

/* Plan name + icon, aligned on the left of the header cell */
.urlr-compare-plan .wp-block-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--wp--preset--spacing--30);
    font-size: var(--wp--preset--font-size--medium);
    margin: 0;
}

.urlr-compare-plan-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* Featured plan (Pro): light-blue fill + primary border, with the
   badge pill floating above the cell like the pricing cards' featured
   badge. The smaller badge only dips ~8px past the top border, so the
   regular --30 padding already clears it — same metrics as the
   other cards. */
.urlr-compare-plan--featured {
    position: relative;
    background-color: #E6EFF5;
    border-color: var(--wp--preset--color--primary);
}

/* Badge pill — same design as .urlr-pricing-badge, straddling the
   featured cell's top border; one size down so it fits the smaller
   header cells. */
.urlr-compare-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.25rem 0.5rem;
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--contrast);
    border-radius: 6px;
    font-size: 0.6875rem;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* Section heading (Liens, Statistiques, Image de marque...) — same
   box family as the plan header cells, with its category icon on the
   left of the label. No vertical margins: feature rows stick to the
   card above and below, so the card's bottom/top borders close the
   table. Spacing above the first card comes from the plan header
   row's own padding-block. */
.urlr-compare-section {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--30);
    background-color: var(--wp--preset--color--secondary);
    border: 1px solid #E6EFF5;
    border-radius: 10px;
    padding: var(--wp--preset--spacing--30);
    font-weight: 700;
    margin: 0;
}

.urlr-compare-section-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Feature label, left column — flex cell, text on the left */
.urlr-compare-label {
    margin: 0;
}

/* Plan value cells: text (number, Illimité...) centered, or an empty
   paragraph carrying urlr-compare-check / urlr-compare-cross which
   draws the icon. min-height keeps empty rows tall enough for the
   icon. */
.urlr-compare-value {
    text-align: center;
    font-weight: 600;
    margin: 0;
}

.urlr-compare-check,
.urlr-compare-cross {
    min-height: 1.5rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.urlr-compare-check {
    background-image: url("assets/icons/check.svg");
}

.urlr-compare-cross {
    background-image: url("assets/icons/cross.svg");
}

/* ── Comparatifs concurrents ([urlr_comparison] shortcode) ── */

/* The vs table reuses the pricing comparison's row/cell classes
   (urlr-compare-*) but renders flat: no boxed cards, no column
   separators. The only decoration is the URLR column tint (below) and
   the 1px separator after each section. Grid template and min-width
   are redefined under the .urlr-vs scope, leaving the pricing pages'
   4-column rules untouched. */
.urlr-vs .urlr-compare-row {
    grid-template-columns: minmax(10rem, 1.4fr) repeat(2, minmax(6rem, 1fr));
    min-width: 30rem;
}

/* Drop the pricing table's column separators in the flat vs table. */
.urlr-vs .urlr-compare-row:not(.urlr-compare-header) > :not(:first-child) {
    border-left: 0;
}

/* The pricing table tints its 3rd cell as the Pro column band; the vs
   table is fully flat, so the band is neutralized here. Same selector
   at (0,4,0) beats the pricing rule's (0,3,0) regardless of print
   order. */
.urlr-vs .urlr-compare-row:not(.urlr-compare-header) > :nth-child(3) {
    background-color: transparent;
}

/* Row cells: one spacing step more vertically than horizontally, so
   the values sit clearly off the separator lines — both the per-row
   lines in the URLR column and the section separators that cross the
   other columns too. */
.urlr-vs .urlr-compare-row:not(.urlr-compare-header) > * {
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
}

/* Feature labels sit flush left with the section titles above them:
   drop the label cells' left padding (value cells keep theirs, they're
   centered anyway). */
.urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-label {
    padding-left: 0;
}

/* Section separator: a 1px line after each section, never after the
   last one — carried by the section's last row (urlr-vs-section-end,
   set by the block when the next row starts a new section). */
.urlr-vs .urlr-vs-section-end {
    border-bottom: 1px solid #E6EFF5;
}

/* Section titles share the rows' grid, so the label aligns with the
   feature column and, on "X vs URLR" pages, the URLR column box can
   run continuously through title rows (the ::after cell below). The
   vertical spacing lives on the label's padding, not on the title's
   margins, so nothing ever interrupts the column. */
.urlr-vs .urlr-vs-section-title {
    display: grid;
    grid-template-columns: minmax(10rem, 1.4fr) repeat(2, minmax(6rem, 1fr));
    min-width: 30rem;
    margin: 0;
}

.urlr-vs .urlr-vs-section-title-label {
    grid-column: 1 / 3;
    padding: var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--20);
    font-weight: 700;
}

/* Logo cells: the pricing table's header-cell side margins would make
   the URLR column box narrower than the value cells below (a visible
   step at its edges) — logos center in their track, no margin needed. */
.urlr-vs .urlr-compare-header > .urlr-vs-logo {
    margin-inline: 0;
}

/* "X vs URLR" pages carry urlr-vs--urlr: the URLR column pops out of
   the card, white background with the primary color around the whole
   column. The side borders run on every URLR cell, the header logo
   cell closes the top corners, the last row closes the bottom, and
   title rows continue the box via their ::after cell. Every row also
   carries the hairline separator across the full table width, so the
   row rhythm reads the same in every column; the last row overrides
   it with the closing primary border. */
.urlr-vs--urlr .urlr-compare-row:not(.urlr-compare-header) > :nth-child(3) {
    background-color: #fff;
    border-left: 1px solid var(--wp--preset--color--primary);
    border-right: 1px solid var(--wp--preset--color--primary);
    border-bottom: 1px solid #E6EFF5;
}

.urlr-vs--urlr .urlr-vs-section-title::after {
    content: "";
    grid-column: 3;
    background-color: #fff;
    border-left: 1px solid var(--wp--preset--color--primary);
    border-right: 1px solid var(--wp--preset--color--primary);
    border-bottom: 1px solid #E6EFF5;
}

/* The title separator must read as one continuous line across the
   table like the section separator below each section, not stop at
   the URLR column box. The label spans the first two tracks, so its
   hairline closes the gap; the ::after cell covers the third. */
.urlr-vs--urlr .urlr-vs-section-title-label {
    border-bottom: 1px solid #E6EFF5;
}

.urlr-vs--urlr .urlr-compare-header .urlr-vs-logo:last-child {
    background-color: #fff;
    border: 1px solid var(--wp--preset--color--primary);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
}

.urlr-vs--urlr .urlr-compare-row:not(.urlr-compare-header):last-of-type > :nth-child(3) {
    border-bottom: 1px solid var(--wp--preset--color--primary);
    border-radius: 0 0 12px 12px;
}

/* Every value row but the last carries the hairline across all three
   columns, so the row rhythm reads consistently wherever a row ends —
   before another value, a section title, or a new section. The URLR
   column's segment comes from the nth-child(3) rule above; the first
   two columns get it here. */
.urlr-vs--urlr .urlr-compare-row:not(.urlr-compare-header):not(:last-of-type) > :nth-child(-n+2) {
    border-bottom: 1px solid #E6EFF5;
}

/* The row-level section separator is zeroed: every cell already
   carries its own hairline, a row border would double the line. */
.urlr-vs--urlr .urlr-vs-section-end {
    border-bottom: 0;
}

/* Card container around the flat table: soft off-white background,
   light-blue border, same 12px radius as the site's other cards
   (.urlr-blog-card, the pricing table). Overflow hidden clips children
   to the rounded corners; horizontal scrolling stays on the inner
   scroll container. */
.urlr-vs {
    background-color: #FBFBF8;
    border: 1px solid #E6EFF5;
    border-radius: 12px;
    overflow: hidden;
    padding: 1.5rem;
    margin-top: var(--wp--preset--spacing--50);
}

/* Flat logo header row: no boxed plan cells, logos centered above
   their columns. No padding below the logos: the first row's own cell
   padding provides the gap. */
.urlr-vs .urlr-compare-header {
    padding-block: 0;
}

.urlr-vs .urlr-vs-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Yes/no icons: the check reads larger than the cross, so an
   available feature outweighs a missing one. The pricing table keeps
   the shared 14px size for both. */
.urlr-vs .urlr-compare-check {
    background-size: 24px;
}

.urlr-vs .urlr-compare-cross {
    background-size: 10px;
}

/* Column header logos are logo-only (the name lives in the alt text):
   every logo shares the same height so both columns align, width follows
   each logo's own ratio up to a cap, and contain letterboxes instead of
   squashing anything that exceeds the box. Overrides the pricing
   table's fixed 32px square, which stays untouched on its own pages. */
.urlr-vs .urlr-compare-plan-icon {
    width: auto;
    max-width: 7.5rem;
    height: 2.5rem;
    object-fit: contain;
}

/* Phones (≤ 782px): the 3-column grid has a 30rem min-width and would
   scroll horizontally, leaving the URLR column off-screen to the
   right. Stack each feature instead: the label takes the full row
   width, the two value cells sit side by side underneath, each
   carrying its column caption (data-caption, rendered below); the
   logo header row stays visible on top, small, aligned over the two
   columns. Desktop is untouched: everything lives in this media
   query under .urlr-vs. */
@media (max-width: 782px) {
    .urlr-vs {
        padding: var(--wp--preset--spacing--40);
    }

    .urlr-vs .urlr-compare-scroll {
        overflow-x: visible;
    }

    .urlr-vs .urlr-compare-row,
    .urlr-vs .urlr-vs-section-title {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
    }

    /* Logo header row: the empty label cell is dropped so the two
       logos land in columns 1 and 2 of the same row; logos shrink to
       a small size and the row closes on a hairline. */
    .urlr-vs .urlr-compare-header {
        padding-bottom: var(--wp--preset--spacing--30);
        border-bottom: 1px solid #E6EFF5;
    }

    .urlr-vs .urlr-compare-header > .urlr-compare-label {
        display: none;
    }

    .urlr-vs .urlr-compare-header .urlr-vs-logo .urlr-compare-plan-icon {
        height: 1.5rem;
        max-width: 4.5rem;
    }

    .urlr-vs .urlr-compare-header .urlr-vs-logo .wp-block-heading {
        font-size: var(--wp--preset--font-size--small);
    }

    /* The "X vs URLR" header box around the URLR logo is a desktop
       column-top decoration; flat on phones. */
    .urlr-vs--urlr .urlr-compare-header .urlr-vs-logo:last-child {
        background-color: transparent;
        border: 0;
        border-radius: 0;
        padding: 0;
    }

    /* Feature label spans both columns and reads as the card's header:
       bold text closed by a hairline above the two value cells. */
    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-label {
        grid-column: 1 / -1;
        padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30) var(--wp--preset--spacing--40) 0;
        font-weight: 700;
        border-bottom: 1px solid #E6EFF5;
    }

    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-value {
        padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
    }

    /* Hairline between the two value cells. */
    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > :nth-child(2) {
        border-right: 1px solid #E6EFF5;
    }

    /* One full-width hairline per row instead of per-cell lines. */
    .urlr-vs .urlr-compare-row:not(.urlr-compare-header):not(:last-of-type) {
        border-bottom: 1px solid #E6EFF5;
    }

    .urlr-vs--urlr .urlr-compare-row:not(.urlr-compare-header):not(:last-of-type) > :nth-child(-n+2) {
        border-bottom: 0;
    }

    /* URLR highlight moves from the column box to a per-cell tint. The
       second selector also beats the last-row closing border, which is
       (0,5,0) like the base rule and loses only by source order here. */
    .urlr-vs--urlr .urlr-compare-row:not(.urlr-compare-header) > :nth-child(3),
    .urlr-vs--urlr .urlr-compare-row:not(.urlr-compare-header):last-of-type > :nth-child(3) {
        border: 0;
        border-radius: 0;
        background-color: #EAF3FE;
    }

    .urlr-vs .urlr-vs-section-title-label {
        grid-column: 1 / -1;
    }

    .urlr-vs--urlr .urlr-vs-section-title::after {
        content: none;
    }

    /* Column caption above each value, from the cell's data-caption. */
    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-value::before {
        content: attr(data-caption);
        display: block;
        margin-bottom: var(--wp--preset--spacing--20);
        font-size: var(--wp--preset--font-size--small);
        font-weight: 700;
        opacity: 0.65;
    }


    /* Check/cross icons move from the cell's background to an ::after
       under the caption, so the caption never overlaps the icon. */
    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-check,
    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-cross {
        min-height: 0;
        background-image: none;
    }

    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-check::after,
    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-cross::after {
        content: "";
        display: block;
        width: 24px;
        height: 24px;
        margin: 0 auto;
        background-repeat: no-repeat;
        background-position: center;
    }

    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-check::after {
        background-image: url("assets/icons/check.svg");
        background-size: 24px;
    }

    .urlr-vs .urlr-compare-row:not(.urlr-compare-header) > .urlr-compare-cross::after {
        background-image: url("assets/icons/cross.svg");
        background-size: 10px;
    }
}

/* ── Steps tabs (urlr/steps-tabs pattern) ──────────────────── */

/* All visual design lives here, keyed to the pattern's stable
   classNames — so a CSS edit propagates to every inserted instance
   while text stays editable in the editor. JS (assets/js/steps-tabs.js)
   toggles .is-active on the clicked tab and its panel. */

.urlr-steps {
    background: var(--wp--preset--color--contrast);
    border-radius: 24px;
    padding: var(--wp--preset--spacing--70);
    color: var(--wp--preset--color--base);
    /* Per-instance accent: the whole pattern derives from this
       variable, defaulting to the links yellow. */
    --urlr-steps-accent: var(--wp--preset--color--links);
}

/* To recolor an inserted instance, add one of these classes to the
   outer section group via the editor's "Additional CSS class(es)"
   field. Each variant maps to its theme.json palette token:
   links (default), qr-codes, stats, api, purple (also aliased as
   linkinbio), brand-domain. */
.urlr-steps--qr-codes {
    --urlr-steps-accent: var(--wp--preset--color--qr-codes);
}

.urlr-steps--stats {
    --urlr-steps-accent: var(--wp--preset--color--stats);
}

.urlr-steps--api {
    --urlr-steps-accent: var(--wp--preset--color--api);
}

.urlr-steps--purple,
.urlr-steps--linkinbio {
    --urlr-steps-accent: var(--wp--preset--color--purple);
}

.urlr-steps--brand-domain {
    --urlr-steps-accent: var(--wp--preset--color--brand-domain);
}

/* Frontend layout: each step lives in a .urlr-steps-item group (its tab
   plus its panel), which makes the pattern easy to edit in the editor.
   On the frontend the items and the JS-created tablist wrapper are
   flattened (display: contents): the section becomes a wrapping flex
   row where tabs come first (order 1) and the active panel spans the
   full width below (order 2). In the editor none of this applies: each
   item stacks its tab over its panel and every panel stays visible. */
body:not(.block-editor-iframe__body) .urlr-steps {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--30);
}

body:not(.block-editor-iframe__body) .urlr-steps-tabs,
body:not(.block-editor-iframe__body) .urlr-steps-item {
    display: contents;
}

body:not(.block-editor-iframe__body) .urlr-steps-panel {
    order: 2;
    flex: 1 1 100%;
    margin-top: var(--wp--preset--spacing--50);
}

/* Tab strip — one horizontal row of five equal pills on the dark
   section. Each tab stacks its number badge over its label; the border
   is a fading gradient ring drawn by the ::before mask (border-image
   can't do rounded corners or a missing side), open at the bottom. The
   active tab adds a fading pale-yellow wash, a stronger gradient ring,
   and its number badge switches from dim to full token. */
.urlr-steps-tab {
    position: relative;
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--30);
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 16px 16px 0 0;
    color: var(--wp--preset--color--base);
    font-family: var(--wp--preset--font-family--body);
    /* 1rem: between the small (0.875rem) and medium (1.125rem) tokens. */
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: background 0.5s ease;
}

/* Gradient ring: a 1px frame obtained by excluding the content box from
   the pseudo-element's mask. Inset stops 1px short of the bottom edge,
   so the ring never paints a bottom border. */
.urlr-steps-tab::before {
    content: "";
    position: absolute;
    inset: 0 0 1px 0;
    border-radius: 16px 16px 0 0;
    padding: 1px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--urlr-steps-accent) 30%, transparent) 0%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.urlr-steps-tab:hover {
    background: linear-gradient(180deg, color-mix(in srgb, var(--urlr-steps-accent) 10%, transparent) 0%, transparent 100%);
}

.urlr-steps-tab.is-active {
    background: linear-gradient(180deg, color-mix(in srgb, var(--urlr-steps-accent) 20%, transparent) 0%, transparent 100%);
}

.urlr-steps-tab.is-active::before {
    background: linear-gradient(180deg, var(--urlr-steps-accent) 0%, transparent 100%);
}

/* JS gives the tabs their role/tabindex, so they need a visible focus
   ring when reached by keyboard. */
.urlr-steps-tab:focus-visible {
    outline: 2px solid var(--urlr-steps-accent);
    outline-offset: 2px;
    box-shadow: none;
}

/* Number badge — rounded square holding the step number, dim pale
   yellow by default, full token on the active tab. It is a paragraph
   block in the markup (editable number), restyled as a badge here. */
.urlr-steps-tab p {
    margin: 0;
}

.urlr-steps-tab-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.25rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--urlr-steps-accent) 50%, white);
    color: var(--wp--preset--color--contrast);
    font-weight: 800;
    flex: none;
}

.urlr-steps-tab.is-active .urlr-steps-tab-num {
    background: var(--urlr-steps-accent);
}

/* Panels: only the active one is visible on the frontend. JS toggles
   .is-active; without JS the first panel (marked is-active in the
   pattern markup) stays visible. In the editor all panels stay visible
   so every step's text remains editable. */
body:not(.block-editor-iframe__body) .urlr-steps .urlr-steps-panel {
    display: none;
}

body:not(.block-editor-iframe__body) .urlr-steps .urlr-steps-panel.is-active {
    display: block;
}

.urlr-steps-panel p {
    color: var(--wp--preset--color--base);
}

.urlr-steps-panel-cols {
    gap: var(--wp--preset--spacing--60);
    align-items: center;
}

/* Step visual — editor drops an image (e.g. a mockup screenshot) into
   the right column; round its corners to match the section. */
.urlr-steps-panel-visual img {
    border-radius: 12px;
}

@media (max-width: 782px) {
    .urlr-steps {
        padding: var(--wp--preset--spacing--50);
        border-radius: 16px;
    }

    /* Five labeled tabs don't fit one row on phones: stack them one per
       line (full width each), the active panel still spans the full
       width below. */
    body:not(.block-editor-iframe__body) .urlr-steps-tab {
        flex: 1 1 100%;
    }
}

/* Card tabs (urlr/icon-tabs pattern) — same dark section, structure
   and JS as the steps tabs, with the urlr-steps--card-tabs modifier on
   the section swapping the gradient pills for white cards: icon image
   block on the left, title next to it, no number badge. The selected
   card sits in a box (the urlr-steps-tab-box group, carrying the
   card's color from the markup) flowing down from the section's very
   top edge, instead of taking an accent border. */

/* The padding-top is mirrored by the box's top offset in the .is-active
   rules below. overflow hidden clips the selected card's box to the
   section's rounded rectangle: the box overlaps the section's top
   edge by 1px (see below), which would otherwise leak onto the page
   background, while the clipping also guarantees no dark subpixel seam
   can show between the page background and the box. The surface is
   the box's own color (#fbfbf8, which has no matching theme.json
   preset, so the raw value lives in this one variable); the cards
   keep whatever background they are given. */
.urlr-steps--card-tabs {
    --urlr-card-tabs-surface: #fbfbf8;
    padding-top: var(--wp--preset--spacing--30);
    overflow: hidden;
}

/* Card tabs hug their content, so center the strip on the section
   instead of left-aligning it like the equal-width step pills. The
   panel spans the full width (order 2, flex 1 1 100%), so centering
   doesn't affect it. */
body:not(.block-editor-iframe__body) .urlr-steps--card-tabs {
    justify-content: center;
}

/* Equal-width cards without stretching the row: the runtime tablist
   wrapper (steps-tabs.js moves the tabs into it on the frontend)
   becomes an inline grid whose columns all share the widest card's
   width, so the strip stays content-sized and centered while every
   card matches. The grid's own gap spaces the cards, the section's gap
   the strip-to-panel one. position + z-index also turn the strip into
   a stacking context, so the selected card's box (z-index -1, below)
   paints behind the cards but above the section's background. */
body:not(.block-editor-iframe__body) .urlr-steps--card-tabs .urlr-steps-tabs {
    order: 1;
    position: relative;
    z-index: 1;
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: var(--wp--preset--spacing--50);
}

/* Same stacking context for the editor, where the runtime strip does
   not exist: there each item group wraps its tab, so the box paints
   within it. On the frontend items are display: contents, so this rule
   is a no-op there. */
.urlr-steps--card-tabs .urlr-steps-item {
    position: relative;
    z-index: 0;
}

.urlr-steps--card-tabs .urlr-steps-tab {
    flex: 0 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    background: var(--wp--preset--color--base);
    border: 1px solid var(--wp--preset--color--contrast);
    border-radius: 8px;
    color: var(--wp--preset--color--contrast);
    font-size: var(--wp--preset--font-size--medium);
}

/* The real border replaces the gradient ring pseudo-element. */
.urlr-steps--card-tabs .urlr-steps-tab::before {
    display: none;
}

.urlr-steps--card-tabs .urlr-steps-tab:hover {
    background: var(--wp--preset--color--base);
}

/* The selected card's box is a real empty group inside the tab
   (urlr-steps-tab-box, first child of the pattern's tab groups),
   hidden unless the tab is active, on the surface color defined above.
   The halo is harmonized: 0.75rem
   around the card on all four sides, and because the section's
   padding-top (spacing 30) equals that halo, the box's top edge sits
   flush on the section's very top edge (the extra 1px in the top
   offset overlaps past that edge and is clipped away by the
   section's overflow hidden, so no dark subpixel seam can show
   between the page background and the box) and lines up with the
   page background above it. Bottom corners rounded 16px, top corners
   square: the flare rules below shape them. The active card keeps its own background and dark
   border: the box alone is the selection marker. z-index -1 keeps it
   behind the card, painting between the section's background and the
   card inside the stacking contexts set up above. */
.urlr-steps--card-tabs .urlr-steps-tab-box {
    display: none;
}

.urlr-steps--card-tabs .urlr-steps-tab.is-active .urlr-steps-tab-box {
    display: block;
    position: absolute;
    top: calc(-1 * var(--wp--preset--spacing--30) - 1px);
    right: -0.75rem;
    bottom: -0.75rem;
    left: -0.75rem;
    z-index: -1;
    background-color: var(--urlr-card-tabs-surface);
    border-radius: 0 0 16px 16px;
}

/* Chrome-tab flares on the selected card's box: the box's top outer
   corners flare outward into the section's top edge, and the dark
   section gets scooped by concave curves where it meets the surface.
   Each ear is a 0.75rem square (the box's own halo size) hugging a
   top corner of the box, flush with its top edge, filled with the
   surface color. A radial-gradient centered on the ear's outer
   bottom corner cuts a quarter-disc notch out of the fill, so the
   curve runs from the flare tip down to the box's side edge, meeting
   it tangentially 0.75rem below the top, no gap or seam. The ears
   live on the box, whose z-index: -1 keeps them behind the card;
   the card keeps its full 1px outline and 8px radius. The ears reach
   1.5rem past the card, inside the section's padding, so its
   overflow: hidden only trims the same 1px top overlap the box
   itself relies on against the page background. */
.urlr-steps--card-tabs .urlr-steps-tab.is-active .urlr-steps-tab-box::before,
.urlr-steps--card-tabs .urlr-steps-tab.is-active .urlr-steps-tab-box::after {
    content: "";
    position: absolute;
    top: 0;
    width: 0.75rem;
    height: 0.75rem;
    pointer-events: none;
}

/* Left ear, flaring left of the box's top-left corner. */
.urlr-steps--card-tabs .urlr-steps-tab.is-active .urlr-steps-tab-box::before {
    left: -0.75rem;
    background: radial-gradient(circle at bottom left, transparent calc(0.75rem - 0.5px), var(--urlr-card-tabs-surface) 0.75rem);
}

/* Right ear, mirrored. */
.urlr-steps--card-tabs .urlr-steps-tab.is-active .urlr-steps-tab-box::after {
    right: -0.75rem;
    background: radial-gradient(circle at bottom right, transparent calc(0.75rem - 0.5px), var(--urlr-card-tabs-surface) 0.75rem);
}

/* Icon — the tab's image block, kept small and never stretched. */
.urlr-steps--card-tabs .urlr-steps-tab .wp-block-image {
    flex: none;
}

.urlr-steps--card-tabs .urlr-steps-tab .wp-block-image img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

@media (max-width: 782px) {
    /* Match the section's other sides (spacing 50 on mobile) instead of
       the desktop-only spacing 30 top padding: otherwise the first card
       sits flush on the section's top edge. */
    body:not(.block-editor-iframe__body) .urlr-steps--card-tabs {
        padding-top: var(--wp--preset--spacing--50);
    }

    /* The side-by-side card grid overflows on phones: switch the strip
       to a single stacked column spanning the full content width, so
       each card keeps a large tap target instead of a centered
       content-sized strip. */
    body:not(.block-editor-iframe__body) .urlr-steps--card-tabs .urlr-steps-tabs {
        flex: 1 1 100%;
        grid-auto-flow: row;
    }

    /* The "attached to the top" box is a desktop signature: there every
       card sits in the strip's single row, so the active box always
       reaches the section's top edge. Stacked on mobile only the first
       card can attach there; on any other card the square top corners
       and the side flares would float mid-section and read as a glitch.
       Degrade to a plain rounded halo on all four sides (top included,
       so no card is flush against the section's top edge) and drop the
       flares (they only make sense cut into the top edge). */
    body:not(.block-editor-iframe__body) .urlr-steps--card-tabs .urlr-steps-tab.is-active .urlr-steps-tab-box {
        top: -0.75rem;
        border-radius: 16px;
    }

    body:not(.block-editor-iframe__body) .urlr-steps--card-tabs .urlr-steps-tab.is-active .urlr-steps-tab-box::before,
    body:not(.block-editor-iframe__body) .urlr-steps--card-tabs .urlr-steps-tab.is-active .urlr-steps-tab-box::after {
        content: none;
    }
}

/* Stepper panel content: on the frontend the panel is display: block
   (see the .urlr-steps-panel rules above), so the flex alignment and
   blockGap saved in the editor's layout settings don't apply there.
   Center the text and the media below it, and keep a margin between
   them. Images are display: block via the theme's figure.wp-block-image
   img rule, so text-align alone won't center them: the img gets auto
   side margins instead. Panels using the two-column layout
   (urlr-steps-panel-cols, text beside the visual) keep their left-aligned
   text, so the text-align rule skips them. */
body:not(.block-editor-iframe__body) .urlr-steps .urlr-steps-panel:not(:has(.urlr-steps-panel-cols)) {
    text-align: center;
}

body:not(.block-editor-iframe__body) .urlr-steps .urlr-steps-panel > * + * {
    margin-top: var(--wp--preset--spacing--50);
}

body:not(.block-editor-iframe__body) .urlr-steps .urlr-steps-panel img {
    margin-left: auto;
    margin-right: auto;
}

/* Cookie consent card (bottom-left). Strings come from the theme .po files. */
.urlr-consent {
    position: fixed;
    left: var(--wp--preset--spacing--40);
    bottom: var(--wp--preset--spacing--40);
    z-index: 400;
    max-width: min(420px, calc(100vw - 2 * var(--wp--preset--spacing--40)));
}

.urlr-consent[hidden] {
    display: none;
}

.urlr-consent-card {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--30);
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast);
    border: 1px solid rgba(42, 24, 32, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(42, 24, 32, 0.14);
    animation: urlr-consent-in 0.25s ease-out;
}

@keyframes urlr-consent-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

.urlr-consent-title {
    margin: 0;
    color: var(--wp--preset--color--contrast);
    font-weight: 700;
}

.urlr-consent-text {
    margin: 0;
    color: var(--wp--preset--color--contrast);
    font-size: var(--wp--preset--font-size--small);
    text-align: left;
}

.urlr-consent-link {
    color: var(--wp--preset--color--primary);
    text-decoration: underline;
}

.urlr-consent-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}

.urlr-consent-accept {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
    border: 0;
    border-radius: 999px;
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.urlr-consent-accept:hover,
.urlr-consent-accept:focus {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--contrast);
}

.urlr-consent-refuse {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: none;
    color: var(--wp--preset--color--contrast);
    border: 0;
    border-radius: 999px;
    font-size: var(--wp--preset--font-size--small);
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .urlr-consent {
        left: var(--wp--preset--spacing--30);
        right: var(--wp--preset--spacing--30);
        bottom: var(--wp--preset--spacing--30);
        max-width: none;
    }
}
