@layer reset, base, layout, components, utilities;

@layer reset {

    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html {
        scroll-behavior: smooth;
    }

    body,
    h1,
    h2,
    h3,
    p,
    ul {
        margin: 0;
    }

    ul {
        padding: 0;
        list-style: none;
    }

    img,
    svg {
        display: block;
        max-width: 100%;
    }

    button,
    input,
    textarea,
    select {
        font: inherit;
    }
}

@layer base {
    :root {
        --bg: #fff8f8;
        --surface: rgba(255, 255, 255, 0.88);
        --surface-solid: #ffffff;
        --surface-soft: #fff0f1;
        --surface-hover: #f9e3e7;
        --text: #271017;
        --text-soft: #765a63;
        --text-muted: #9b7c85;
        --muted: var(--text-soft);
        --border: rgba(71, 21, 35, 0.11);
        --border-strong: rgba(71, 21, 35, 0.2);
        --primary: #e5485d;
        --primary-strong: #c9344d;
        --primary-soft: rgba(229, 72, 93, 0.12);
        --violet: rgb(209, 141, 102);
        --violet-soft: rgba(133, 54, 173, 0.12);
        --accent: #ff8a62;
        --cyan: var(--accent);
        --success: #2e9c72;
        --danger: #c8354e;
        --shadow-sm: 0 12px 35px rgba(79, 25, 41, 0.08);
        --shadow: 0 26px 80px rgba(79, 25, 41, 0.14);
        --shadow-lg: 0 38px 110px rgba(79, 25, 41, 0.19);
        --radius-sm: 13px;
        --radius-md: 21px;
        --radius-lg: 34px;
        --container: 1240px;
        --header-height: 74px;
    }

    :root[data-theme="dark"] {
        --bg: #10080d;
        --surface: rgba(31, 16, 25, 0.9);
        --surface-solid: #21121b;
        --surface-soft: #2d1924;
        --surface-hover: #39202e;
        --text: #fff4f6;
        --text-soft: #c9aeb7;
        --text-muted: #9e7e89;
        --muted: var(--text-soft);
        --border: rgba(255, 231, 237, 0.1);
        --border-strong: rgba(255, 231, 237, 0.2);
        --primary: #ff667a;
        --primary-strong: #ff8a99;
        --primary-soft: rgba(255, 102, 122, 0.14);
        --violet: rgb(209, 141, 102);
        --violet-soft: rgba(172, 99, 210, 0.15);
        --accent: #ff9e73;
        --cyan: var(--accent);
        --success: #54c692;
        --danger: #ff7085;
        --shadow-sm: 0 12px 38px rgba(0, 0, 0, 0.25);
        --shadow: 0 28px 85px rgba(0, 0, 0, 0.42);
        --shadow-lg: 0 40px 120px rgba(0, 0, 0, 0.52);
    }

    body {
        min-height: 100vh;
        overflow-x: hidden;
        color: var(--text);
        background:
            radial-gradient(circle at 7% 4%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 25rem),
            radial-gradient(circle at 94% 17%, color-mix(in srgb, var(--violet) 15%, transparent), transparent 24rem),
            radial-gradient(circle at 70% 100%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 24rem),
            var(--bg);
        font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        line-height: 1.6;
        transition: color 180ms ease, background-color 180ms ease;
    }

    body::before {
        position: fixed;
        z-index: -1;
        inset: 0;
        background-image:
            linear-gradient(color-mix(in srgb, var(--primary) 4%, transparent) 1px, transparent 1px),
            linear-gradient(90deg, color-mix(in srgb, var(--violet) 4%, transparent) 1px, transparent 1px);
        background-size: 44px 44px;
        mask-image: linear-gradient(to bottom, black, transparent 82%);
        content: "";
        pointer-events: none;
    }

    a {
        color: inherit;
        text-decoration: none;
    }

    button {
        color: inherit;
    }

    :focus-visible {
        outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
        outline-offset: 3px;
    }

    ::selection {
        color: #ffffff;
        background: var(--primary);
    }
}

@layer layout {
    .container {
        width: min(calc(100% - 2rem), var(--container));
        margin-inline: auto;
    }

    .site-main {
        min-height: 60vh;
    }

    .section {
        padding-block: clamp(4rem, 8vw, 7rem);
    }

    .section--compact {
        padding-block: clamp(3rem, 6vw, 5rem);
    }

    .section-heading {
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .section-heading__copy {
        max-width: 700px;
    }

    .section-heading h2,
    .catalog-heading h1 {
        margin-top: 0.45rem;
        font-size: clamp(2rem, 4vw, 3.65rem);
        line-height: 1.04;
        letter-spacing: -0.05em;
    }

    .section-heading p,
    .catalog-heading p {
        margin-top: 1rem;
        color: var(--text-soft);
    }
}

@layer components {
    .eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        color: var(--primary);
        font-size: 0.78rem;
        font-weight: 850;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .eyebrow::before {
        width: 1.75rem;
        height: 1px;
        background: currentColor;
        content: "";
    }

    .text-link {
        color: var(--primary);
        font-weight: 800;
    }

    .text-link:hover {
        color: var(--primary-strong);
    }

    .site-header {
        position: sticky;
        z-index: 50;
        top: 0;
        border-bottom: 1px solid var(--border);
        background: color-mix(in srgb, var(--bg) 80%, transparent);
        backdrop-filter: blur(22px);
    }

    .navbar {
        display: grid;
        min-height: var(--header-height);
        grid-template-columns: minmax(130px, 190px) 1fr auto;
        align-items: center;
        gap: 1.75rem;
    }

    .brand {
        display: inline-flex;
        align-items: center;
    }

    .brand__logo {
        width: clamp(122px, 12vw, 178px);
        height: auto;
        object-fit: contain;
    }

    :root[data-theme="dark"] .brand__logo {
        filter: brightness(1.08) contrast(1.04);
    }

    .main-navigation {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(0.8rem, 2vw, 1.6rem);
        color: var(--text-soft);
        font-size: 0.9rem;
        font-weight: 720;
    }

    .main-navigation a {
        position: relative;
        padding-block: 0.7rem;
        white-space: nowrap;
    }

    .main-navigation a::after {
        position: absolute;
        right: 0;
        bottom: 0.18rem;
        left: 0;
        height: 2px;
        border-radius: 99px;
        background: linear-gradient(90deg, var(--primary), var(--violet));
        transform: scaleX(0);
        content: "";
        transition: transform 180ms ease;
    }

    .main-navigation a:hover {
        color: var(--text);
    }

    .main-navigation a:hover::after {
        transform: scaleX(1);
    }

    .navbar__actions {
        display: flex;
        align-items: center;
        justify-content: end;
        gap: 0.5rem;
    }

    .menu-toggle {
        display: none;
    }

    .theme-toggle__moon {
        display: none;
    }

    :root[data-theme="dark"] .theme-toggle__sun {
        display: none;
    }

    :root[data-theme="dark"] .theme-toggle__moon {
        display: block;
    }

    .language-picker {
        position: relative;
    }

    .language-picker summary {
        list-style: none;
    }

    .language-picker summary::-webkit-details-marker {
        display: none;
    }

    .language-picker__menu {
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 0;
        width: 210px;
        padding: 0.55rem;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: var(--surface-solid);
        box-shadow: var(--shadow);
    }

    [dir="rtl"] .language-picker__menu {
        right: auto;
        left: 0;
    }

    .language-picker__menu a {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.7rem 0.8rem;
        border-radius: 12px;
        color: var(--text-soft);
        font-size: 0.9rem;
        font-weight: 700;
    }

    .language-picker__menu a:hover,
    .language-picker__menu a.is-active {
        color: var(--text);
        background: var(--surface-soft);
    }

    .category-navigation {
        border-top: 1px solid var(--border);
        background: color-mix(in srgb, var(--surface-solid) 75%, transparent);
    }

    .category-navigation__inner {
        display: flex;
        overflow-x: auto;
        gap: 0.45rem;
        padding-block: 0.6rem;
        scrollbar-width: none;
    }

    .category-navigation__inner::-webkit-scrollbar {
        display: none;
    }

    .category-navigation a {
        flex: 0 0 auto;
        padding: 0.5rem 0.85rem;
        border-radius: 999px;
        color: var(--text-soft);
        font-size: 0.84rem;
        font-weight: 720;
        white-space: nowrap;
    }

    .category-navigation a:hover {
        color: var(--text);
        background: var(--surface-soft);
    }

    .flash-stack {
        position: fixed;
        z-index: 70;
        top: calc(var(--header-height) + 1rem);
        right: max(1rem, calc((100vw - var(--container)) / 2));
        display: grid;
        width: min(390px, calc(100vw - 2rem));
        gap: 0.6rem;
    }

    [dir="rtl"] .flash-stack {
        right: auto;
        left: max(1rem, calc((100vw - var(--container)) / 2));
    }

    .flash {
        padding: 0.95rem 1rem;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface-solid);
        box-shadow: var(--shadow);
    }

    .flash--success {
        border-color: color-mix(in srgb, var(--success) 40%, var(--border));
    }

    .flash--error,
    .flash--danger {
        border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
    }

    .hero {
        padding-top: 1.25rem;
    }

    .hero-carousel {
        position: relative;
        min-height: clamp(590px, 65vw, 670px);
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: clamp(24px, 4vw, 38px);
        color: #ffffff;
        background:
            radial-gradient(circle at 76% 22%, rgba(229, 72, 93, 0.42), transparent 28rem),
            radial-gradient(circle at 60% 90%, rgba(133, 54, 173, 0.34), transparent 28rem),
            linear-gradient(118deg, #160a11, #2d1021 55%, #29143c);
        box-shadow: var(--shadow-lg);
        isolation: isolate;
    }

    .hero-carousel::after {
        position: absolute;
        z-index: -1;
        inset: 0;
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
        background-size: 36px 36px;
        mask-image: linear-gradient(90deg, black, transparent 82%);
        content: "";
    }

    .hero-slide {
        position: absolute;
        inset: 0;
        display: grid;
        grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
        align-items: center;
        gap: clamp(1.5rem, 4vw, 4rem);
        padding: clamp(2rem, 6vw, 5.5rem);
        visibility: hidden;
        opacity: 0;
        transform: translateX(1.5rem);
        transition: opacity 500ms ease, transform 500ms ease, visibility 500ms;
    }

    [dir="rtl"] .hero-slide {
        transform: translateX(-1.5rem);
    }

    .hero-slide.is-active {
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .hero-slide__content {
        position: relative;
        z-index: 2;
        max-width: 690px;
    }

    .hero .eyebrow,
    .cta-panel .eyebrow,
    .auth-showcase .eyebrow {
        color: #ff9eb0;
    }

    .hero-slide h1,
    .hero-slide h2 {
        margin-top: 0.8rem;
        font-size: clamp(2.8rem, 6vw, 5.7rem);
        line-height: 0.95;
        letter-spacing: -0.062em;
    }

    .hero-slide p {
        max-width: 620px;
        margin-top: 1.4rem;
        color: rgba(255, 255, 255, 0.72);
        font-size: clamp(1rem, 1.7vw, 1.18rem);
    }

    .hero-slide__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 2rem;
    }

    .hero-slide__meta {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
        margin-top: 2.3rem;
        color: rgba(255, 255, 255, 0.64);
        font-size: 0.82rem;
    }

    .hero-slide__meta strong {
        display: block;
        color: #ffffff;
        font-size: 1.05rem;
    }

    .hero-slide__media {
        position: relative;
        min-width: 0;
        overflow: hidden;
        aspect-ratio: 4 / 5;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: clamp(22px, 3vw, 32px);
        background: rgba(255, 255, 255, 0.07);
        box-shadow: 0 38px 90px rgba(0, 0, 0, 0.38);
        transform: rotate(2deg);
    }

    .hero-slide__media::after {
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(22, 7, 14, 0.32), transparent 45%);
        content: "";
        pointer-events: none;
    }

    .hero-slide__media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-slide__fallback-visual {
        position: relative;
        display: grid;
        width: min(34vw, 390px);
        aspect-ratio: 1;
        place-items: center;
        justify-self: center;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 28% 42% 33% 46%;
        background:
            linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 30%),
            linear-gradient(135deg, var(--primary), var(--violet) 62%, var(--accent));
        box-shadow: 0 50px 100px rgba(0, 0, 0, 0.4);
        transform: rotate(-10deg);
    }

    .hero-slide__fallback-visual::before,
    .hero-slide__fallback-visual::after {
        position: absolute;
        border: 1px solid rgba(255, 255, 255, 0.28);
        content: "";
    }

    .hero-slide__fallback-visual::before {
        inset: 14%;
        border-radius: inherit;
    }

    .hero-slide__fallback-visual::after {
        inset: 30%;
        border-radius: 50%;
    }

    .hero-slide__fallback-visual span {
        font-size: clamp(4rem, 10vw, 8rem);
        font-weight: 900;
    }

    .carousel-controls {
        position: absolute;
        z-index: 5;
        right: clamp(1.2rem, 3vw, 2rem);
        bottom: clamp(1.2rem, 3vw, 2rem);
        display: flex;
        align-items: center;
        gap: 0.7rem;
    }

    [dir="rtl"] .carousel-controls {
        right: auto;
        left: clamp(1.2rem, 3vw, 2rem);
    }

    .carousel-dots {
        display: flex;
        gap: 0.4rem;
    }

    .carousel-dot {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 99px;
        background: rgba(255, 255, 255, 0.34);
        cursor: pointer;
        transition: width 180ms ease, background-color 180ms ease;
    }

    .carousel-dot.is-active {
        width: 28px;
        background: #ffffff;
    }

    .trust-strip {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1px;
        overflow: hidden;
        margin-top: 1.25rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--border);
        box-shadow: var(--shadow-sm);
    }

    .trust-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1.25rem;
        background: var(--surface);
    }

    .trust-item__icon {
        display: grid;
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
        place-items: center;
        border-radius: 13px;
        color: var(--primary);
        background: linear-gradient(145deg, var(--primary-soft), var(--violet-soft));
        font-weight: 900;
    }

    .trust-item strong {
        display: block;
        font-size: 0.94rem;
    }

    .trust-item span:last-child {
        color: var(--text-soft);
        font-size: 0.82rem;
    }

    .category-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }

    .category-card {
        position: relative;
        min-height: 225px;
        overflow: hidden;
        padding: 1.4rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
        transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    }

    .category-card:hover {
        transform: translateY(-6px);
        border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
        box-shadow: var(--shadow);
    }

    .category-card::after {
        position: absolute;
        right: -2.5rem;
        bottom: -3.5rem;
        width: 11rem;
        height: 11rem;
        border-radius: 38% 62% 54% 46%;
        background: linear-gradient(145deg, var(--primary-soft), var(--violet-soft));
        transform: rotate(25deg);
        content: "";
    }

    [dir="rtl"] .category-card::after {
        right: auto;
        left: -2.5rem;
    }

    .category-card__number {
        color: var(--primary);
        font-size: 0.75rem;
        font-weight: 850;
        letter-spacing: 0.14em;
    }

    .category-card h3 {
        margin-top: 2.4rem;
        font-size: 1.25rem;
        line-height: 1.2;
    }

    .category-card p {
        margin-top: 0.6rem;
        color: var(--text-soft);
        font-size: 0.9rem;
    }

    .category-card__arrow {
        position: absolute;
        z-index: 1;
        right: 1.25rem;
        bottom: 1.25rem;
        display: grid;
        width: 40px;
        height: 40px;
        place-items: center;
        border-radius: 50%;
        color: #ffffff;
        background: linear-gradient(135deg, var(--primary), var(--violet));
    }

    [dir="rtl"] .category-card__arrow {
        right: auto;
        left: 1.25rem;
        transform: scaleX(-1);
    }

    .product-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.2rem;
    }

    .product-card {
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
        transition: transform 180ms ease, box-shadow 180ms ease;
    }

    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow);
    }

    .product-card__visual {
        position: relative;
        display: grid;
        aspect-ratio: 4 / 3;
        place-items: center;
        background:
            radial-gradient(circle at 50% 40%, var(--primary-soft), transparent 45%),
            linear-gradient(145deg, var(--surface-soft), var(--surface-solid));
    }

    .product-card__visual::before {
        width: 34%;
        aspect-ratio: 1;
        border: 1px solid var(--border-strong);
        border-radius: 22% 45%;
        background: linear-gradient(145deg, var(--primary), var(--violet) 62%, var(--accent));
        box-shadow: 0 24px 55px rgba(173, 41, 81, 0.24);
        transform: rotate(30deg) skew(-8deg);
        content: "";
    }

    .product-card__badge {
        position: absolute;
        top: 1rem;
        left: 1rem;
        padding: 0.35rem 0.65rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: var(--surface);
        font-size: 0.72rem;
        font-weight: 800;
    }

    [dir="rtl"] .product-card__badge {
        right: 1rem;
        left: auto;
    }

    .product-card__body {
        padding: 1.25rem;
    }

    .product-card__category {
        color: var(--primary);
        font-size: 0.75rem;
        font-weight: 850;
        text-transform: uppercase;
    }

    .product-card h3 {
        margin-top: 0.35rem;
        font-size: 1.12rem;
    }

    .product-card p {
        margin-top: 0.55rem;
        color: var(--text-soft);
        font-size: 0.9rem;
    }

    .product-card__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-top: 1.2rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    .product-card__price {
        font-size: 1.15rem;
        font-weight: 850;
    }

    .cta-panel {
        position: relative;
        display: grid;
        overflow: hidden;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 2rem;
        padding: clamp(2rem, 5vw, 4rem);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: var(--radius-lg);
        color: #ffffff;
        background:
            radial-gradient(circle at 88% 12%, rgba(255, 138, 98, 0.35), transparent 20rem),
            linear-gradient(125deg, #24101b, #7d244c 55%, #51266f);
        box-shadow: var(--shadow-lg);
    }

    .cta-panel::after {
        position: absolute;
        right: 14%;
        width: 180px;
        height: 180px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        transform: rotate(45deg);
        content: "";
    }

    .cta-panel__content {
        position: relative;
        z-index: 1;
        max-width: 680px;
    }

    .cta-panel h2 {
        margin-top: 0.5rem;
        font-size: clamp(2rem, 4vw, 3.6rem);
        line-height: 1.04;
        letter-spacing: -0.045em;
    }

    .cta-panel p {
        margin-top: 1rem;
        color: rgba(255, 255, 255, 0.72);
    }

    .cta-panel .btn {
        position: relative;
        z-index: 1;
    }

    .content-empty-state,
    .admin-empty-state {
        display: grid;
        min-height: 260px;
        place-items: center;
        align-content: center;
        gap: 0.8rem;
        padding: clamp(2rem, 5vw, 4rem);
        border: 1px dashed var(--border-strong);
        border-radius: var(--radius-md);
        background: var(--surface);
        text-align: center;
    }

    .content-empty-state p,
    .admin-empty-state p {
        max-width: 600px;
        color: var(--text-soft);
    }

    .catalog-heading {
        padding-block: clamp(4rem, 8vw, 7rem) clamp(2rem, 4vw, 3rem);
    }

    .catalog-heading .container {
        max-width: 900px;
    }

    .site-footer {
        margin-top: clamp(4rem, 8vw, 7rem);
        border-top: 1px solid var(--border);
        background: var(--surface);
    }

    .footer-grid {
        display: grid;
        grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, 1fr));
        gap: 3rem;
        padding-block: 4rem;
    }

    .footer-brand p {
        max-width: 420px;
        margin-top: 1rem;
        color: var(--text-soft);
    }

    .footer-column h3 {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }

    .footer-column ul {
        display: grid;
        gap: 0.7rem;
        color: var(--text-soft);
        font-size: 0.88rem;
    }

    .footer-column a:hover {
        color: var(--primary);
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding-block: 1.2rem;
        border-top: 1px solid var(--border);
        color: var(--text-muted);
        font-size: 0.8rem;
    }

    .auth-page {
        padding-block: clamp(2rem, 5vw, 5rem);
    }

    .auth-shell {
        display: grid;
        min-height: 690px;
        overflow: hidden;
        grid-template-columns: minmax(0, 0.92fr) minmax(430px, 1.08fr);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--surface);
        box-shadow: var(--shadow-lg);
    }

    .auth-showcase {
        position: relative;
        display: flex;
        overflow: hidden;
        flex-direction: column;
        justify-content: end;
        padding: clamp(2rem, 5vw, 4rem);
        color: #ffffff;
        background:
            radial-gradient(circle at 68% 22%, rgba(255, 138, 98, 0.34), transparent 20rem),
            linear-gradient(145deg, #1b0c15, #76264d 58%, #51266f);
    }

    .auth-showcase::before,
    .auth-showcase::after {
        position: absolute;
        border: 1px solid rgba(255, 255, 255, 0.16);
        content: "";
    }

    .auth-showcase::before {
        top: 14%;
        left: 18%;
        width: 210px;
        height: 210px;
        transform: rotate(35deg);
        animation: float 7s ease-in-out infinite;
    }

    .auth-showcase::after {
        top: 24%;
        right: 14%;
        width: 115px;
        height: 115px;
        border-radius: 30%;
        transform: rotate(-20deg);
    }

    .auth-showcase__content {
        position: relative;
        z-index: 1;
        max-width: 520px;
    }

    .auth-showcase h1 {
        margin-top: 0.6rem;
        font-size: clamp(2.5rem, 5vw, 4.4rem);
        line-height: 0.98;
        letter-spacing: -0.055em;
    }

    .auth-showcase p {
        margin-top: 1rem;
        color: rgba(255, 255, 255, 0.72);
    }

    .auth-benefits {
        display: grid;
        gap: 0.7rem;
        margin-top: 2rem;
    }

    .auth-benefits li {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        color: rgba(255, 255, 255, 0.86);
        font-size: 0.9rem;
    }

    .auth-benefits li::before {
        display: grid;
        width: 22px;
        height: 22px;
        flex: 0 0 auto;
        place-items: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.14);
        content: "✓";
        font-size: 0.72rem;
        font-weight: 900;
    }

    .auth-form-panel {
        display: grid;
        align-content: center;
        padding: clamp(2rem, 6vw, 5rem);
        background: var(--surface-solid);
    }

    .auth-form {
        width: min(100%, 480px);
        margin-inline: auto;
    }

    .auth-form__header {
        margin-bottom: 2rem;
    }

    .auth-form__header h2 {
        margin-top: 0.5rem;
        font-size: clamp(2rem, 4vw, 3rem);
        line-height: 1.05;
        letter-spacing: -0.04em;
    }

    .auth-form__header p {
        margin-top: 0.75rem;
        color: var(--text-soft);
    }

    .auth-alert {
        margin-bottom: 1rem;
        padding: 0.85rem 0.95rem;
        border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--border));
        border-radius: var(--radius-sm);
        color: var(--danger);
        background: color-mix(in srgb, var(--danger) 8%, var(--surface));
    }

    .form-grid {
        display: grid;
        gap: 1rem;
    }

    .form-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .form-field {
        display: grid;
        gap: 0.45rem;
    }

    .form-field label {
        font-size: 0.84rem;
        font-weight: 750;
    }

    .form-control {
        width: 100%;
        min-height: 50px;
        padding: 0.75rem 0.9rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        color: var(--text);
        background: var(--surface-soft);
        outline: none;
        transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    }

    .form-control--textarea {
        min-height: 120px;
        resize: vertical;
    }

    .form-control:focus {
        border-color: var(--primary);
        background: var(--surface-solid);
        box-shadow: 0 0 0 4px var(--primary-soft);
    }

    .form-options {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        color: var(--text-soft);
        font-size: 0.84rem;
    }

    .checkbox {
        display: inline-flex;
        align-items: flex-start;
        gap: 0.55rem;
        color: var(--text-soft);
        font-size: 0.86rem;
    }

    .checkbox input {
        width: 17px;
        height: 17px;
        margin-top: 0.22rem;
        accent-color: var(--primary);
    }

    .auth-form__footer {
        margin-top: 1.5rem;
        color: var(--text-soft);
        font-size: 0.9rem;
        text-align: center;
    }

    .form-errors,
    .form-errors ul {
        margin: 0;
        padding: 0;
        list-style: none;
        color: var(--danger);
        font-size: 0.8rem;
    }

    .form-help {
        color: var(--text-muted);
        font-size: 0.78rem;
    }

    @keyframes float {

        0%,
        100% {
            translate: 0 0;
        }

        50% {
            translate: 0 -18px;
        }
    }

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

        *,
        *::before,
        *::after {
            scroll-behavior: auto !important;
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

    @media (max-width: 1100px) {
        .navbar {
            grid-template-columns: minmax(120px, 165px) 1fr auto;
            gap: 1rem;
        }

        .main-navigation {
            gap: 0.85rem;
            font-size: 0.84rem;
        }

        .category-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .footer-grid {
            grid-template-columns: 1.4fr repeat(2, 1fr);
        }

        .footer-column:last-child {
            grid-column: 2;
        }
    }

    @media (max-width: 900px) {
        :root {
            --header-height: 66px;
        }

        .navbar {
            grid-template-columns: minmax(105px, 1fr) auto;
        }

        .menu-toggle {
            display: inline-flex;
        }

        .main-navigation {
            position: absolute;
            top: calc(100% + 1px);
            right: 1rem;
            left: 1rem;
            display: none;
            align-items: stretch;
            padding: 0.75rem;
            border: 1px solid var(--border);
            border-radius: 18px;
            background: var(--surface-solid);
            box-shadow: var(--shadow);
        }

        .main-navigation.is-open {
            display: grid;
        }

        .main-navigation a {
            padding: 0.75rem;
            border-radius: 11px;
        }

        .main-navigation a:hover {
            background: var(--surface-soft);
        }

        .main-navigation a::after {
            display: none;
        }

        .hero-carousel {
            min-height: 790px;
        }

        .hero-slide {
            grid-template-columns: 1fr;
            align-content: center;
            gap: 1.5rem;
            padding-bottom: 6rem;
        }

        .hero-slide__media {
            width: min(100%, 460px);
            max-height: 330px;
            aspect-ratio: 16 / 9;
            justify-self: center;
            transform: none;
        }

        .hero-slide__fallback-visual {
            width: 230px;
        }

        .trust-strip {
            grid-template-columns: 1fr;
        }

        .product-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .auth-shell {
            grid-template-columns: 1fr;
        }

        .auth-showcase {
            min-height: 390px;
        }

        .footer-grid {
            grid-template-columns: 1fr 1fr;
        }

        .footer-brand {
            grid-column: 1 / -1;
        }

        .footer-column:last-child {
            grid-column: auto;
        }
    }

    @media (max-width: 680px) {
        .container {
            width: min(calc(100% - 1.25rem), var(--container));
        }

        .brand__logo {
            width: 118px;
        }

        .navbar__actions {
            gap: 0.35rem;
        }

        .navbar__account-button {
            width: 44px;
            padding: 0;
        }

        .navbar__login-label {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0 0 0 0);
        }

        .language-picker__menu {
            position: fixed;
            top: 72px;
            right: 0.65rem;
            left: 0.65rem;
            width: auto;
        }

        .hero {
            padding-top: 0.65rem;
        }

        .hero-carousel {
            min-height: 745px;
            border-radius: 22px;
        }

        .hero-slide {
            padding: 2rem 1.25rem 5.5rem;
        }

        .hero-slide h1,
        .hero-slide h2 {
            font-size: clamp(2.45rem, 13vw, 4rem);
        }

        .hero-slide__media {
            max-height: 250px;
        }

        .hero-slide__meta {
            gap: 1rem;
        }

        .category-grid,
        .product-grid {
            grid-template-columns: 1fr;
        }

        .section-heading {
            display: block;
        }

        .section-heading .text-link {
            display: inline-block;
            margin-top: 1rem;
        }

        .cta-panel {
            grid-template-columns: 1fr;
        }

        .cta-panel::after {
            display: none;
        }

        .footer-grid {
            grid-template-columns: 1fr;
            gap: 2rem;
        }

        .footer-brand {
            grid-column: auto;
        }

        .footer-bottom,
        .form-options {
            align-items: flex-start;
            flex-direction: column;
        }

        .form-row {
            grid-template-columns: 1fr;
        }

        .auth-showcase {
            min-height: 350px;
        }

        .auth-form-panel {
            padding: 2rem 1.25rem;
        }
    }

    @media (max-width: 430px) {
        .brand__logo {
            width: 102px;
        }

        .navbar__actions>.navbar__account-button {
            display: none;
        }

        .hero-carousel {
            min-height: 770px;
        }

        .hero-slide__actions .btn {
            width: 100%;
        }

        .carousel-controls {
            right: 1rem;
            left: 1rem;
            justify-content: center;
        }

        .category-navigation a {
            font-size: 0.78rem;
        }
    }
}

@layer utilities {
    .visually-hidden {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        margin: -1px !important;
        padding: 0 !important;
        border: 0 !important;
        clip: rect(0 0 0 0) !important;
        white-space: nowrap !important;
    }
}

/* =========================================================
   COMPOSANTS DE BOUTONS RÉUTILISABLES
   ========================================================= */

@layer components {
    :where(.btn, .button, .icon-button) {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        gap: 0.55rem;
        padding: 0.72rem 1.1rem;
        border: 1px solid transparent;
        border-radius: 999px;
        color: var(--text);
        background: transparent;
        cursor: pointer;
        font: inherit;
        font-weight: 780;
        line-height: 1;
        text-align: center;
        text-decoration: none;
        transition:
            transform 170ms ease,
            color 170ms ease,
            border-color 170ms ease,
            background-color 170ms ease,
            box-shadow 170ms ease;
    }

    :where(.btn, .button, .icon-button):hover {
        transform: translateY(-2px);
    }

    :where(.btn, .button, .icon-button):disabled,
    :where(.btn, .button, .icon-button)[aria-disabled="true"] {
        cursor: not-allowed;
        opacity: 0.55;
        transform: none;
    }

    :where(.btn--primary, .button--primary) {
        color: #ffffff;
        background: linear-gradient(135deg, var(--primary), var(--violet) 62%, var(--accent));
        box-shadow: 0 14px 32px rgba(190, 42, 83, 0.28);
    }

    :where(.btn--primary, .button--primary):hover {
        color: #ffffff;
        box-shadow: 0 18px 38px rgba(190, 42, 83, 0.36);
    }

    :where(.btn--secondary, .button--secondary, .button:not(.button--primary)) {
        border-color: var(--border);
        background: var(--surface);
    }

    :where(.btn--secondary, .button--secondary, .button:not(.button--primary)):hover {
        border-color: var(--border-strong);
        background: var(--surface-hover);
    }

    .btn--ghost,
    .icon-button {
        border-color: var(--border);
        background: color-mix(in srgb, var(--surface) 82%, transparent);
    }

    .btn--ghost:hover,
    .icon-button:hover {
        border-color: var(--border-strong);
        background: var(--surface-hover);
    }

    .btn--glass {
        color: #ffffff;
        border-color: rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(15px);
    }

    .btn--glass:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.17);
    }

    .btn--light {
        color: #2b111a;
        background: #ffffff;
        box-shadow: 0 14px 34px rgba(24, 5, 14, 0.22);
    }

    .btn--light:hover {
        color: #2b111a;
        background: #fff5f6;
    }

    .btn--danger {
        color: var(--danger);
        border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
        background: color-mix(in srgb, var(--danger) 9%, var(--surface));
    }

    .btn--danger:hover {
        color: #ffffff;
        border-color: var(--danger);
        background: var(--danger);
    }

    .btn--sm {
        min-height: 36px;
        padding: 0.55rem 0.8rem;
        font-size: 0.8rem;
    }

    .btn--lg {
        min-height: 52px;
        padding: 0.9rem 1.35rem;
    }

    :where(.btn--wide, .button--wide) {
        width: 100%;
    }

    :where(.btn--icon, .icon-button) {
        width: 44px;
        min-width: 44px;
        padding: 0;
    }

    :where(.btn--icon, .icon-button) svg {
        width: 19px;
        height: 19px;
    }
}

/* =========================================================
   BEGIN SWITCHES AND SITE SETTINGS
   ========================================================= */

@layer components {
    /*
     * Interrupteur générique réutilisable.
     *
     * Structure attendue :
     * <label class="switch-control">
     *   <input class="switch-control__input" type="checkbox">
     *   <span class="switch-control__track">
     *     <span class="switch-control__thumb"></span>
     *   </span>
     *   <span class="switch-control__copy">...</span>
     * </label>
     */
    .switch-control {
        display: inline-flex;
        position: relative;
        align-items: center;
        gap: 0.85rem;
        cursor: pointer;
        user-select: none;
    }

    .switch-control--card {
        width: 100%;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--surface-soft);
    }

    .switch-control__input {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }

    .switch-control__track {
        position: relative;
        width: 58px;
        height: 32px;
        flex: 0 0 auto;
        border: 1px solid var(--border-strong);
        border-radius: 999px;
        background: var(--surface-solid);
        box-shadow: inset 0 2px 7px rgba(39, 16, 23, 0.12);
        transition:
            border-color 180ms ease,
            background-color 180ms ease,
            box-shadow 180ms ease;
    }

    .switch-control__thumb {
        position: absolute;
        top: 3px;
        left: 3px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: var(--text-muted);
        box-shadow: 0 5px 12px rgba(39, 16, 23, 0.22);
        transition:
            transform 190ms ease,
            background-color 190ms ease;
    }

    .switch-control__input:checked + .switch-control__track {
        border-color: color-mix(in srgb, var(--success) 48%, var(--border));
        background: color-mix(in srgb, var(--success) 22%, var(--surface-solid));
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 10%, transparent);
    }

    .switch-control__input:checked + .switch-control__track .switch-control__thumb {
        background: var(--success);
        transform: translateX(26px);
    }

    [dir="rtl"] .switch-control__thumb {
        right: 3px;
        left: auto;
    }

    [dir="rtl"] .switch-control__input:checked + .switch-control__track .switch-control__thumb {
        transform: translateX(-26px);
    }

    .switch-control__input:focus-visible + .switch-control__track {
        outline: 3px solid color-mix(in srgb, var(--primary) 42%, transparent);
        outline-offset: 3px;
    }

    .switch-control__copy {
        display: grid;
        gap: 0.18rem;
    }

    .switch-control__copy strong {
        color: var(--text);
        font-size: 0.92rem;
    }

    .switch-control__copy small {
        color: var(--text-muted);
        font-size: 0.78rem;
        line-height: 1.45;
    }

    .site-settings-form {
        display: grid;
        gap: 1.25rem;
    }

    .site-settings-panel .dashboard-panel__header > div p {
        margin-top: 0.35rem;
        color: var(--text-soft);
        font-size: 0.82rem;
    }

    .site-current-state {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.38rem 0.65rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        color: var(--text-soft);
        background: var(--surface-soft);
        font-size: 0.74rem;
        font-weight: 820;
        white-space: nowrap;
    }

    .site-current-state > span,
    .admin-navigation-status-dot,
    .site-mode-slider__dot,
    .site-mode-impact__dot {
        width: 9px;
        height: 9px;
        flex: 0 0 auto;
        border-radius: 50%;
        background: var(--text-muted);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-muted) 12%, transparent);
    }

    .site-current-state--normal > span,
    .admin-navigation-status-dot--normal,
    .site-mode-impact--normal .site-mode-impact__dot,
    .site-mode-slider__choice--normal .site-mode-slider__dot {
        background: var(--success);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent);
    }

    .site-current-state--partial > span,
    .admin-navigation-status-dot--partial,
    .site-mode-impact--partial .site-mode-impact__dot,
    .site-mode-slider__choice--partial .site-mode-slider__dot {
        background: var(--accent);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
    }

    .site-current-state--total > span,
    .admin-navigation-status-dot--total,
    .site-mode-impact--total .site-mode-impact__dot,
    .site-mode-slider__choice--total .site-mode-slider__dot {
        background: var(--danger);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent);
    }

    .admin-content-navigation a:has(.admin-navigation-status-dot) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.48rem;
    }

    .admin-navigation-status-dot {
        width: 8px;
        height: 8px;
    }

    .site-mode-slider {
        position: relative;
        display: grid;
        overflow: hidden;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 0.35rem;
        border: 1px solid var(--border);
        border-radius: 20px;
        background: var(--surface-soft);
        isolation: isolate;
        direction: ltr;
    }

    .site-mode-slider__indicator {
        position: absolute;
        z-index: -1;
        top: 0.35rem;
        bottom: 0.35rem;
        left: 0.35rem;
        width: calc((100% - 0.7rem) / 3);
        border: 1px solid var(--border);
        border-radius: 15px;
        background: var(--surface-solid);
        box-shadow: var(--shadow-sm);
        transition:
            transform 220ms ease,
            border-color 220ms ease,
            background-color 220ms ease;
    }

    .site-mode-slider:has(input[value="normal"]:checked) .site-mode-slider__indicator {
        border-color: color-mix(in srgb, var(--success) 42%, var(--border));
        background: color-mix(in srgb, var(--success) 8%, var(--surface-solid));
        transform: translateX(0);
    }

    .site-mode-slider:has(input[value="partial"]:checked) .site-mode-slider__indicator {
        border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
        background: color-mix(in srgb, var(--accent) 9%, var(--surface-solid));
        transform: translateX(100%);
    }

    .site-mode-slider:has(input[value="total"]:checked) .site-mode-slider__indicator {
        border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
        background: color-mix(in srgb, var(--danger) 8%, var(--surface-solid));
        transform: translateX(200%);
    }

    .site-mode-slider__choice {
        display: block;
        position: relative;
        min-width: 0;
        cursor: pointer;
    }

    .site-mode-slider__input {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        opacity: 0;
    }

    .site-mode-slider__content {
        display: grid;
        min-height: 118px;
        grid-template-columns: auto minmax(0, 1fr);
        align-content: center;
        gap: 0.35rem 0.7rem;
        padding: 1rem;
        color: var(--text-soft);
    }

    .site-mode-slider__content strong,
    .site-mode-slider__content small {
        grid-column: 2;
    }

    .site-mode-slider__dot {
        grid-row: 1 / span 2;
        align-self: start;
        margin-top: 0.35rem;
    }

    .site-mode-slider__content strong {
        color: var(--text);
        font-size: 0.9rem;
    }

    .site-mode-slider__content small {
        color: var(--text-muted);
        font-size: 0.72rem;
        line-height: 1.45;
    }

    .site-mode-slider__input:focus-visible + .site-mode-slider__content {
        outline: 3px solid color-mix(in srgb, var(--primary) 42%, transparent);
        outline-offset: -4px;
        border-radius: 15px;
    }

    .site-mode-impact-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
        margin-top: 1.25rem;
    }

    .site-mode-impact {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.9rem;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface-soft);
    }

    .site-mode-impact__dot {
        margin-top: 0.42rem;
    }

    .site-mode-impact strong {
        font-size: 0.84rem;
    }

    .site-mode-impact p {
        margin-top: 0.25rem;
        color: var(--text-muted);
        font-size: 0.74rem;
        line-height: 1.45;
    }

    .site-settings-warning {
        margin-top: 1rem;
        padding: 1rem;
        border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
        border-radius: 14px;
        background: color-mix(in srgb, var(--accent) 8%, var(--surface-soft));
    }

    .site-settings-warning p {
        margin-top: 0.35rem;
        color: var(--text-soft);
        font-size: 0.8rem;
    }

    .site-settings-summary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .site-settings-summary > div {
        display: grid;
        gap: 0.15rem;
    }

    .site-settings-summary span {
        color: var(--text-muted);
        font-size: 0.72rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .purchase-lock-notice {
        margin-top: 1.25rem;
        padding: 1rem;
        border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
        border-radius: 15px;
        color: var(--text-soft);
        background:
            linear-gradient(
                145deg,
                color-mix(in srgb, var(--accent) 10%, var(--surface)),
                color-mix(in srgb, var(--violet) 7%, var(--surface))
            );
    }

    .purchase-lock-notice strong {
        color: var(--text);
    }

    .purchase-lock-notice p {
        margin-top: 0.35rem;
        font-size: 0.82rem;
        line-height: 1.55;
    }

    .purchase-lock-notice--compact {
        margin-top: 0.75rem;
    }

    .maintenance-page {
        display: grid;
        min-height: calc(100vh - var(--header-height));
        place-items: center;
        padding-block: clamp(2rem, 7vw, 6rem);
    }

    .maintenance-shell {
        display: grid;
        min-height: 590px;
        overflow: hidden;
        grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
        align-items: center;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--surface);
        box-shadow: var(--shadow-lg);
    }

    .maintenance-visual {
        position: relative;
        display: grid;
        height: 100%;
        min-height: 590px;
        place-items: center;
        background:
            radial-gradient(circle at 30% 25%, rgba(255, 138, 98, 0.35), transparent 18rem),
            radial-gradient(circle at 75% 75%, rgba(172, 99, 210, 0.36), transparent 20rem),
            linear-gradient(145deg, #180b12, #76264d 58%, #51266f);
        isolation: isolate;
    }

    .maintenance-visual::before {
        position: absolute;
        inset: 0;
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
        background-size: 34px 34px;
        content: "";
    }

    .maintenance-visual__ring {
        position: absolute;
        width: min(65%, 330px);
        aspect-ratio: 1;
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 38% 62% 48% 52%;
        animation: maintenance-rotate 18s linear infinite;
    }

    .maintenance-visual__ring::after {
        position: absolute;
        inset: 18%;
        border: 1px solid rgba(255, 255, 255, 0.17);
        border-radius: inherit;
        content: "";
        transform: rotate(38deg);
    }

    .maintenance-visual__logo {
        position: relative;
        z-index: 1;
        color: #ffffff;
        font-size: clamp(5rem, 14vw, 9rem);
        font-weight: 950;
        line-height: 1;
        text-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    }

    .maintenance-copy {
        padding: clamp(2rem, 6vw, 5rem);
    }

    .maintenance-copy h1 {
        margin-top: 0.75rem;
        font-size: clamp(2.8rem, 6vw, 5.4rem);
        line-height: 0.96;
        letter-spacing: -0.06em;
    }

    .maintenance-copy > p {
        max-width: 660px;
        margin-top: 1.25rem;
        color: var(--text-soft);
        font-size: clamp(1rem, 1.5vw, 1.12rem);
    }

    .maintenance-status {
        display: inline-flex;
        align-items: center;
        gap: 0.65rem;
        margin-top: 1.6rem;
        padding: 0.65rem 0.85rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        color: var(--text-soft);
        background: var(--surface-soft);
        font-size: 0.8rem;
        font-weight: 780;
    }

    .maintenance-status__dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: var(--accent);
        box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 13%, transparent);
        animation: maintenance-pulse 1.8s ease-in-out infinite;
    }

    .maintenance-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.7rem;
        margin-top: 2rem;
    }

    @keyframes maintenance-rotate {
        to {
            transform: rotate(360deg);
        }
    }

    @keyframes maintenance-pulse {
        50% {
            opacity: 0.45;
            transform: scale(0.82);
        }
    }

    @media (max-width: 900px) {
        .site-mode-slider,
        .site-mode-impact-grid,
        .site-settings-summary,
        .maintenance-shell {
            grid-template-columns: 1fr;
        }

        .site-mode-slider__indicator {
            display: none;
        }

        .site-mode-slider__choice {
            border-radius: 15px;
        }

        .site-mode-slider__choice:has(input:checked) {
            background: var(--surface-solid);
            box-shadow: var(--shadow-sm);
        }

        .site-mode-slider__content {
            min-height: auto;
        }

        .site-settings-summary .btn {
            width: 100%;
        }

        .maintenance-visual {
            min-height: 330px;
        }
    }

    @media (max-width: 620px) {
        .site-current-state {
            width: 100%;
            justify-content: center;
        }

        .site-settings-panel .dashboard-panel__header {
            align-items: flex-start;
            flex-direction: column;
        }

        .maintenance-actions,
        .maintenance-actions .btn {
            width: 100%;
        }
    }
}


/* =========================================================
   COMMANDES LANGUE ET THÈME DE LA NAVBAR
   ========================================================= */
@layer components {

    /*
     * Commandes permanentes de la navbar.
     * Ces règles sont dans app.css afin que les boutons de langue et de thème
     * ne dépendent d'aucun fichier CSS secondaire.
     */
    .navbar__actions {
        position: relative;
        z-index: 5;
        display: flex;
        min-width: max-content;
        flex: 0 0 auto;
        align-items: center;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .navbar__actions>* {
        flex: 0 0 auto;
    }

    .navbar-control {
        display: inline-flex !important;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        gap: 0.42rem;
        padding: 0 0.75rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        color: var(--text);
        background: color-mix(in srgb, var(--surface) 90%, transparent);
        box-shadow: none;
        cursor: pointer;
        list-style: none;
        opacity: 1 !important;
        visibility: visible !important;
        transition:
            transform 170ms ease,
            border-color 170ms ease,
            background-color 170ms ease,
            box-shadow 170ms ease;
    }

    .navbar-control:hover {
        transform: translateY(-2px);
        border-color: var(--border-strong);
        background: var(--surface-hover);
        box-shadow: var(--shadow-sm);
    }

    .navbar-control svg {
        display: block !important;
        width: 19px;
        min-width: 19px;
        height: 19px;
        color: currentColor;
        stroke: currentColor;
    }

    .navbar-control__label {
        font-size: 0.76rem;
        font-weight: 850;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .language-picker {
        position: relative;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .language-picker>summary::-webkit-details-marker {
        display: none;
    }

    .language-picker[open] {
        z-index: 90;
    }

    .language-picker__menu {
        z-index: 100;
    }

    .theme-toggle__moon {
        display: none !important;
    }

    .theme-toggle__sun {
        display: block !important;
    }

    :root[data-theme="dark"] .theme-toggle__sun {
        display: none !important;
    }

    :root[data-theme="dark"] .theme-toggle__moon {
        display: block !important;
    }

    @media (max-width: 1100px) {
        .navbar-control {
            width: 44px;
            padding: 0;
        }

        .navbar-control__label {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            margin: -1px;
            padding: 0;
            border: 0;
            clip: rect(0 0 0 0);
            white-space: nowrap;
        }
    }

    @media (max-width: 900px) {
        .navbar {
            grid-template-columns: minmax(100px, 1fr) auto;
        }

        .navbar__actions {
            gap: 0.38rem;
        }
    }

    @media (max-width: 430px) {

        .navbar-control,
        .menu-toggle,
        .navbar__actions .btn--icon {
            width: 40px;
            min-width: 40px;
            min-height: 40px;
            height: 40px;
        }

        .navbar-control svg {
            width: 18px;
            min-width: 18px;
            height: 18px;
        }
    }
}


/* =========================================================
   CORRECTIF DÉFINITIF DES ICÔNES DU THÈME
   ========================================================= */
@layer components {
    .theme-toggle .theme-toggle__sun {
        display: none !important;
    }

    .theme-toggle .theme-toggle__moon {
        display: block !important;
    }

    :root[data-theme="dark"] .theme-toggle .theme-toggle__sun {
        display: block !important;
    }

    :root[data-theme="dark"] .theme-toggle .theme-toggle__moon {
        display: none !important;
    }

    .theme-toggle {
        width: 44px;
        min-width: 44px;
        padding-inline: 0;
    }

    .content-page {
        padding-block: clamp(3rem, 7vw, 7rem);
    }

    .content-page__shell {
        width: min(100%, 920px);
        margin-inline: auto;
    }

    .content-page__header {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--border);
    }

    .content-page__header h1 {
        margin-top: .55rem;
        font-size: clamp(2.45rem, 6vw, 5rem);
        line-height: .98;
        letter-spacing: -.055em;
    }

    .content-page__meta {
        margin-top: 1rem;
        color: var(--text-muted);
        font-size: .84rem;
    }

    .content-page__body {
        padding: clamp(1.5rem, 4vw, 3rem);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        color: var(--text-soft);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
        font-size: clamp(1rem, 1.4vw, 1.08rem);
        line-height: 1.85;
        white-space: pre-line;
    }

    .social-links {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .55rem;
        margin-top: 1.25rem;
    }

    .social-link {
        display: inline-grid;
        width: 42px;
        height: 42px;
        place-items: center;
        border-radius: 13px;
        background: var(--surface-soft);
        transition: transform 170ms ease, color 170ms ease, border-color 170ms ease, background-color 170ms ease, box-shadow 170ms ease;
    }

    .social-link:hover {
        transform: translateY(-3px);
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, var(--primary), var(--violet));
        box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 25%, transparent);
    }

    .social-link svg {
        width: 30px;
        height: 30px;
    }

    @media (max-width: 680px) {
        .content-page__body {
            padding: 1.25rem;
            border-radius: var(--radius-md);
        }
    }
}

/* =========================================================
   CATALOGUE, PRODUIT, PANIER ET COMMANDE NUMÉRIQUE
   ========================================================= */
@layer components {
    .navbar-cart {
        position: relative;
    }

    .navbar-cart__count {
        position: absolute;
        top: -5px;
        right: -5px;
        display: grid;
        min-width: 19px;
        height: 19px;
        place-items: center;
        padding-inline: 4px;
        border: 2px solid var(--surface-solid);
        border-radius: 999px;
        color: #fff;
        background: linear-gradient(135deg, var(--primary), var(--violet));
        font-size: .66rem;
        font-weight: 900;
    }

    .catalog-search {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: .75rem;
        margin-bottom: 1.5rem;
    }

    .catalog-filter {
        margin-bottom: 1.5rem;
        color: var(--text-soft);
    }

    .product-card__visual {
        overflow: hidden;
    }

    .product-card__visual::before {
        display: none;
    }

    .product-card__visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .25s ease;
    }

    .product-card:hover .product-card__visual img {
        transform: scale(1.04);
    }

    .product-card__placeholder {
        display: grid;
        width: 34%;
        aspect-ratio: 1;
        place-items: center;
        border-radius: 30%;
        color: #fff;
        background: linear-gradient(145deg, var(--primary), var(--violet));
        font-size: 2rem;
        font-weight: 900;
        transform: rotate(-10deg);
    }

    .product-tags {
        display: flex;
        flex-wrap: wrap;
        gap: .4rem;
        margin-top: .85rem;
    }

    .tag-chip {
        display: inline-flex;
        padding: .3rem .58rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        color: var(--text-soft);
        background: var(--surface-soft);
        font-size: .72rem;
        font-weight: 750;
    }

    .tag-chip:hover {
        color: var(--primary);
        border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    }

    .product-detail__grid {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
        gap: clamp(2rem, 6vw, 5rem);
        align-items: start;
    }

    .product-gallery {
        position: sticky;
        top: calc(var(--header-height) + 2rem);
        min-width: 0;
    }

    .product-gallery__main {
        display: grid;
        overflow: hidden;
        aspect-ratio: 1 / 1;
        place-items: center;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .product-gallery__main img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .product-gallery__empty {
        font-size: clamp(3rem, 12vw, 8rem);
        font-weight: 900;
        color: var(--primary);
    }

    .product-gallery__thumbnails {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: .65rem;
        margin-top: .75rem;
    }

    .product-thumbnail {
        overflow: hidden;
        aspect-ratio: 1;
        padding: 0;
        border: 2px solid transparent;
        border-radius: 14px;
        background: var(--surface-soft);
        cursor: pointer;
    }

    .product-thumbnail.is-active {
        border-color: var(--primary);
    }

    .product-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .product-purchase {
        padding: clamp(1.25rem, 3vw, 2rem);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .product-purchase h1 {
        margin-top: .7rem;
        font-size: clamp(2.3rem, 5vw, 4.4rem);
        line-height: .98;
        letter-spacing: -.055em;
    }

    .product-purchase__description {
        margin-top: 1rem;
        color: var(--text-soft);
        font-size: 1.05rem;
    }

    .product-purchase__price {
        display: block;
        margin-block: 1.5rem;
        font-size: clamp(2rem, 5vw, 3.25rem);
        line-height: 1;
    }

    .product-purchase__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
        margin-top: 1.25rem;
    }

    .product-purchase__actions form,
    .product-purchase__actions .btn {
        width: 100%;
    }

    .license-summary {
        margin-top: 1.5rem;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        color: var(--text-soft);
        background: var(--surface-soft);
    }

    .license-summary p {
        margin-top: .4rem;
    }

    .product-content__inner {
        width: min(100%, 900px);
    }

    .product-content__inner>*+* {
        margin-top: 1.25rem;
    }

    .product-content__inner h2 {
        margin-top: 2.5rem;
        font-size: clamp(1.7rem, 4vw, 2.6rem);
        line-height: 1.1;
    }

    .product-content__inner p,
    .product-content__inner li {
        color: var(--text-soft);
        font-size: 1.02rem;
        line-height: 1.85;
    }

    .product-content__inner ul {
        display: grid;
        gap: .55rem;
        padding-left: 1.4rem;
        list-style: disc;
    }

    .product-content__inner figure {
        margin-inline: 0;
    }

    .product-content__inner figure img {
        width: 100%;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    .product-content__inner figcaption {
        margin-top: .6rem;
        color: var(--text-muted);
        font-size: .82rem;
        text-align: center;
    }

    .video-embed {
        overflow: hidden;
        aspect-ratio: 16 / 9;
        border-radius: var(--radius-md);
        background: #000;
        box-shadow: var(--shadow);
    }

    .video-embed iframe {
        width: 100%;
        height: 100%;
        border: 0;
    }

    .cart-layout,
    .checkout-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(290px, .6fr);
        gap: 1.25rem;
        align-items: start;
    }

    .cart-items,
    .order-items {
        display: grid;
        gap: .8rem;
    }

    .cart-item,
    .order-item {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr) auto;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .cart-item img {
        width: 110px;
        aspect-ratio: 1;
        border-radius: 14px;
        object-fit: cover;
    }

    .cart-item__copy h2,
    .order-item h2 {
        margin: 0;
        font-size: 1rem;
    }

    .cart-item__copy p,
    .order-item p {
        margin-top: .25rem;
        color: var(--text-soft);
        font-size: .84rem;
    }

    .cart-item__actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: end;
        gap: .5rem;
    }

    .cart-quantity {
        width: 80px;
        min-height: 36px;
    }

    .cart-summary {
        position: sticky;
        top: calc(var(--header-height) + 2rem);
        padding: 1.25rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .cart-summary>div,
    .checkout-line,
    .checkout-total,
    .order-total {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding-block: .85rem;
        border-bottom: 1px solid var(--border);
    }

    .cart-summary .btn {
        margin-top: .75rem;
    }

    .checkout-form {
        display: grid;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .checkout-delivery>div {
        display: grid;
        gap: .65rem;
    }

    .checkout-delivery label {
        display: flex;
        gap: .55rem;
        padding: .85rem;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface);
    }

    .order-list {
        display: grid;
        gap: .65rem;
    }

    .order-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: 15px;
        background: var(--surface-soft);
    }

    .order-row small {
        display: block;
        margin-top: .25rem;
        color: var(--text-muted);
    }

    .order-status {
        padding: .32rem .58rem;
        border-radius: 999px;
        color: var(--text-soft);
        background: var(--surface);
        font-size: .72rem;
        font-weight: 850;
    }

    .order-status--paid {
        color: var(--success);
    }

    .order-status--pending {
        color: var(--accent);
    }

    .order-status--cancelled,
    .order-status--refunded {
        color: var(--danger);
    }

    .invoice-page {
        padding-block: 3rem;
    }

    .invoice {
        width: min(100%, 900px);
        margin-inline: auto;
        padding: clamp(1.5rem, 5vw, 4rem);
        color: #211016;
        background: #fff;
        box-shadow: var(--shadow-lg);
    }

    .invoice__header {
        display: flex;
        justify-content: space-between;
        gap: 2rem;
        padding-bottom: 2rem;
        border-bottom: 2px solid #eee;
    }

    .invoice__customer {
        margin-block: 2rem;
    }

    .invoice table {
        width: 100%;
        border-collapse: collapse;
    }

    .invoice th,
    .invoice td {
        padding: .8rem;
        border-bottom: 1px solid #e7e7e7;
        text-align: left;
    }

    .invoice__total {
        display: flex;
        justify-content: flex-end;
        gap: 1rem;
        margin-top: 1.5rem;
        font-size: 1.2rem;
    }

    .invoice-print {
        margin-top: 2rem;
    }

    .media-admin-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: .8rem;
    }

    .media-admin-card {
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--surface-soft);
    }

    .media-admin-card img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .media-admin-card>div {
        padding: .8rem;
    }

    .product-admin-sections {
        display: grid;
        gap: 1rem;
        margin-block: 1rem;
    }

    @media (max-width: 900px) {

        .product-detail__grid,
        .cart-layout,
        .checkout-layout {
            grid-template-columns: 1fr;
        }

        .product-gallery,
        .cart-summary {
            position: static;
        }

        .cart-item {
            grid-template-columns: 85px minmax(0, 1fr);
        }

        .cart-item img {
            width: 85px;
        }

        .cart-item__actions {
            grid-column: 1 / -1;
            justify-content: start;
        }
    }

    @media (max-width: 620px) {

        .catalog-search,
        .product-purchase__actions {
            grid-template-columns: 1fr;
        }

        .product-gallery__thumbnails {
            grid-template-columns: repeat(4, 1fr);
        }

        .order-row {
            grid-template-columns: 1fr;
        }

        .order-item {
            grid-template-columns: 1fr;
        }

        .invoice {
            padding: 1rem;
        }

        .invoice__header {
            flex-direction: column;
        }

        .invoice {
            overflow-x: auto;
        }
    }
}

@media print {

    .site-header,
    .site-footer,
    .invoice-print {
        display: none !important;
    }

    .invoice-page {
        padding: 0;
    }

    .invoice {
        box-shadow: none;
        width: 100%;
    }
}


@layer components {

    .product-content-media,
    .product-content-video {
        margin-block: clamp(2rem, 5vw, 4rem);
    }

    .product-content-media {
        display: grid;
        align-items: center;
        gap: clamp(1rem, 4vw, 2.5rem);
    }

    .product-content-media--image_left,
    .product-content-media--image_right {
        grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
    }

    .product-content-media--image_right img {
        order: 2;
    }

    .product-content-media--image_right figcaption {
        order: 1;
    }

    .product-content-media--image_banner {
        grid-template-columns: 1fr;
    }

    .product-content-media img {
        width: 100%;
        max-height: 620px;
        object-fit: contain;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface-soft);
        box-shadow: var(--shadow-sm);
    }

    .product-content-media--image_banner img {
        width: 100%;
        max-height: 720px;
    }

    .product-content-media figcaption,
    .product-content-video figcaption {
        color: var(--text-soft);
        font-size: 0.95rem;
        line-height: 1.75;
        text-align: start;
    }

    .product-content-video {
        display: grid;
        gap: 0.8rem;
    }

    @media (max-width: 760px) {

        .product-content-media--image_left,
        .product-content-media--image_right {
            grid-template-columns: 1fr;
        }

        .product-content-media--image_right img,
        .product-content-media--image_right figcaption {
            order: initial;
        }
    }
}

/* =========================================================
   PAGE DE COMMANDE
   ========================================================= */

@layer components {
    .checkout-page {
        padding-block-start: clamp(2rem, 5vw, 4.5rem);
    }

    .checkout-main {
        min-width: 0;
    }

    .checkout-heading {
        max-width: 760px;
    }

    .checkout-heading h1 {
        margin-top: 0.55rem;
        font-size: clamp(2.35rem, 5vw, 4.5rem);
        line-height: 0.98;
        letter-spacing: -0.055em;
    }

    .checkout-heading p {
        margin-top: 0.85rem;
        color: var(--text-soft);
    }

    .checkout-form {
        gap: 1.15rem;
    }

    .checkout-choice-group {
        min-width: 0;
        margin: 0;
        padding: clamp(1rem, 2.5vw, 1.35rem);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .checkout-choice-group > legend {
        display: block;
        width: auto;
        padding-inline: 0.35rem;
        color: var(--text);
        font-size: 0.92rem;
        font-weight: 850;
    }

    .checkout-choice-group > legend.required::after {
        margin-inline-start: 0.22rem;
        color: var(--danger);
        content: "*";
    }

    .checkout-choice-group__help {
        margin: 0.15rem 0 0.95rem;
        color: var(--text-muted);
        font-size: 0.78rem;
        line-height: 1.55;
    }

    .checkout-choice-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .checkout-choice-grid--payment {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /*
     * Chaque input radio est placé dans son propre label.
     * Toute la carte est donc cliquable et le bouton ne peut plus être
     * visuellement détaché de son intitulé.
     */
    .checkout-choice-card {
        position: relative;
        display: grid;
        min-width: 0;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 0.7rem;
        padding: 0.95rem;
        border: 1px solid var(--border);
        border-radius: 15px;
        color: var(--text-soft);
        background: var(--surface-soft);
        cursor: pointer;
        transition:
            transform 170ms ease,
            border-color 170ms ease,
            background-color 170ms ease,
            box-shadow 170ms ease;
    }

    .checkout-choice-card:hover {
        border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
        transform: translateY(-2px);
    }

    .checkout-choice-card:has(.checkout-choice-card__input:checked) {
        border-color: color-mix(in srgb, var(--primary) 64%, var(--border));
        background: color-mix(in srgb, var(--primary) 7%, var(--surface));
        box-shadow:
            0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent),
            var(--shadow-sm);
    }

    .checkout-choice-card__input {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }

    .checkout-choice-card__marker {
        position: relative;
        width: 20px;
        height: 20px;
        margin-top: 0.1rem;
        border: 2px solid var(--border-strong);
        border-radius: 50%;
        background: var(--surface-solid);
        transition:
            border-color 170ms ease,
            box-shadow 170ms ease;
    }

    .checkout-choice-card__marker::after {
        position: absolute;
        inset: 4px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary), var(--violet));
        content: "";
        opacity: 0;
        transform: scale(0.4);
        transition:
            opacity 170ms ease,
            transform 170ms ease;
    }

    .checkout-choice-card__input:checked + .checkout-choice-card__marker {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 11%, transparent);
    }

    .checkout-choice-card__input:checked + .checkout-choice-card__marker::after {
        opacity: 1;
        transform: scale(1);
    }

    .checkout-choice-card__input:focus-visible + .checkout-choice-card__marker {
        outline: 3px solid color-mix(in srgb, var(--primary) 42%, transparent);
        outline-offset: 3px;
    }

    .checkout-choice-card__copy {
        display: grid;
        min-width: 0;
        gap: 0.25rem;
    }

    .checkout-choice-card__copy strong {
        color: var(--text);
        font-size: 0.84rem;
        line-height: 1.35;
    }

    .checkout-choice-card__copy small {
        color: var(--text-muted);
        font-size: 0.72rem;
        line-height: 1.5;
    }

    .checkout-choice-card--payment {
        grid-template-columns: auto auto minmax(0, 1fr);
        align-items: center;
    }

    .checkout-choice-card__brand {
        display: inline-flex;
        min-width: 72px;
        min-height: 34px;
        align-items: center;
        justify-content: center;
        padding: 0.35rem 0.55rem;
        border-radius: 9px;
        font-size: 0.74rem;
        font-weight: 900;
    }

    .checkout-choice-card__brand--stripe {
        color: #ffffff;
        background: linear-gradient(135deg, #635bff, #8a7dff);
    }

    .checkout-choice-card__brand--paypal {
        color: #ffffff;
        background: linear-gradient(135deg, #003087, #0070e0);
    }

    .checkout-legal-panel {
        display: grid;
        gap: 0.85rem;
        padding: clamp(1rem, 2.5vw, 1.35rem);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .checkout-legal-panel .license-summary {
        margin: 0;
    }

    .checkout-legal-panel .checkbox {
        align-items: flex-start;
        padding: 0.9rem;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface-soft);
    }

    .checkout-legal-panel .checkbox input {
        margin-top: 0.18rem;
    }

    .checkout-submit {
        display: grid;
        gap: 0.55rem;
    }

    .checkout-submit p {
        color: var(--text-muted);
        font-size: 0.72rem;
        line-height: 1.5;
        text-align: center;
    }

    .checkout-summary {
        position: sticky;
        top: calc(var(--header-height) + 1rem);
    }

    .checkout-summary__eyebrow {
        color: var(--primary);
        font-size: 0.7rem;
        font-weight: 850;
        letter-spacing: 0.11em;
        text-transform: uppercase;
    }

    .checkout-summary h2 {
        margin-top: 0.3rem;
    }

    .checkout-line > span {
        display: grid;
        gap: 0.25rem;
    }

    .checkout-line small {
        color: var(--text-muted);
        font-size: 0.7rem;
    }

    .checkout-security-note {
        margin-top: 1rem;
        padding: 0.9rem;
        border: 1px solid color-mix(in srgb, var(--success) 32%, var(--border));
        border-radius: 13px;
        background: color-mix(in srgb, var(--success) 6%, var(--surface-soft));
    }

    .checkout-security-note p {
        margin-top: 0.3rem;
        color: var(--text-muted);
        font-size: 0.72rem;
        line-height: 1.5;
    }

    .payment-summary {
        margin-top: 1.2rem;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: 15px;
        background: var(--surface-soft);
    }

    .payment-summary__heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .payment-status {
        display: inline-flex;
        align-items: center;
        padding: 0.32rem 0.58rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        color: var(--text-soft);
        background: var(--surface);
        font-size: 0.68rem;
        font-weight: 850;
    }

    .payment-status--completed {
        color: var(--success);
        border-color: color-mix(in srgb, var(--success) 38%, var(--border));
        background: color-mix(in srgb, var(--success) 7%, var(--surface));
    }

    .payment-status--failed,
    .payment-status--cancelled,
    .payment-status--expired {
        color: var(--danger);
        border-color: color-mix(in srgb, var(--danger) 38%, var(--border));
        background: color-mix(in srgb, var(--danger) 7%, var(--surface));
    }

    .payment-summary__details {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        margin-top: 0.9rem;
    }

    .payment-summary__details > div {
        display: grid;
        min-width: 0;
        gap: 0.18rem;
    }

    .payment-summary dt {
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 780;
        text-transform: uppercase;
    }

    .payment-summary dd {
        min-width: 0;
        margin: 0;
        color: var(--text);
        font-size: 0.82rem;
        overflow-wrap: anywhere;
    }

    .payment-summary code {
        font-size: 0.7rem;
    }

    .payment-result-card {
        display: grid;
        width: min(100%, 760px);
        min-height: 440px;
        place-items: center;
        align-content: center;
        gap: 0.85rem;
        margin-inline: auto;
        padding: clamp(2rem, 6vw, 4.5rem);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--surface);
        box-shadow: var(--shadow-lg);
        text-align: center;
    }

    .payment-result-card__icon {
        display: grid;
        width: 72px;
        height: 72px;
        place-items: center;
        border-radius: 50%;
        color: #ffffff;
        background: linear-gradient(135deg, var(--primary), var(--violet));
        box-shadow: 0 18px 38px color-mix(in srgb, var(--primary) 24%, transparent);
        font-size: 2rem;
        font-weight: 900;
    }

    .payment-result-card--success .payment-result-card__icon {
        background: var(--success);
    }

    .payment-result-card--cancelled .payment-result-card__icon {
        background: var(--danger);
    }

    .payment-result-card h1 {
        font-size: clamp(2rem, 5vw, 3.6rem);
        line-height: 1;
        letter-spacing: -0.05em;
    }

    .payment-result-card > p {
        max-width: 620px;
        color: var(--text-soft);
    }

    .payment-result-card .payment-summary {
        width: min(100%, 590px);
        text-align: start;
    }

    .payment-result-card__actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.7rem;
        margin-top: 0.5rem;
    }

    @media (max-width: 900px) {
        .checkout-summary {
            position: static;
        }
    }

    @media (max-width: 760px) {
        .checkout-choice-grid,
        .checkout-choice-grid--payment {
            grid-template-columns: 1fr;
        }

        .payment-summary__details {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 420px) {
        .checkout-choice-group,
        .checkout-legal-panel {
            padding: 0.85rem;
            border-radius: 16px;
        }

        .checkout-choice-card {
            padding: 0.8rem;
        }

        .checkout-choice-card--payment {
            grid-template-columns: auto minmax(0, 1fr);
        }

        .checkout-choice-card--payment .checkout-choice-card__marker {
            grid-row: 1 / span 2;
        }

        .checkout-choice-card--payment .checkout-choice-card__brand,
        .checkout-choice-card--payment .checkout-choice-card__copy {
            grid-column: 2;
        }

        .checkout-choice-card__brand {
            width: fit-content;
        }

        .payment-result-card {
            min-height: 390px;
            padding: 1.5rem 1rem;
        }

        .payment-result-card__actions,
        .payment-result-card__actions .btn {
            width: 100%;
        }
    }
}



/* =========================================================
   RESPONSIVE NAVBAR — JUSQU'AUX ÉCRANS DE 340 PX
   Ancien contenu de assets/styles/responsive.css
   ========================================================= */
@layer components {
    @media (max-width: 480px) {
        :root {
            --header-height: 60px;
        }

        .container {
            width: min(calc(100% - 0.8rem), var(--container));
        }

        .navbar {
            min-height: var(--header-height);
            grid-template-columns: minmax(76px, 1fr) auto;
            gap: 0.3rem;
        }

        .brand__logo {
            width: 86px;
            max-width: 100%;
        }

        .navbar__actions {
            min-width: 0;
            gap: 0.18rem;
        }

        .navbar-control,
        .menu-toggle,
        .navbar__actions .btn--icon,
        .navbar__actions .icon-button {
            width: 37px;
            min-width: 37px;
            min-height: 37px;
            height: 37px;
            padding: 0;
        }

        .navbar-control svg,
        .menu-toggle svg,
        .navbar__actions .btn--icon svg,
        .navbar__actions .icon-button svg {
            width: 16px;
            min-width: 16px;
            height: 16px;
        }

        .navbar-cart__count {
            top: -4px;
            right: -3px;
            min-width: 17px;
            height: 17px;
            border-width: 1px;
            font-size: 0.58rem;
        }

        .main-navigation {
            right: 0.4rem;
            left: 0.4rem;
            max-height: calc(100vh - var(--header-height) - 1rem);
            overflow-y: auto;
        }

        .language-picker__menu {
            top: calc(var(--header-height) + 0.35rem);
            right: 0.4rem;
            left: 0.4rem;
        }

        .category-navigation__inner {
            gap: 0.25rem;
            padding-block: 0.45rem;
        }

        .category-navigation a {
            padding: 0.42rem 0.65rem;
            font-size: 0.72rem;
        }
    }

    @media (max-width: 370px) {
        .container {
            width: min(calc(100% - 0.55rem), var(--container));
        }

        .navbar {
            grid-template-columns: minmax(68px, 1fr) auto;
            gap: 0.15rem;
        }

        .brand__logo {
            width: 76px;
        }

        .navbar__actions {
            gap: 0.12rem;
        }

        .navbar-control,
        .menu-toggle,
        .navbar__actions .btn--icon,
        .navbar__actions .icon-button {
            width: 34px;
            min-width: 34px;
            min-height: 34px;
            height: 34px;
        }

        .navbar-control svg,
        .menu-toggle svg,
        .navbar__actions .btn--icon svg,
        .navbar__actions .icon-button svg {
            width: 15px;
            min-width: 15px;
            height: 15px;
        }

        .main-navigation {
            right: 0.28rem;
            left: 0.28rem;
        }
    }
}

/* =========================================================
   BEGIN ACCOUNT PRIVACY AND CHECKOUT SUMMARY
   ========================================================= */

@layer components {
    .checkout-line {
        align-items: flex-start;
    }

    .checkout-line__product,
    .checkout-line__amount {
        display: grid;
        min-width: 0;
        gap: 0.24rem;
    }

    .checkout-line__product {
        text-align: start;
    }

    .checkout-line__amount {
        justify-items: end;
        flex: 0 0 auto;
        text-align: end;
    }

    .checkout-line__product small,
    .checkout-line__amount small {
        color: var(--text-muted);
        font-size: 0.7rem;
        line-height: 1.4;
    }

    .checkout-line__amount strong {
        white-space: nowrap;
    }

    .account-navigation {
        display: flex;
        overflow-x: auto;
        gap: 0.35rem;
        margin-bottom: 1.15rem;
        padding: 0.38rem;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--surface);
        box-shadow: var(--shadow-sm);
        scrollbar-width: thin;
    }

    .account-navigation a {
        display: inline-flex;
        min-height: 42px;
        align-items: center;
        justify-content: center;
        padding: 0.65rem 0.9rem;
        border-radius: 12px;
        color: var(--text-soft);
        font-size: 0.8rem;
        font-weight: 820;
        white-space: nowrap;
    }

    .account-navigation a:hover,
    .account-navigation a.is-active {
        color: var(--text);
        background: var(--surface-soft);
    }

    .account-navigation a.is-active {
        box-shadow: inset 0 0 0 1px color-mix(
            in srgb,
            var(--primary) 28%,
            var(--border)
        );
    }

    .account-stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .account-settings-layout {
        display: grid;
        gap: 1.2rem;
    }

    .account-profile-details {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .account-profile-details > div {
        display: grid;
        gap: 0.22rem;
        padding: 0.9rem;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface-soft);
    }

    .account-profile-details dt {
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .account-profile-details dd {
        margin: 0;
        color: var(--text);
        overflow-wrap: anywhere;
    }

    .account-status {
        display: inline-flex;
        width: fit-content;
        padding: 0.28rem 0.55rem;
        border-radius: 999px;
        font-size: 0.7rem;
        font-weight: 850;
    }

    .account-status--active {
        color: var(--success);
        background: color-mix(
            in srgb,
            var(--success) 9%,
            var(--surface)
        );
    }

    .account-danger-panel {
        border-color: color-mix(
            in srgb,
            var(--danger) 35%,
            var(--border)
        );
    }

    .account-deletion-effects {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        margin-bottom: 1.15rem;
    }

    .account-deletion-effects article {
        padding: 0.9rem;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface-soft);
    }

    .account-deletion-effects strong {
        font-size: 0.82rem;
    }

    .account-deletion-effects p {
        margin-top: 0.3rem;
        color: var(--text-muted);
        font-size: 0.74rem;
        line-height: 1.5;
    }

    .account-deletion-form {
        display: grid;
        gap: 0.9rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    .account-deletion-checkbox {
        align-items: flex-start;
        padding: 0.85rem;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: var(--surface-soft);
    }

    .account-legal-notice {
        padding: 1rem;
        border: 1px solid color-mix(
            in srgb,
            var(--accent) 38%,
            var(--border)
        );
        border-radius: 14px;
        background: color-mix(
            in srgb,
            var(--accent) 8%,
            var(--surface-soft)
        );
    }

    .account-legal-notice p {
        margin-top: 0.35rem;
        color: var(--text-soft);
    }

    .account-deletion-confirmed {
        width: min(100%, 720px);
        margin-inline: auto;
    }

    @media (max-width: 900px) {
        .account-stats-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 660px) {
        .account-profile-details,
        .account-deletion-effects {
            grid-template-columns: 1fr;
        }

        .account-navigation {
            border-radius: 13px;
        }
    }

    @media (max-width: 420px) {
        .account-stats-grid {
            grid-template-columns: 1fr;
        }

        .checkout-line {
            gap: 0.65rem;
        }

        .checkout-line__product {
            max-width: 64%;
        }
    }
}

/* =========================================================
   END PRODUCT PERFORMANCE AND RATINGS
   ========================================================= */

@layer components {
    .analytics-subnavigation {
        display: flex;
        overflow-x: auto;
        gap: 0.4rem;
        margin: 0 0 1.15rem;
        padding: 0.38rem;
        border: 1px solid var(--border);
        border-radius: 15px;
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .analytics-subnavigation a {
        display: inline-flex;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        padding: 0.6rem 0.9rem;
        border-radius: 11px;
        color: var(--text-soft);
        font-size: 0.78rem;
        font-weight: 820;
        white-space: nowrap;
    }

    .analytics-subnavigation a:hover,
    .analytics-subnavigation a.is-active {
        color: var(--text);
        background: var(--surface-soft);
    }

    .analytics-subnavigation a.is-active {
        box-shadow: inset 0 0 0 1px color-mix(
            in srgb,
            var(--primary) 30%,
            var(--border)
        );
    }

    .product-performance-summary {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.8rem;
        margin-bottom: 1rem;
    }

    .product-performance-filters {
        display: grid;
        grid-template-columns:
            minmax(220px, 1.6fr)
            minmax(150px, 0.8fr)
            minmax(170px, 0.9fr)
            minmax(130px, 0.7fr)
            auto;
        align-items: end;
        gap: 0.7rem;
        margin-bottom: 1rem;
        padding: 0.9rem;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .product-performance-panel {
        padding: 0;
    }

    .product-performance-table-wrap {
        overflow-x: auto;
    }

    .product-performance-table {
        width: 100%;
        min-width: 980px;
        border-collapse: collapse;
    }

    .product-performance-table th,
    .product-performance-table td {
        padding: 0.65rem 0.7rem;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
    }

    .product-performance-table thead th {
        position: sticky;
        z-index: 1;
        top: 0;
        color: var(--text-muted);
        background: var(--surface);
        font-size: 0.68rem;
        font-weight: 900;
        letter-spacing: 0.055em;
        text-align: start;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .product-performance-table tbody tr {
        transition: background-color 150ms ease;
    }

    .product-performance-table tbody tr:hover {
        background: var(--surface-soft);
    }

    .product-performance-table tr:last-child td {
        border-bottom: 0;
    }

    .product-performance-table .is-numeric {
        text-align: end;
    }

    .product-performance-table td.is-numeric {
        min-width: 105px;
    }

    .product-performance-table td.is-numeric strong {
        display: block;
        color: var(--text);
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .product-performance-table td.is-numeric small {
        display: block;
        margin-top: 0.18rem;
        color: var(--text-muted);
        font-size: 0.66rem;
        white-space: nowrap;
    }

    .performance-design {
        display: flex;
        min-width: 285px;
        align-items: center;
        gap: 0.75rem;
    }

    .performance-design__visual {
        display: grid;
        flex: 0 0 58px;
        width: 58px;
        height: 58px;
        overflow: hidden;
        place-items: center;
        border: 1px solid var(--border);
        border-radius: 11px;
        color: var(--text-muted);
        background: var(--surface-soft);
        font-size: 0.78rem;
        font-weight: 900;
    }

    .performance-design__visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .performance-design__copy {
        display: grid;
        min-width: 0;
        justify-items: start;
        gap: 0.32rem;
    }

    .performance-design__copy > a {
        max-width: 320px;
        overflow: hidden;
        color: var(--primary);
        font-size: 0.82rem;
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .performance-design__copy > a:hover {
        text-decoration: underline;
    }

    .performance-status {
        display: inline-flex;
        min-height: 22px;
        align-items: center;
        padding: 0.18rem 0.48rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        color: var(--text-muted);
        background: var(--surface-soft);
        font-size: 0.62rem;
        font-weight: 900;
        letter-spacing: 0.035em;
        text-transform: uppercase;
    }

    .performance-status--published {
        color: var(--success);
        border-color: color-mix(
            in srgb,
            var(--success) 34%,
            var(--border)
        );
        background: color-mix(
            in srgb,
            var(--success) 7%,
            var(--surface)
        );
    }

    .performance-status--draft {
        color: var(--accent);
        border-color: color-mix(
            in srgb,
            var(--accent) 34%,
            var(--border)
        );
    }

    .performance-status--archived {
        opacity: 0.72;
    }

    .performance-rating {
        color: var(--accent) !important;
    }

    .performance-actions-cell {
        width: 52px;
    }

    .performance-actions {
        position: relative;
    }

    .performance-actions > summary {
        display: grid;
        width: 36px;
        height: 34px;
        place-items: center;
        border: 1px solid var(--border);
        border-radius: 9px;
        color: var(--text-soft);
        background: var(--surface-soft);
        cursor: pointer;
        font-weight: 900;
        list-style: none;
    }

    .performance-actions > summary::-webkit-details-marker {
        display: none;
    }

    .performance-actions[open] > summary {
        border-color: var(--primary);
    }

    .performance-actions__menu {
        position: absolute;
        z-index: 10;
        inset-inline-end: 0;
        top: calc(100% + 0.35rem);
        display: grid;
        min-width: 145px;
        padding: 0.35rem;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--surface-solid);
        box-shadow: var(--shadow-lg);
    }

    .performance-actions__menu a {
        padding: 0.55rem 0.65rem;
        border-radius: 8px;
        color: var(--text-soft);
        font-size: 0.75rem;
        font-weight: 750;
    }

    .performance-actions__menu a:hover {
        color: var(--text);
        background: var(--surface-soft);
    }

    .product-performance-pagination {
        padding: 1rem;
    }

    .product-rating-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
        gap: 1rem;
        margin-top: 1.1rem;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--surface-soft);
    }

    .product-rating-panel__summary h2 {
        margin-top: 0.3rem;
        font-size: 1rem;
    }

    .product-rating-average {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.6rem;
    }

    .product-rating-average__stars {
        display: inline-flex;
        gap: 0.12rem;
        color: var(--border-strong);
        font-size: 1rem;
    }

    .product-rating-average__stars .is-filled {
        color: var(--accent);
    }

    .product-rating-average > strong {
        font-size: 0.82rem;
    }

    .product-rating-average > small {
        color: var(--text-muted);
        font-size: 0.7rem;
    }

    .product-rating-form,
    .product-rating-login {
        display: grid;
        height: 100%;
        align-content: center;
        justify-items: start;
        gap: 0.55rem;
        padding-inline-start: 1rem;
        border-inline-start: 1px solid var(--border);
    }

    .product-rating-form > strong {
        font-size: 0.78rem;
    }

    .product-rating-login p {
        margin: 0;
        color: var(--text-muted);
        font-size: 0.74rem;
        line-height: 1.5;
    }

    .product-rating-stars {
        display: flex;
        width: fit-content;
        flex-direction: row-reverse;
    }

    .product-rating-stars input {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }

    .product-rating-stars label {
        color: var(--border-strong);
        cursor: pointer;
        font-size: 1.65rem;
        line-height: 1;
        transition:
            color 120ms ease,
            transform 120ms ease;
    }

    .product-rating-stars label:hover {
        transform: translateY(-1px);
    }

    .product-rating-stars input:checked ~ label,
    .product-rating-stars label:hover,
    .product-rating-stars label:hover ~ label {
        color: var(--accent);
    }

    .product-rating-stars input:focus-visible + label {
        outline: 2px solid var(--primary);
        outline-offset: 3px;
        border-radius: 3px;
    }

    @media (max-width: 1100px) {
        .product-performance-summary {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .product-performance-filters {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .product-performance-filters .btn {
            width: 100%;
        }
    }

    @media (max-width: 760px) {
        .product-performance-summary {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .product-rating-panel {
            grid-template-columns: 1fr;
        }

        .product-rating-form,
        .product-rating-login {
            padding: 0.85rem 0 0;
            border-inline-start: 0;
            border-top: 1px solid var(--border);
        }
    }

    @media (max-width: 520px) {
        .product-performance-summary,
        .product-performance-filters {
            grid-template-columns: 1fr;
        }

        .product-performance-table {
            min-width: 880px;
        }

        .performance-design {
            min-width: 240px;
        }

        .performance-design__copy > a {
            max-width: 220px;
        }
    }
}

@layer components {
    .product-rating-panel.product-rating-panel--compact {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .product-rating-panel--compact .product-rating-panel__summary {
        display: grid;
        justify-items: center;
        gap: 0.25rem;
    }

    .product-rating-panel--compact .product-rating-panel__summary h2 {
        margin: 0.2rem 0 0;
    }

    .product-rating-panel--compact .product-rating-average {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        margin-top: 0.55rem;
    }

    .product-rating-panel--compact .product-rating-average__stars {
        display: inline-flex;
        gap: 0.12rem;
        align-items: center;
        justify-content: center;
    }

    .product-rating-panel--compact .product-rating-average__value {
        color: var(--text);
        font-size: 0.82rem;
        font-weight: 850;
        white-space: nowrap;
    }

    .product-rating-panel--compact .product-rating-average__count {
        color: var(--text-muted);
        font-size: 0.72rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .product-rating-panel--compact .product-rating-panel__action {
        width: 100%;
        padding-top: 0.9rem;
        border-top: 1px solid var(--border);
    }

    .product-rating-panel--compact .product-rating-form,
    .product-rating-panel--compact .product-rating-login {
        display: grid;
        width: 100%;
        height: auto;
        align-content: initial;
        justify-items: center;
        gap: 0.6rem;
        padding: 0;
        border: 0;
        text-align: center;
    }

    .product-rating-panel--compact .product-rating-login p {
        max-width: 520px;
        margin: 0;
    }

    .product-rating-panel--compact .product-rating-stars {
        justify-content: center;
    }

    @media (max-width: 520px) {
        .product-rating-panel.product-rating-panel--compact {
            gap: 0.85rem;
            padding: 0.85rem;
        }

        .product-rating-panel--compact .product-rating-average {
            gap: 0.35rem;
        }

        .product-rating-panel--compact .product-rating-average__stars {
            width: 100%;
        }

        .product-rating-panel--compact .product-rating-average__value,
        .product-rating-panel--compact .product-rating-average__count {
            font-size: 0.7rem;
        }

        .product-rating-panel--compact .product-rating-stars label {
            font-size: 1.5rem;
        }

        .product-rating-panel--compact .product-rating-form .btn,
        .product-rating-panel--compact .product-rating-login .btn {
            width: 100%;
        }
    }

    @media (max-width: 360px) {
        .product-rating-panel--compact .product-rating-average__value,
        .product-rating-panel--compact .product-rating-average__count {
            width: 100%;
        }
    }
}

@layer components {
    .product-detail__grid {
        align-items: start;
    }

    .product-purchase {
        align-self: start;
        gap: clamp(0.65rem, 1.5vw, 0.9rem);
        padding: clamp(1rem, 2.3vw, 1.4rem);
    }

    .product-purchase h1 {
        margin: 0;
        font-size: clamp(1.75rem, 3.2vw, 2.65rem);
        line-height: 1.03;
        letter-spacing: -0.04em;
        text-wrap: balance;
    }

    .product-purchase__description {
        margin: 0;
        font-size: clamp(0.88rem, 1.35vw, 1rem);
        line-height: 1.55;
    }

    .product-tags {
        gap: 0.4rem;
        margin-block: 0;
    }

    .product-purchase__price {
        margin: 0;
        font-size: clamp(1.55rem, 2.8vw, 2.1rem);
        line-height: 1;
    }

    .product-purchase .form-field {
        gap: 0.35rem;
        margin: 0;
    }

    .product-purchase .form-help {
        margin-top: 0.15rem;
        line-height: 1.35;
    }

    .product-purchase__actions {
        gap: 0.55rem;
        margin-top: 0.1rem;
    }

    .product-purchase__actions .btn {
        min-height: 44px;
    }

    .product-purchase
        .product-rating-panel.product-rating-panel--compact {
        gap: 0.7rem;
        margin-top: 0.3rem;
        padding: 0.8rem;
    }

    .product-purchase
        .product-rating-panel--compact
        .product-rating-panel__summary {
        gap: 0.15rem;
    }

    .product-purchase
        .product-rating-panel--compact
        .product-rating-panel__summary h2 {
        margin-top: 0.1rem;
        font-size: 0.92rem;
    }

    .product-purchase
        .product-rating-panel--compact
        .product-rating-average {
        margin-top: 0.35rem;
    }

    .product-purchase
        .product-rating-panel--compact
        .product-rating-panel__action {
        padding-top: 0.65rem;
    }

    .product-purchase
        .product-rating-panel--compact
        .product-rating-form {
        gap: 0.45rem;
    }

    .product-purchase
        .product-rating-panel--compact
        .product-rating-stars label {
        font-size: 1.45rem;
    }

    .product-purchase .license-summary {
        margin-top: 0.2rem;
        padding: 0.8rem;
    }

    .product-purchase .license-summary p {
        margin-top: 0.3rem;
        line-height: 1.45;
    }

    @media (max-width: 900px) {
        .product-purchase {
            gap: 0.75rem;
        }

        .product-purchase h1 {
            font-size: clamp(1.7rem, 5vw, 2.35rem);
        }
    }

    @media (max-width: 620px) {
        .product-purchase {
            padding: 0.95rem;
        }

        .product-purchase h1 {
            font-size: clamp(1.55rem, 7vw, 2.05rem);
            line-height: 1.05;
        }

        .product-purchase__description {
            font-size: 0.88rem;
        }

        .product-purchase__price {
            font-size: 1.55rem;
        }

        .product-purchase__actions {
            display: grid;
            grid-template-columns: 1fr;
        }

        .product-purchase__actions form,
        .product-purchase__actions .btn {
            width: 100%;
        }
    }

    @media (max-width: 380px) {
        .product-purchase {
            gap: 0.6rem;
            padding: 0.8rem;
        }

        .product-purchase h1 {
            font-size: 1.5rem;
        }

        .product-purchase
            .product-rating-panel.product-rating-panel--compact {
            padding: 0.7rem;
        }
    }
}


@layer components {
    /*
     * V17.3 avait volontairement beaucoup compacté la colonne.
     * La notation prenant désormais très peu de place, on redonne de l'air
     * aux autres éléments de la zone d'achat.
     */
    .product-purchase {
        gap: clamp(0.85rem, 1.8vw, 1.15rem);
    }

    /*
     * Plus aucun encart dédié : la notation s'intègre directement dans
     * product-purchase.
     */
    .product-rating-panel.product-rating-panel--inline {
        display: block;
        width: 100%;
        margin: 0.1rem 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        text-align: center;
    }

    .product-rating-panel--inline h2 {
        margin: 0 0 0.42rem;
        color: var(--text);
        font-size: 0.78rem;
        font-weight: 850;
        line-height: 1.2;
        letter-spacing: 0.01em;
    }

    .product-rating-inline {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.48rem;
    }

    .product-rating-inline__form {
        display: contents;
    }

    /*
     * row-reverse permet d'utiliser le sélecteur "~" pour colorer toutes les
     * étoiles situées avant l'étoile survolée visuellement.
     */
    .product-rating-panel--inline .product-rating-stars {
        display: inline-flex;
        flex-direction: row-reverse;
        align-items: center;
        justify-content: center;
        width: auto;
        gap: 0.08rem;
    }

    .product-rating-panel--inline .product-rating-star {
        display: inline-grid;
        width: 1.35rem;
        height: 1.5rem;
        place-items: center;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 5px;
        color: var(--border-strong);
        background: transparent;
        font-family: inherit;
        font-size: 1.32rem;
        line-height: 1;
        text-decoration: none;
        cursor: pointer;
        appearance: none;
        transition:
            color 120ms ease,
            transform 120ms ease,
            background-color 120ms ease;
    }

    .product-rating-panel--inline .product-rating-star.is-filled {
        color: var(--accent);
    }

    /*
     * Dès qu'une série interactive est survolée, la couleur représentant la
     * moyenne est neutralisée. Le survol affiche alors clairement la note qui
     * sera envoyée au clic.
     */
    .product-rating-stars--clickable:hover .product-rating-star,
    .product-rating-stars--guest:hover .product-rating-star {
        color: var(--border-strong);
    }

    .product-rating-stars--clickable
        .product-rating-star:hover,
    .product-rating-stars--clickable
        .product-rating-star:hover
        ~ .product-rating-star,
    .product-rating-stars--guest
        .product-rating-star:hover,
    .product-rating-stars--guest
        .product-rating-star:hover
        ~ .product-rating-star {
        color: var(--accent);
    }

    .product-rating-panel--inline .product-rating-star:hover {
        transform: translateY(-1px) scale(1.08);
    }

    .product-rating-panel--inline
        .product-rating-star:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
        background: var(--surface-soft);
    }

    .product-rating-inline__average {
        color: var(--text-soft);
        font-size: 0.74rem;
        font-weight: 820;
        line-height: 1;
        white-space: nowrap;
    }

    .product-rating-inline__login-hint {
        max-width: 440px;
        margin: 0.35rem auto 0;
        color: var(--text-muted);
        font-size: 0.66rem;
        line-height: 1.35;
        text-align: center;
    }

    .product-rating-inline__login-hint a {
        color: inherit;
        text-decoration: none;
    }

    .product-rating-inline__login-hint a:hover {
        color: var(--primary);
        text-decoration: underline;
    }

    @media (max-width: 620px) {
        .product-purchase {
            gap: 0.85rem;
        }

        .product-rating-panel--inline h2 {
            margin-bottom: 0.35rem;
        }

        .product-rating-panel--inline .product-rating-star {
            width: 1.45rem;
            height: 1.6rem;
            font-size: 1.4rem;
        }

        .product-rating-inline__average {
            font-size: 0.72rem;
        }
    }

    @media (max-width: 360px) {
        .product-rating-inline {
            gap: 0.3rem;
        }

        .product-rating-panel--inline .product-rating-stars {
            width: 100%;
        }

        .product-rating-inline__average {
            width: 100%;
            text-align: center;
        }

        .product-rating-inline__login-hint {
            font-size: 0.64rem;
        }
    }

    @media (hover: none) {
        .product-rating-panel--inline .product-rating-star:hover {
            transform: none;
        }
    }
}

@layer components {
    /*
     * Desktop :
     * - la galerie conserve sa hauteur naturelle ;
     * - la ligne de grille prend donc au minimum cette hauteur ;
     * - product-purchase s'étire sur toute cette hauteur.
     */
    @media (min-width: 901px) {
        .product-detail__grid {
            align-items: stretch;
        }

        .product-gallery {
            align-self: start;
        }

        .product-purchase {
            display: flex;
            flex-direction: column;
            align-self: stretch;
            justify-content: space-between;
            gap: clamp(0.95rem, 1.5vw, 1.3rem);
            padding: clamp(1.25rem, 3vw, 2rem);
        }

        /*
         * Les marges verticales historiques sont retirées là où le nouveau
         * flex + gap + space-between gère désormais l'espacement.
         */
        .product-purchase > h1,
        .product-purchase > .product-purchase__description,
        .product-purchase > .product-tags,
        .product-purchase > .product-purchase__price,
        .product-purchase > .form-field,
        .product-purchase > .product-purchase__actions,
        .product-purchase > .product-rating-panel,
        .product-purchase > .license-summary {
            margin-block: 0;
        }
    }

    /*
     * La notation reste très compacte :
     * étoiles + moyenne + nombre d'avis sur une seule ligne.
     */
    .product-rating-panel.product-rating-panel--inline {
        margin-block: 0;
    }

    .product-rating-inline {
        gap: 0.42rem;
    }

    .product-rating-inline__count {
        display: inline-flex;
        align-items: center;
        color: var(--text-muted);
        font-size: 0.7rem;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }

    .product-rating-inline__count::before {
        margin-inline-end: 0.42rem;
        color: var(--border-strong);
        content: "·";
        font-weight: 900;
    }

    /*
     * La petite aide de connexion ne doit pas recréer un gros bloc.
     */
    .product-rating-inline__login-hint {
        margin-top: 0.3rem;
    }

    /*
     * Sur tablette/mobile les deux colonnes sont empilées : on revient à une
     * hauteur naturelle et à un espacement classique.
     */
    @media (max-width: 900px) {
        .product-detail__grid {
            align-items: start;
        }

        .product-purchase {
            display: flex;
            flex-direction: column;
            align-self: auto;
            justify-content: flex-start;
            gap: 0.95rem;
        }
    }

    @media (max-width: 620px) {
        .product-purchase {
            gap: 0.85rem;
        }

        .product-rating-inline {
            gap: 0.34rem;
        }

        .product-rating-inline__count {
            font-size: 0.68rem;
        }
    }

    @media (max-width: 360px) {
        .product-rating-inline__count {
            width: auto;
        }

        .product-rating-inline__count::before {
            margin-inline-end: 0.32rem;
        }
    }
}

@layer components {
    .product-license-field {
        grid-column: 1 / -1;
    }

    .license-summary--link {
        position: relative;
        display: block;
        cursor: pointer;
        transition:
            transform 170ms ease,
            border-color 170ms ease,
            background-color 170ms ease,
            box-shadow 170ms ease;
    }

    .license-summary--link:hover {
        transform: translateY(-2px);
        border-color: color-mix(
            in srgb,
            var(--primary) 36%,
            var(--border)
        );
        background: color-mix(
            in srgb,
            var(--primary) 5%,
            var(--surface-soft)
        );
        box-shadow: var(--shadow-sm);
    }

    .license-summary__heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        color: var(--text);
    }

    .license-summary__heading > span {
        color: var(--primary);
        font-size: 0.82rem;
    }

    .license-summary__details {
        display: inline-flex;
        margin-top: 0.45rem;
        color: var(--primary);
        font-size: 0.7rem;
        font-weight: 820;
    }

    .checkout-billing-group {
        display: grid;
        gap: 0;
    }

    .checkout-billing-identity {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
        margin-bottom: 0.9rem;
    }

    .checkout-billing-identity > div {
        display: grid;
        min-width: 0;
        gap: 0.16rem;
        padding: 0.8rem;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: var(--surface-soft);
    }

    .checkout-billing-identity span {
        color: var(--text-muted);
        font-size: 0.66rem;
        font-weight: 820;
        text-transform: uppercase;
    }

    .checkout-billing-identity strong {
        overflow-wrap: anywhere;
        font-size: 0.8rem;
    }

    .checkout-billing-grid {
        display: grid;
        grid-template-columns: minmax(120px, 0.65fr) minmax(180px, 1.35fr);
        gap: 0.75rem;
    }

    .checkout-billing-grid__full {
        grid-column: 1 / -1;
    }

    .admin-order-row__customer {
        color: var(--text) !important;
        font-weight: 780;
    }

    .admin-order-detail-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
        align-items: start;
        gap: 1rem;
    }

    .admin-order-customer-card {
        position: sticky;
        top: calc(var(--header-height) + 1rem);
    }

    .admin-order-header-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0.6rem;
    }

    .admin-order-customer-details {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .admin-order-customer-details > div {
        display: grid;
        min-width: 0;
        gap: 0.18rem;
        padding: 0.75rem;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface-soft);
    }

    .admin-order-customer-details__wide {
        grid-column: 1 / -1;
    }

    .admin-order-customer-details dt {
        color: var(--text-muted);
        font-size: 0.64rem;
        font-weight: 850;
        letter-spacing: 0.035em;
        text-transform: uppercase;
    }

    .admin-order-customer-details dd {
        min-width: 0;
        margin: 0;
        color: var(--text);
        font-size: 0.78rem;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .admin-order-resend-note {
        margin-top: 0.85rem;
        padding: 0.8rem;
        border: 1px solid color-mix(
            in srgb,
            var(--primary) 25%,
            var(--border)
        );
        border-radius: 12px;
        background: color-mix(
            in srgb,
            var(--primary) 5%,
            var(--surface-soft)
        );
    }

    .admin-order-resend-note strong {
        font-size: 0.78rem;
    }

    .admin-order-resend-note p {
        margin-top: 0.25rem;
        color: var(--text-muted);
        font-size: 0.7rem;
        line-height: 1.45;
    }

    @media (max-width: 980px) {
        .admin-order-detail-layout {
            grid-template-columns: 1fr;
        }

        .admin-order-customer-card {
            position: static;
        }
    }

    @media (max-width: 620px) {
        .checkout-billing-identity,
        .checkout-billing-grid,
        .admin-order-customer-details {
            grid-template-columns: 1fr;
        }

        .checkout-billing-grid__full,
        .admin-order-customer-details__wide {
            grid-column: auto;
        }

        .admin-order-header-actions,
        .admin-order-header-actions form,
        .admin-order-header-actions .btn {
            width: 100%;
        }
    }
}

/* SHAPLINE V20 — BEGIN SECURE DOWNLOAD PORTAL */
@layer components {
    .temporary-download-shell {
        display: grid;
        width: min(100%, 920px);
        gap: 1rem;
        margin-inline: auto;
    }

    .temporary-download-header,
    .temporary-download-list,
    .temporary-download-footer {
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .temporary-download-header {
        display: grid;
        justify-items: center;
        gap: 0.7rem;
        padding: clamp(1.5rem, 5vw, 3rem);
        text-align: center;
    }

    .temporary-download-header h1 {
        font-size: clamp(2.1rem, 5vw, 4rem);
        line-height: 1;
        letter-spacing: -0.05em;
    }

    .temporary-download-header > p {
        max-width: 680px;
        color: var(--text-soft);
    }

    .temporary-download-status {
        display: inline-flex;
        padding: 0.35rem 0.65rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        font-size: 0.7rem;
        font-weight: 850;
        text-transform: uppercase;
    }

    .temporary-download-status--success {
        color: var(--success);
    }

    .temporary-download-status--expired {
        color: var(--danger);
    }

    .temporary-download-meta {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
    }

    .temporary-download-meta > span {
        display: grid;
        gap: 0.1rem;
        padding: 0.65rem 0.8rem;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface-soft);
    }

    .temporary-download-meta small {
        color: var(--text-muted);
        font-size: 0.63rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .temporary-download-list {
        display: grid;
        overflow: hidden;
    }

    .temporary-download-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .temporary-download-item:last-child {
        border-bottom: 0;
    }

    .temporary-download-item.is-consumed {
        opacity: 0.65;
    }

    .temporary-download-item__copy {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 0.85rem;
    }

    .temporary-download-item__icon {
        display: grid;
        width: 48px;
        height: 48px;
        flex: 0 0 auto;
        place-items: center;
        border-radius: 13px;
        color: var(--primary);
        background: var(--primary-soft);
        font-size: 0.68rem;
        font-weight: 900;
    }

    .temporary-download-item h2 {
        font-size: 0.95rem;
    }

    .temporary-download-item p,
    .temporary-download-item small,
    .temporary-download-footer p {
        color: var(--text-soft);
        font-size: 0.76rem;
    }

    .temporary-download-item__used {
        color: var(--text-muted);
        font-size: 0.72rem;
        font-weight: 780;
    }

    .temporary-download-footer {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
    }

    .temporary-download-footer__actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.55rem;
    }

    @media (max-width: 680px) {
        .temporary-download-item,
        .temporary-download-footer {
            grid-template-columns: 1fr;
        }

        .temporary-download-item form,
        .temporary-download-item .btn,
        .temporary-download-footer__actions,
        .temporary-download-footer__actions .btn {
            width: 100%;
        }

        .temporary-download-footer__actions {
            display: grid;
        }
    }
}
/* SHAPLINE V20 — END SECURE DOWNLOAD PORTAL */

/* SHAPLINE V21 BEGIN PRODUCT IMAGE ADMIN */
@layer components {
    .product-image-management-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(230px, 0.65fr);
        align-items: center;
        gap: 0.85rem;
        margin-bottom: 1rem;
    }

    .product-card-hover-setting {
        min-width: 0;
    }

    .product-image-management-hint {
        color: var(--text-muted);
        font-size: 0.75rem;
        line-height: 1.55;
    }

    .media-admin-grid--sortable {
        position: relative;
    }

    .media-admin-card--sortable {
        position: relative;
        transition:
            transform 150ms ease,
            opacity 150ms ease,
            border-color 150ms ease,
            box-shadow 150ms ease;
    }

    .media-admin-card--sortable.is-dragging {
        z-index: 10;
        border-color: var(--primary);
        opacity: 0.55;
        box-shadow: var(--shadow);
        transform: scale(0.98);
    }

    .media-admin-card__visual {
        position: relative;
        overflow: hidden;
    }

    .media-admin-card__visual > img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .media-admin-card__position {
        position: absolute;
        top: 0.55rem;
        left: 0.55rem;
        display: grid;
        min-width: 29px;
        height: 29px;
        place-items: center;
        padding-inline: 0.35rem;
        border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
        border-radius: 999px;
        color: var(--text);
        background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
        box-shadow: var(--shadow-sm);
        font-size: 0.7rem;
        font-weight: 900;
        backdrop-filter: blur(12px);
    }

    .media-admin-card__drag-handle {
        position: absolute;
        top: 0.55rem;
        right: 0.55rem;
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
        padding: 0;
        border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
        border-radius: 12px;
        color: var(--text);
        background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
        box-shadow: var(--shadow-sm);
        cursor: grab;
        font-size: 1rem;
        font-weight: 900;
        line-height: 1;
        backdrop-filter: blur(12px);
    }

    .media-admin-card__drag-handle:hover {
        color: #ffffff;
        border-color: transparent;
        background: linear-gradient(135deg, var(--primary), var(--violet));
    }

    .media-admin-card__drag-handle:active {
        cursor: grabbing;
    }

    [dir="rtl"] .media-admin-card__position {
        right: 0.55rem;
        left: auto;
    }

    [dir="rtl"] .media-admin-card__drag-handle {
        right: auto;
        left: 0.55rem;
    }

    .product-image-sort-status {
        position: absolute;
        right: 0;
        bottom: -1.8rem;
        color: var(--text-muted);
        font-size: 0.7rem;
        font-weight: 750;
    }

    [dir="rtl"] .product-image-sort-status {
        right: auto;
        left: 0;
    }

    @media (max-width: 720px) {
        .product-image-management-toolbar {
            grid-template-columns: 1fr;
        }
    }
}
/* SHAPLINE V21 END PRODUCT IMAGE ADMIN */

/* SHAPLINE V21.1 BEGIN PRODUCT IMAGE SORT FIX */
@layer components {
    .media-admin-grid--sortable.is-sorting {
        user-select: none;
    }

    .media-admin-card__drag-handle {
        touch-action: none;
    }

    .media-admin-card--sortable.is-dragging {
        z-index: 20;
        opacity: 0.58;
        transform: scale(0.975);
    }

    .media-admin-grid--sortable.is-sorting
        .media-admin-card:not(.is-dragging) {
        transition:
            transform 140ms ease,
            border-color 140ms ease,
            box-shadow 140ms ease;
    }
}
/* SHAPLINE V21.1 END PRODUCT IMAGE SORT FIX */

/* =========================================================
   PRODUCT CARD — RESUME PLIABLE
   ========================================================= */

@layer components {
    /*
     * Toutes les cartes d'une même ligne conservent la même hauteur.
     */
    .product-card {
        display: flex;
        height: 100%;
        flex-direction: column;
    }

    .product-card__visual {
        flex: 0 0 auto;
    }

    .product-card__body {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
    }

    /*
     * Zone du résumé.
     *
     * Au repos :
     * - maximum 2 lignes ;
     * - réserve toujours la hauteur de 2 lignes afin que les cartes
     *   restent visuellement alignées.
     */
    .product-card__summary {
        position: relative;
        margin-top: 0.55rem;
        padding-inline-end: 2.15rem;
    }

    .product-card__summary > p {
        display: -webkit-box;
        min-height: calc(1.55em * 2);
        margin-top: 0;
        overflow: hidden;
        color: var(--text-soft);
        font-size: 0.9rem;
        line-height: 1.55;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    /*
     * Résumé déplié.
     */
    .product-card.is-summary-expanded
    .product-card__summary > p {
        display: block;
        overflow: visible;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }

    /*
     * Petit bouton circulaire placé à droite du résumé.
     */
    .product-card__summary-toggle {
        position: absolute;
        inset-inline-end: 0;
        bottom: 0.05rem;
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 50%;
        color: var(--text-soft);
        background: var(--surface-soft);
        cursor: pointer;
        transition:
            color 160ms ease,
            border-color 160ms ease,
            background-color 160ms ease,
            transform 160ms ease;
    }

    .product-card__summary-toggle[hidden] {
        display: none;
    }

    .product-card__summary-toggle:hover {
        color: var(--primary);
        border-color: color-mix(
            in srgb,
            var(--primary) 36%,
            var(--border)
        );
        background: color-mix(
            in srgb,
            var(--primary) 7%,
            var(--surface-soft)
        );
    }

    .product-card__summary-toggle svg {
        width: 15px;
        height: 15px;
        transition: transform 180ms ease;
    }

    /*
     * La flèche ↑ indique que le résumé peut être refermé.
     */
    .product-card.is-summary-expanded
        .product-card__summary-toggle svg {
        transform: rotate(180deg);
    }

    /*
     * Cette règle est volontairement plus spécifique que les anciens
     * ".product-tags { margin-block: 0; }".
     */
    .product-card .product-tags {
        margin-top: 0.75rem;
        margin-bottom: 0;
    }

    /*
     * Le footer reste poussé vers le bas de la carte.
     * Cela améliore nettement l'alignement prix / détails entre les cartes
     * d'une même ligne.
     */
    .product-card__footer {
        margin-top: auto;
    }

    /*
     * Quand des tags existent, on conserve néanmoins l'espacement
     * historique avant le footer.
     */
    .product-card .product-tags + .product-card__footer {
        margin-top: 1.2rem;
    }

    @media (max-width: 680px) {
        .product-card__summary {
            padding-inline-end: 2rem;
        }

        .product-card__summary-toggle {
            width: 27px;
            height: 27px;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .product-card__summary-toggle,
        .product-card__summary-toggle svg {
            transition: none;
        }
    }
}

@layer components {
    .product-card__tags {
        position: relative;
        min-width: 0;
        margin-top: 0.75rem;
        padding-inline-end: 2.2rem;
    }

    /*
     * État fermé :
     * une seule ligne visuelle de tags.
     */
    .product-card__tags .product-tags {
        display: flex;
        min-width: 0;
        max-height: 30px;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.4rem;
        margin: 0;
        overflow: hidden;
    }

    /*
     * Hauteur maîtrisée des tags dans les cartes produit.
     * Cela évite que leur bord inférieur soit coupé par
     * le overflow:hidden de la ligne repliée.
     */
    .product-card__tags .tag-chip {
        min-height: 28px;
        align-items: center;
        padding: 0.3rem 0.58rem;
        line-height: 1;
    }

    /*
     * État ouvert :
     * tous les tags sont visibles.
     */
    .product-card.is-tags-expanded
        .product-card__tags .product-tags {
        max-height: none;
        overflow: visible;
    }

    /*
     * Bouton "..."
     */
    .product-card__tags-toggle {
        position: absolute;
        inset-inline-end: 0;
        top: 1px;
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 50%;
        color: var(--text-soft);
        background: var(--surface-soft);
        cursor: pointer;
        transition:
            color 160ms ease,
            border-color 160ms ease,
            background-color 160ms ease,
            transform 160ms ease;
    }

    .product-card__tags-toggle[hidden] {
        display: none;
    }

    .product-card__tags-toggle > span {
        display: block;
        margin-top: -5px;
        font-size: 0.9rem;
        font-weight: 900;
        line-height: 1;
        letter-spacing: 0.04em;
    }

    .product-card__tags-toggle:hover {
        color: var(--primary);
        border-color: color-mix(
            in srgb,
            var(--primary) 36%,
            var(--border)
        );
        background: color-mix(
            in srgb,
            var(--primary) 7%,
            var(--surface-soft)
        );
    }

    /*
     * Petit état visuel lorsqu'il est ouvert.
     */
    .product-card.is-tags-expanded
        .product-card__tags-toggle {
        color: #ffffff;
        border-color: transparent;
        background: linear-gradient(
            135deg,
            var(--primary),
            var(--violet)
        );
        transform: rotate(90deg);
    }

    /*
     * Le footer reste aligné en bas.
     */
    .product-card__tags + .product-card__footer {
        margin-top: 1.2rem;
    }

    @media (max-width: 680px) {
        .product-card__tags {
            padding-inline-end: 2rem;
        }

        .product-card__tags-toggle {
            width: 27px;
            height: 27px;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .product-card__tags-toggle {
            transition: none;
        }
    }
}