/* =================================================================
   CARMONY — Custom Styles
   Premium luxury car dealership · Refined micro-interactions
   ================================================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'pnum' 1;
    font-variant-ligatures: common-ligatures;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(26, 26, 26, 0.05);
}

/* Display headings : optical refinement */
.font-display, h1.font-display, h2.font-display, h3.font-display {
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'pnum' 1, 'lnum' 1;
    font-variant-ligatures: common-ligatures contextual;
    -webkit-font-smoothing: subpixel-antialiased;
}

/* Hide Alpine x-cloak elements until ready */
[x-cloak] { display: none !important; }

/* ------- Selection ------- */
::selection {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* ------- Custom scrollbar (subtle) ------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #f4f4f4;
}
::-webkit-scrollbar-thumb {
    background: #b8b8b8;
    border-radius: 5px;
    border: 2px solid #f4f4f4;
}
::-webkit-scrollbar-thumb:hover {
    background: #8a8a8a;
}

/* ------- Reveal-on-scroll animation -------
   Default: visible (graceful fallback if JS disabled or before init).
   When <html class="js-ready"> is set by app.js, .reveal becomes hidden
   then animated in by IntersectionObserver. */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

html.js-ready .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.215, 0.61, 0.355, 1),
                transform 0.9s cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: opacity, transform;
}

html.js-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ------- Hero CARMONY title — extra refined letter spacing ------- */
.hero-title-shadow {
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* ------- Form input styling refinements ------- */
input[type="text"],
input[type="email"],
input[type="tel"] {
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder {
    transition: opacity 0.3s ease;
}
input:focus::placeholder {
    opacity: 0.5;
}

/* Autofill background fix for dark form */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 0 1000px rgba(255, 255, 255, 0.08);
    caret-color: #ffffff;
}

/* ------- Custom radio buttons (peer-checked) ------- */
.peer:checked + span {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: inset 0 0 0 3px #2b2b2b;
}

/* ------- Smooth focus rings ------- */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 3px;
    border-radius: 4px;
}

input:focus-visible {
    outline: none;
}

/* ------- Subtle parallax on hero image ------- */
@media (min-width: 768px) {
    .parallax-slow {
        transition: transform 0.4s ease-out;
    }
}

/* ------- Drawer menu items hover effect ------- */
.drawer-link {
    position: relative;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.drawer-link:hover {
    transform: translateX(8px);
}

/* ------- Card lift effect ------- */
.card-lift {
    transition: transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1),
                box-shadow 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* ------- Vertical text adjustments for "PRICE LIST" ------- */
.vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    user-select: none;
}

/* ------- Mobile typography adjustments ------- */
@media (max-width: 640px) {
    .hero-title {
        letter-spacing: 0.25em;
    }
}

/* ------- Print styles (basic) ------- */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ------- Focus ring within drawer ------- */
aside button:focus-visible,
aside a:focus-visible {
    outline-color: #ffffff;
}

/* ------- Loading state for form button ------- */
button[disabled] {
    cursor: not-allowed;
}

/* ------- Refined image hover for banners ------- */
.banner-image {
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ----- Cars listing : refined card hover with lift + image scale ----- */
article.group.bg-carmony-bg.rounded-3xl {
    transition:
        transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
    will-change: transform;
}
article.group.bg-carmony-bg.rounded-3xl:hover {
    transform: translateY(-6px);
    box-shadow:
        0 30px 60px -15px rgba(26, 26, 26, 0.18),
        0 12px 24px -8px rgba(26, 26, 26, 0.1),
        0 0 0 1px rgba(26, 26, 26, 0.04) !important;
}
article.group.bg-carmony-bg.rounded-3xl a img {
    transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1) !important;
}
article.group.bg-carmony-bg.rounded-3xl:hover a img {
    transform: scale(1.06);
}

/* ----- Cars listing : status pill subtle entrance ----- */
article.group .px-2\.5.py-1.rounded-full {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
article.group:hover .px-2\.5.py-1.rounded-full {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px -2px rgba(0,0,0,0.15);
}

/* ----- "Vedette" badge premium look ----- */
article .top-3.right-14, article .top-3.right-3 {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ----- Wishlist heart : luxe interaction ----- */
.fav-btn {
    transition: background-color 0.25s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.1);
}
.fav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px -3px rgba(0, 0, 0, 0.18);
}
.fav-btn:active {
    transform: scale(0.92);
}
.fav-btn[data-fav="1"] {
    box-shadow: 0 4px 16px -4px rgba(239, 68, 68, 0.3);
}

/* ------- Smooth height transition ------- */
.h-transition {
    transition: height 0.3s ease, max-height 0.3s ease;
}

/* ------- Subtle text reveal for hero ------- */
@keyframes letterSpacing {
    from {
        letter-spacing: 0.1em;
        opacity: 0;
    }
    to {
        letter-spacing: 0.4em;
        opacity: 1;
    }
}

.letter-spacing-animate {
    animation: letterSpacing 1.4s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

/* ------- Gradient overlay for banners ------- */
.gradient-overlay {
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.1) 100%);
}

/* ------- Mobile menu drawer width ------- */
@media (max-width: 480px) {
    aside.menu-drawer {
        width: 100vw;
    }
}

/* ------- High-DPI image rendering ------- */
img {
    image-rendering: -webkit-optimize-contrast;
    max-width: 100%;
    height: auto;
}

/* ------- Button refined transitions ------- */
button, a {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 300ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------- Underline animation for footer-style links ------- */
.link-underline {
    position: relative;
    display: inline-block;
}
.link-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}
.link-underline:hover::after {
    width: 100%;
}

/* ------- Larger tap targets on touch devices ------- */
@media (hover: none) and (pointer: coarse) {
    button, a {
        min-height: 44px;
    }
    button.no-min, a.no-min {
        min-height: 0;
    }
}

/* ------- iOS zoom prevention: minimum 16px on form inputs (mobile only) ------- */
@media (max-width: 640px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ------- Safe-area for notched devices ------- */
.safe-pb { padding-bottom: env(safe-area-inset-bottom); }
.safe-pt { padding-top: env(safe-area-inset-top); }
.safe-px { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* ------- Tap feedback for touch devices (replace hover-only) ------- */
@media (hover: none) {
    .group-hover\:opacity-100 { opacity: 1 !important; }
    .group-hover\:scale-105 { transform: none; }
    [class*="hover:"]:active { transform: scale(0.98); transition: transform 0.1s; }
}

/* =================================================================
   PASSAGE 2-15 : OPTIMISATIONS MOBILE iPHONE + DESKTOP POLISH
   ================================================================= */

/* ----- Smooth font rendering everywhere ----- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { font-feature-settings: "kern" 1, "liga" 1, "calt" 1; }

/* ----- Tap highlight subtle ----- */
* { -webkit-tap-highlight-color: rgba(26, 26, 26, 0.05); }

/* ===== P2 — HEADER MOBILE ===== */
@media (max-width: 640px) {
    header nav { padding-top: max(env(safe-area-inset-top), 14px) !important; padding-bottom: 14px !important; }
    header svg { vertical-align: middle; }
    header button[aria-label="Open menu"] { width: 44px; height: 44px; }
}

/* ===== P3 — HERO CARMONY ===== */
section#top h1 {
    font-size: clamp(2.4rem, 11vw, 8rem) !important;
    letter-spacing: clamp(0.18em, 1vw, 0.42em) !important;
    line-height: 0.95 !important;
    margin-bottom: clamp(2rem, 6vw, 4rem) !important;
    font-weight: 300 !important;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: subpixel-antialiased;
    background: linear-gradient(180deg, #1a1a1a 0%, #2b2b2b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
@media (max-width: 640px) {
    section#top { padding-top: 110px !important; padding-bottom: 30px !important; }
    section#top img { max-height: 220px; object-fit: contain; }
}

/* ===== P4 — 3 SERVICES CARDS ===== */
@media (max-width: 640px) {
    section.py-20.sm\:py-28 { padding-top: 56px !important; padding-bottom: 56px !important; }
    section.py-20.sm\:py-28 h2 { margin-bottom: 36px !important; font-size: 1.5rem; }
    section.py-20.sm\:py-28 .grid { gap: 14px !important; }
    section.py-20.sm\:py-28 article { padding: 24px 20px !important; min-height: auto !important; border-radius: 22px !important; }
    section.py-20.sm\:py-28 article > div:first-child { width: 44px; height: 44px; margin-bottom: 18px !important; }
    section.py-20.sm\:py-28 article h3 { font-size: 1rem; margin-bottom: 18px !important; }
    section.py-20.sm\:py-28 article button { margin-top: 4px !important; padding-top: 12px !important; padding-bottom: 12px !important; max-width: 100% !important; }
}

/* ===== P5 — MARKETING COPY ===== */
section.py-16.sm\:py-24 p {
    line-height: 1.22 !important;
    letter-spacing: -0.008em;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'pnum' 1;
}
/* Marketing copy: quote1/quote2 only — target via leading-snug + max-w-xl + space-y-16 ancestor */
@media (min-width: 1024px) {
    section.py-16.sm\:py-24 .space-y-16 > div > p.leading-snug,
    section.py-16.sm\:py-24 .space-y-24 > div > p.leading-snug {
        font-size: clamp(1.75rem, 2.5vw, 2.5rem) !important;
        line-height: 1.18 !important;
        font-weight: 300;
    }
}
@media (max-width: 640px) {
    section.py-16.sm\:py-24 { padding-top: 48px !important; padding-bottom: 48px !important; }
    section.py-16.sm\:py-24 .space-y-16 { gap: 40px !important; }
    section.py-16.sm\:py-24 .space-y-16 > div > p.leading-snug,
    section.py-16.sm\:py-24 .space-y-24 > div > p.leading-snug {
        font-size: 1.4rem !important;
    }
}

/* ===== P6 — BANNERS Cars/Order ===== */
@media (max-width: 640px) {
    section#cars-in-stock, section#order { padding-top: 14px !important; padding-bottom: 14px !important; }
    section#cars-in-stock > div > a > div, section#order > div > a > div {
        height: 180px !important; border-radius: 22px !important;
    }
    section#cars-in-stock h2, section#order h2 {
        font-size: 1.7rem !important; padding: 0 24px !important;
    }
}

/* ===== P7 — CONTACT FORM ===== */
@media (max-width: 640px) {
    #order-form { margin-top: 36px !important; }
    #order-form > div { padding: 28px 24px !important; border-radius: 24px !important; }
    #order-form h3 { font-size: 1.7rem !important; }
    #order-form input { padding: 14px 22px !important; font-size: 16px !important; }
    #order-form button[type="submit"] { padding: 14px !important; }
    section#order .max-w-2xl p { font-size: 1rem !important; line-height: 1.5 !important; }
}

/* ===== P8 — PRICE LIST mobile horizontal ===== */
@media (max-width: 767px) {
    section#detailing { padding-top: 56px !important; padding-bottom: 56px !important; }
    section#detailing > div { padding-left: 20px !important; padding-right: 20px !important; }
    section#detailing h2 { font-size: 2rem !important; margin-bottom: 32px !important; }
    section#detailing .space-y-12 { gap: 28px !important; }
    section#detailing h3 { font-size: 0.9rem !important; }
    section#detailing .text-sm { font-size: 0.95rem !important; }
}

/* ===== P9 — Working/Contacts/About cards ===== */
@media (max-width: 640px) {
    section#working, section#contacts, section#about,
    .max-w-3xl > article#working, .max-w-3xl > article#contacts, .max-w-3xl > article#about {
        padding: 28px 22px !important; border-radius: 22px !important;
    }
    article#working h2, article#contacts h2, article#about h2 { font-size: 1.5rem !important; margin-bottom: 20px !important; }
    article#contacts a { font-size: 0.95rem !important; word-break: break-word; }
}

/* ===== P10 — FOOTER ===== */
@media (max-width: 640px) {
    footer.bg-carmony-bg { padding-top: 28px !important; padding-bottom: max(28px, env(safe-area-inset-bottom)) !important; }
    footer .max-w-6xl { gap: 16px; }
}

/* ===== P11 — DRAWER MENU ===== */
aside .drawer-link, aside nav a {
    min-height: 56px !important;
    display: flex; align-items: center;
}
@media (max-width: 640px) {
    aside nav { padding-top: 80px !important; padding-bottom: max(40px, env(safe-area-inset-bottom)) !important; }
    aside nav a { font-size: 1.65rem !important; padding: 8px 0; }
}

/* ===== P12 — COOKIE BANNER ===== */
@media (max-width: 640px) {
    [x-data="cookieBanner()"] {
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        left: 12px !important;
        right: 12px !important;
    }
    [x-data="cookieBanner()"] > div {
        padding: 20px !important; border-radius: 22px !important;
    }
    [x-data="cookieBanner()"] h3 { font-size: 1.25rem !important; margin-bottom: 6px !important; }
    [x-data="cookieBanner()"] p { font-size: 0.85rem !important; line-height: 1.5 !important; margin-bottom: 14px !important; }
    [x-data="cookieBanner()"] button { padding: 12px 16px !important; font-size: 0.85rem !important; }
}

/* ===== P13 — AUTH PAGES (login, register, forgot, reset) ===== */
@media (max-width: 640px) {
    body.min-h-screen header { padding-top: max(16px, env(safe-area-inset-top)) !important; padding-bottom: 16px !important; }
    main.flex-1 { padding-top: 24px !important; padding-bottom: 24px !important; }
}

/* ===== P14 — CARS / CAR DETAIL / TRADE-IN MOBILE ===== */
@media (max-width: 640px) {
    /* Generic card grid in cars listing */
    [data-cars-grid] { gap: 14px !important; }
    /* Trade-in form */
    .trade-in-form { padding: 24px 20px !important; }
}

/* ===== P15 — DESKTOP POLISH ===== */
@media (min-width: 1024px) {
    /* Container max-width slightly tighter for legibility */
    .max-w-7xl { max-width: 1240px; }
    .max-w-6xl { max-width: 1120px; }
    /* Subtle scroll-driven interactions */
    section { scroll-margin-top: 90px; }
    /* Smoother hover lifts */
    article.cursor-pointer:hover, .hover\:shadow-xl:hover { box-shadow: 0 18px 40px -18px rgba(0,0,0,0.18); }
}

/* ===== Universal polish ===== */
img, svg { vertical-align: middle; }
a, button { -webkit-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
::selection { background: #1a1a1a; color: white; text-shadow: none; }
::-moz-selection { background: #1a1a1a; color: white; text-shadow: none; }

/* Color-scheme hint — prevent flash of dark in supported browsers */
html { color-scheme: light only; }

/* Subtle scrollbar — cross-browser polished */
* { scrollbar-width: thin; scrollbar-color: #c4c4c4 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: rgba(26, 26, 26, 0.18);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background-color 0.2s ease;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(26, 26, 26, 0.3); background-clip: padding-box; }
@media (max-width: 640px) {
    * { scrollbar-width: none; }
    *::-webkit-scrollbar { display: none; }
}

/* Prevent layout shift from fonts */
.font-display { font-display: swap; }

/* Clamp long words */
p, h1, h2, h3, h4 { overflow-wrap: anywhere; word-break: normal; }

/* Mobile-first content padding harmonized + safe-area aware */
@media (max-width: 380px) {
    .px-5 {
        padding-left: max(16px, env(safe-area-inset-left)) !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
    }
    .sm\:px-8 {
        padding-left: max(16px, env(safe-area-inset-left)) !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
    }
}

/* Touch-friendly mobile interactions */
@media (max-width: 640px) {
    /* Larger gap between interactive elements */
    nav.flex.items-center.gap-8 { gap: 1.5rem; }

    /* Reduce horizontal scroll risk */
    body { overflow-x: clip; }

    /* Touch-target minimum 44px enforced */
    button, a {
        min-height: 44px;
    }
    button.no-min, a.no-min, button[class*="px-2"][class*="py-1"], a[class*="px-2"][class*="py-1"] {
        min-height: 0;
    }
}

/* Better focus rings */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #1a1a1a !important; outline-offset: 2px !important;
    border-radius: inherit;
}

/* Smooth scroll for anchors */
html { scroll-behavior: smooth; }

/* Image lazy-load fade-in */
img[loading="lazy"] { transition: opacity 0.3s ease; }
img[loading="lazy"]:not([src]) { opacity: 0; }

/* Print hide noise */
@media print {
    header, footer, [x-data="cookieBanner()"], aside { display: none !important; }
}

/* =================================================================
   POLISH PREMIUM — RELIEF, OMBRAGES, GLASSMORPHISM, MICRO-ANIMATIONS
   ================================================================= */

/* ----- Shadow system (layered, soft, luxury) ----- */
:root {
    --shadow-xs:  0 1px 2px rgba(26, 26, 26, 0.04);
    --shadow-sm:  0 2px 4px rgba(26, 26, 26, 0.04), 0 4px 8px rgba(26, 26, 26, 0.03);
    --shadow-md:  0 4px 12px rgba(26, 26, 26, 0.05), 0 12px 28px -6px rgba(26, 26, 26, 0.08);
    --shadow-lg:  0 10px 30px -5px rgba(26, 26, 26, 0.08), 0 20px 48px -12px rgba(26, 26, 26, 0.12);
    --shadow-xl:  0 20px 60px -15px rgba(26, 26, 26, 0.18), 0 8px 24px -8px rgba(26, 26, 26, 0.08);
    --shadow-dark: 0 20px 50px -10px rgba(0, 0, 0, 0.35), 0 8px 20px -4px rgba(0, 0, 0, 0.15);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.03);
    --ring-subtle: 0 0 0 1px rgba(26, 26, 26, 0.04);
}

/* ----- Header : sticky elegance with fluid backdrop ----- */
header.fixed {
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    transition: box-shadow 0.4s ease, background-color 0.4s ease, padding 0.4s ease;
}
header.shadow-md,
header[class*="shadow"] {
    box-shadow:
        var(--shadow-sm),
        0 1px 0 rgba(26, 26, 26, 0.04) !important;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* ----- Header burger button : refined hover ----- */
header button[aria-label*="enu"], header button[aria-label*="enü"] {
    transition: background-color 0.3s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
header button[aria-label*="enu"]:hover, header button[aria-label*="enü"]:hover {
    background-color: rgba(26, 26, 26, 0.06) !important;
    transform: scale(1.06);
}
header button[aria-label*="enu"]:active, header button[aria-label*="enü"]:active {
    transform: scale(0.94);
}

/* ----- Header nav links underline animation ----- */
header nav a {
    position: relative;
    padding-bottom: 2px;
}
header nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
header nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ----- Logo bonhomme : luxe ring & hover glow with micro-bounce ----- */
header a[href="/login.php"] svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
    transition: filter 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
header a[href="/login.php"]:hover svg {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18)) drop-shadow(0 0 8px rgba(26, 26, 26, 0.05));
    transform: scale(1.1) rotate(-2deg);
}
header a[href="/login.php"]:active svg {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

/* ----- Hero image relief : luxury floating effect ----- */
section#top img {
    filter:
        drop-shadow(0 40px 80px rgba(0, 0, 0, 0.28))
        drop-shadow(0 12px 24px rgba(0, 0, 0, 0.12))
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.06));
    transition: filter 0.6s cubic-bezier(0.23, 1, 0.32, 1), transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, filter;
}
section#top img:hover {
    filter:
        drop-shadow(0 50px 100px rgba(0, 0, 0, 0.32))
        drop-shadow(0 18px 36px rgba(0, 0, 0, 0.16))
        drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08));
    transform: translateY(-4px) scale(1.01);
}

/* ----- Hero subtle ground reflection ----- */
section#top .relative.max-w-2xl.mx-auto::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -8px;
    height: 28px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0) 70%);
    filter: blur(8px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
}

/* ----- 3 services cards : relief + inset light ----- */
section.py-20.sm\:py-28 article {
    background: linear-gradient(180deg, #dfdfdf 0%, #d0d0d0 100%) !important;
    box-shadow: var(--shadow-inset), var(--shadow-md), 0 1px 0 rgba(255, 255, 255, 0.5) inset !important;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, background 0.4s ease !important;
}
section.py-20.sm\:py-28 article:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-inset), var(--shadow-xl), 0 1px 0 rgba(255, 255, 255, 0.6) inset !important;
    background: linear-gradient(180deg, #e8e8e8 0%, #d6d6d6 100%) !important;
}
section.py-20.sm\:py-28 article > div:first-child {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}
section.py-20.sm\:py-28 article button {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    letter-spacing: 0.04em;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
section.py-20.sm\:py-28 article button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(26,26,26,0.06) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}
section.py-20.sm\:py-28 article button:hover {
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 0 0 1px rgba(26, 26, 26, 0.05) !important;
    transform: translateY(-2px);
    letter-spacing: 0.06em;
}
section.py-20.sm\:py-28 article button:hover::before {
    opacity: 1;
}
section.py-20.sm\:py-28 article button:active {
    transform: translateY(0);
    transition-duration: 0.1s !important;
}

/* ----- Banners : deep shadow + image zoom parallax + ken-burns motion ----- */
section#cars-in-stock > div > a > div,
section#order > div > a > div {
    box-shadow:
        var(--shadow-xl),
        0 0 0 1px rgba(26, 26, 26, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}
section#cars-in-stock > div > a:hover > div,
section#order > div > a:hover > div {
    box-shadow:
        0 30px 80px -10px rgba(0, 0, 0, 0.4),
        0 12px 30px -8px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(26, 26, 26, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
section#cars-in-stock img, section#order img {
    transition: transform 1.6s cubic-bezier(0.23, 1, 0.32, 1), filter 0.6s ease;
    transform-origin: center center;
}
section#cars-in-stock a:hover img, section#order a:hover img {
    transform: scale(1.08);
    filter: brightness(1.05) saturate(1.05);
}

/* ----- Banner title text shadow for legibility + scale on hover ----- */
section#cars-in-stock h2, section#order h2 {
    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), letter-spacing 0.5s ease;
    transform-origin: left center;
    letter-spacing: 0.02em;
}
section#cars-in-stock a:hover h2, section#order a:hover h2 {
    transform: translateX(8px);
    letter-spacing: 0.04em;
}

/* ----- Banner subtle arrow indicator on hover ----- */
section#cars-in-stock h2::after, section#order h2::after {
    content: ' →';
    display: inline-block;
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.4s ease 0.05s, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    margin-left: 0.3em;
    font-weight: 300;
}
section#cars-in-stock a:hover h2::after, section#order a:hover h2::after {
    opacity: 1;
    transform: translateX(0);
}

/* ----- Contact form : multi-layer shadow + subtle glow + ambient light ----- */
#order-form > div {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 -1px 0 rgba(255, 255, 255, 0.02) inset,
        0 40px 100px -20px rgba(0, 0, 0, 0.55),
        0 16px 36px -10px rgba(0, 0, 0, 0.25),
        0 4px 12px -4px rgba(0, 0, 0, 0.15) !important;
    position: relative;
    transform: translateZ(0);
}
#order-form > div::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    pointer-events: none;
}
#order-form > div::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
#order-form input {
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.25),
        0 1px 0 rgba(255, 255, 255, 0.04) !important;
    transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, transform 0.2s ease !important;
}
#order-form input:hover {
    background: rgba(255, 255, 255, 0.13) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}
#order-form input:focus {
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.18),
        0 0 0 3px rgba(255, 255, 255, 0.1),
        0 0 24px -4px rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}
#order-form button[type="submit"] {
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 24px -6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    letter-spacing: 0.05em;
}
#order-form button[type="submit"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    transform: translateX(-150%) skewX(-20deg);
    transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}
#order-form button[type="submit"]:hover {
    transform: translateY(-2px) scale(1.005);
    box-shadow:
        0 16px 36px -6px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 32px -8px rgba(255, 255, 255, 0.15) !important;
    letter-spacing: 0.08em;
}
#order-form button[type="submit"]:hover::after {
    transform: translateX(150%) skewX(-20deg);
}
#order-form button[type="submit"]:active {
    transform: translateY(0) scale(0.99);
    transition-duration: 0.1s !important;
}

/* ----- PRICE LIST separator lines with gradient ----- */
section#detailing .border-b {
    border-bottom: none !important;
    background-image: linear-gradient(to right, transparent, rgba(26,26,26,0.4), transparent);
    background-position: bottom;
    background-size: 100% 1px;
    background-repeat: no-repeat;
}

/* ----- Dark cards (Working/Contacts/About) : luxe depth + subtle border ----- */
article#working, article#contacts, article#about,
.bg-\[\#5a5a5a\] {
    background:
        radial-gradient(at top right, rgba(255,255,255,0.04) 0%, transparent 40%),
        linear-gradient(145deg, #6a6a6a 0%, #4e4e4e 100%) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 -1px 0 rgba(0, 0, 0, 0.1) inset,
        0 24px 60px -15px rgba(0, 0, 0, 0.35),
        0 10px 24px -8px rgba(0, 0, 0, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.6s ease, background 0.6s ease !important;
    position: relative;
    overflow: hidden;
}
article#working::before, article#contacts::before, article#about::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 30%);
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.6s ease;
}
article#working:hover, article#contacts:hover, article#about:hover {
    transform: translateY(-3px);
    background:
        radial-gradient(at top right, rgba(255,255,255,0.06) 0%, transparent 50%),
        linear-gradient(145deg, #717171 0%, #545454 100%) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 36px 80px -15px rgba(0, 0, 0, 0.45),
        0 14px 30px -8px rgba(0, 0, 0, 0.24) !important;
}
article#working:hover::before, article#contacts:hover::before, article#about:hover::before {
    opacity: 0.9;
}
article#contacts a {
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}
article#contacts a:hover {
    transform: translateX(2px);
}

/* ----- Cookie banner : glass + deep shadow ----- */
[x-data="cookieBanner()"] > div {
    background: linear-gradient(145deg, #2b2b2b 0%, #1a1a1a 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 25px 60px -12px rgba(0, 0, 0, 0.5),
        0 12px 25px -8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
[x-data="cookieBanner()"] button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[x-data="cookieBanner()"] button:hover {
    transform: translateY(-1px);
}

/* ----- Drawer : luxe depth + backdrop blur + ambient lighting ----- */
aside.menu-drawer, div[x-show="menuOpen"] > aside {
    background:
        radial-gradient(at 0% 0%, rgba(255,255,255,0.08) 0%, transparent 40%),
        radial-gradient(at 100% 100%, rgba(0,0,0,0.15) 0%, transparent 50%),
        linear-gradient(145deg, #7a7a7a 0%, #585858 100%) !important;
    box-shadow:
        24px 0 60px -10px rgba(0, 0, 0, 0.35),
        12px 0 24px -8px rgba(0, 0, 0, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}
div[x-show="menuOpen"] > aside::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.1) 30%, rgba(255,255,255,0.1) 70%, transparent);
    pointer-events: none;
}
div[x-show="menuOpen"] > div.absolute.inset-0 {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
aside nav a {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    position: relative;
}
aside nav a:hover {
    transform: translateX(6px);
}
aside nav a::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    width: 3px;
    height: 0;
    background: white;
    transform: translateY(-50%);
    transition: height 0.3s ease;
    border-radius: 2px;
}
aside nav a:hover::before { height: 60%; }

/* ----- Footer : subtle top border + muted gradient ----- */
footer.bg-carmony-bg {
    background: linear-gradient(180deg, #e8e8e8 0%, #dcdcdc 100%);
    border-top: 1px solid rgba(26, 26, 26, 0.06);
}

/* ----- Admin sidebar polish ----- */
aside.bg-carmony-bg {
    background: linear-gradient(180deg, #ececec 0%, #dcdcdc 100%) !important;
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.04), inset -1px 0 0 rgba(0, 0, 0, 0.02);
}

/* ----- Admin sidebar nav items : luxe interactive ----- */
nav[aria-label="Navigation principale"] a,
nav[aria-label="Navigation principale"] button {
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease, padding-left 0.25s ease;
    border-radius: 12px;
}
nav[aria-label="Navigation principale"] a:hover,
nav[aria-label="Navigation principale"] button:hover {
    background-color: rgba(26, 26, 26, 0.04);
    transform: translateX(2px);
}
nav[aria-label="Navigation principale"] a.bg-carmony-darker,
nav[aria-label="Navigation principale"] a.bg-black,
nav[aria-label="Navigation principale"] button.bg-carmony-darker {
    box-shadow:
        0 6px 18px -4px rgba(26, 26, 26, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ----- Admin search bar : luxury feel ----- */
header button[type="button"][class*="rounded-full"]:has(svg) {
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
header button[type="button"][class*="rounded-full"]:has(svg):hover {
    background-color: rgba(26, 26, 26, 0.04);
    box-shadow: 0 2px 8px -2px rgba(26, 26, 26, 0.08);
}

/* ----- Admin cards in dashboard ----- */
main .bg-white, main .bg-carmony-bg {
    box-shadow: var(--shadow-sm), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

/* ----- Admin KPI cards : refined ambient depth ----- */
main .grid > .bg-carmony-bg.rounded-3xl,
main .grid > .bg-white.rounded-3xl {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease, background 0.4s ease;
    overflow: hidden;
    position: relative;
}
main .grid > .bg-carmony-bg.rounded-3xl:hover,
main .grid > .bg-white.rounded-3xl:hover {
    transform: translateY(-3px);
    box-shadow:
        0 16px 40px -10px rgba(26, 26, 26, 0.12),
        0 6px 16px -4px rgba(26, 26, 26, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

/* ----- Admin "VOIR" link in KPIs : underline animation ----- */
main .grid .text-\[10px\].uppercase.tracking-wider {
    position: relative;
    transition: color 0.2s ease;
}
main .grid a:hover .text-\[10px\].uppercase.tracking-wider {
    color: #1a1a1a;
}

/* ----- Everything rounded-3xl gets subtle ring ----- */
.rounded-3xl {
    box-shadow: var(--ring-subtle);
}

/* ----- Language switcher : pill-style active indicator ----- */
header .flex.items-center.gap-2\.5 button {
    position: relative;
    padding: 4px 8px;
    border-radius: 9999px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
header .flex.items-center.gap-2\.5 button.text-black {
    background-color: rgba(26, 26, 26, 0.06);
}
header .flex.items-center.gap-2\.5 button:not(.text-black):hover {
    background-color: rgba(26, 26, 26, 0.04);
    transform: translateY(-1px);
}

/* ----- Buttons universal polish ----- */
button.bg-carmony-darker, a.bg-carmony-darker,
button[class*="bg-black"], .bg-black {
    box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
button.bg-carmony-darker:hover, a.bg-carmony-darker:hover,
button[class*="bg-black"]:hover {
    box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* ----- Smooth everything globally ----- */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ----- Input focus polish — universal ----- */
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08), var(--shadow-xs);
    border-color: #1a1a1a !important;
}

/* ----- Admin tabs : luxe refined pills ----- */
main button[\@click*="tab"], main .flex.items-center button[\@click] {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ----- Admin form labels : tracking ----- */
main label.text-\[11px\].uppercase {
    letter-spacing: 0.08em;
    font-feature-settings: 'cpsp' 1;
}

/* ----- Admin inputs in cars/customers edit ----- */
main input[type="text"],
main input[type="email"],
main input[type="tel"],
main input[type="number"],
main input[type="date"],
main input[type="datetime-local"],
main input[type="url"],
main select,
main textarea {
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
main input:hover:not(:focus),
main select:hover:not(:focus),
main textarea:hover:not(:focus) {
    background-color: rgba(255, 255, 255, 0.6) !important;
}

/* ----- Subtle reveal stagger improvement ----- */
html.js-ready .reveal {
    transition-delay: var(--reveal-delay, 0ms);
}

/* ----- Micro-interaction: pill button shimmer on hover ----- */
a.rounded-full:not(.absolute):not(.fixed):not(.sticky),
button.rounded-full:not(.absolute):not(.fixed):not(.sticky) {
    position: relative;
    isolation: isolate;
}

/* ----- High-DPI border crisp ----- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .border, .border-b, [class*="border-"] {
        image-rendering: crisp-edges;
    }
}

/* ----- Desktop fine-tuning : increased line-height, tracking ----- */
@media (min-width: 1024px) {
    body { line-height: 1.6; }
    h1, h2, h3 { letter-spacing: -0.01em; }
    section#top h1 { letter-spacing: 0.4em !important; }
    section.py-20.sm\:py-28 h2 { font-size: 2rem; }
    /* Refined card hover on desktop (use translate + shadow) */
    article.hover\:shadow-xl { transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); }
}

/* ----- Anti-blur on transforms ----- */
.will-change-transform, article, a, button {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* =================================================================
   PASS 16+ — TABULAR NUMS, COHERENCE, TIGHT POLISH
   ================================================================= */

/* ----- Numerical data: tabular & lining numerals (essential for Cormorant) ----- */
.font-display,
.tabular,
[class*="font-display"],
.numeric,
.price,
.specs dl dd,
input[type="number"],
input[type="tel"],
input[inputmode="numeric"],
input[inputmode="email"] {
    font-feature-settings: 'lnum' 1, 'tnum' 1, 'kern' 1, 'liga' 1;
    font-variant-numeric: tabular-nums lining-nums;
}

/* ----- Force tabular nums on cards/badges/prices/years/km ----- */
.bg-emerald-50, .bg-amber-50, .bg-sky-50,
[class*="bg-carmony-bg"] span,
[class*="rounded-full"] {
    font-variant-numeric: tabular-nums lining-nums;
}

/* ----- car listing card prices specifically ----- */
article .font-display.text-2xl,
article .font-display.text-xl,
article p.line-through,
section[id="contact-form"] form,
aside .font-display {
    font-feature-settings: 'lnum' 1, 'tnum' 1;
    font-variant-numeric: tabular-nums lining-nums;
}

/* ----- Filter form: white background, ensure visible typing ----- */
form input[type="search"],
form input[type="text"]:not(.login-input),
form input[type="email"]:not(.login-input),
form input[type="tel"]:not(.login-input),
form input[type="number"],
form input[type="password"]:not(.login-input),
form select,
form textarea {
    color: #1a1a1a;
    -webkit-text-fill-color: #1a1a1a;
}
/* Exception: dark contact form keeps white text via existing utilities */
#order-form form input,
#order-form form textarea,
#contact-form form input,
#contact-form form textarea {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

/* ----- Trade-in form input visibility + refined focus ----- */
form input.border-black\/10,
form select.border-black\/10,
form textarea.border-black\/10 {
    background-color: #ffffff;
    color: #1a1a1a;
    -webkit-text-fill-color: #1a1a1a;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
form input.border-black\/10:hover:not(:focus),
form select.border-black\/10:hover:not(:focus),
form textarea.border-black\/10:hover:not(:focus) {
    border-color: rgba(26, 26, 26, 0.25) !important;
    background-color: #fdfdfd;
}
form input.border-black\/10:focus,
form select.border-black\/10:focus,
form textarea.border-black\/10:focus {
    border-color: #1a1a1a !important;
    outline: none;
    box-shadow:
        0 0 0 3px rgba(26, 26, 26, 0.08),
        0 1px 4px rgba(26, 26, 26, 0.06);
    background-color: #ffffff;
}

/* ----- Cars filter sidebar sticky polish ----- */
@media (min-width: 1024px) {
    aside form.bg-carmony-bg {
        max-height: calc(100vh - 7rem);
        overflow-y: auto;
        scrollbar-width: thin;
        background: linear-gradient(180deg, rgba(232,232,232,0.95) 0%, rgba(216,216,216,0.85) 100%) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(26,26,26,0.05);
        box-shadow: 0 8px 24px -10px rgba(26,26,26,0.08), inset 0 1px 0 rgba(255,255,255,0.4);
    }
}

/* ----- Filter checkboxes : premium look ----- */
aside form input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #1a1a1a;
}
aside form label {
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}
aside form label:hover {
    color: #1a1a1a;
    transform: translateX(2px);
}

/* ----- Filter inputs : refined focus ----- */
aside form input:not([type="checkbox"]):focus,
aside form select:focus {
    border-color: #1a1a1a !important;
    box-shadow: 0 0 0 3px rgba(26,26,26,0.06), 0 1px 2px rgba(26,26,26,0.05) !important;
}

/* ----- Sort dropdown : luxury look ----- */
.flex.items-center.gap-3 select[name="sort"] {
    border: 1px solid rgba(26,26,26,0.1);
    background-color: white;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.flex.items-center.gap-3 select[name="sort"]:hover {
    border-color: rgba(26,26,26,0.3);
}

/* ----- Cars listing badge: refined pill with subtle ring ----- */
article .px-3.py-1.rounded-full,
article .px-2\.5.py-1.rounded-full {
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

/* ----- Car detail gallery: luxe arrows with refined shadow ----- */
section .aspect-\[16\/10\] button {
    box-shadow:
        0 6px 18px -3px rgba(0, 0, 0, 0.18),
        0 2px 6px -1px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
section .aspect-\[16\/10\] button:hover {
    box-shadow:
        0 10px 28px -4px rgba(0, 0, 0, 0.25),
        0 4px 12px -2px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: scale(1.06);
}
section .aspect-\[16\/10\] button:active {
    transform: scale(0.94);
}

/* ----- Car detail main image : luxury frame ----- */
section .aspect-\[16\/10\] {
    box-shadow:
        0 24px 60px -20px rgba(0, 0, 0, 0.3),
        0 8px 20px -8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(26, 26, 26, 0.05);
    overflow: hidden;
}

/* ----- Car detail thumbnails : interactive ----- */
button.aspect-\[4\/3\] {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}
button.aspect-\[4\/3\]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.18);
}
button.aspect-\[4\/3\] img {
    transition: transform 0.5s ease;
}
button.aspect-\[4\/3\]:hover img {
    transform: scale(1.05);
}

/* ----- Sticky header on cars/car/trade-in: ensure no stacking issues ----- */
header.fixed { z-index: 40; isolation: isolate; }
[x-show="menuOpen"].fixed { z-index: 50; }

/* ----- Cars listing: card radius on overflow image fix ----- */
article.rounded-3xl > a > img,
article.rounded-3xl > a img {
    border-radius: 0; /* Image inside aspect-ratio handles its own clipping */
}

/* ----- Car detail: equipment & spec accordion luxe hover ----- */
.bg-carmony-bg button[\@click*="open"] {
    transition: background-color 0.25s ease, padding-left 0.3s ease;
}
.bg-carmony-bg button[\@click*="open"]:hover {
    background-color: rgba(26, 26, 26, 0.03);
    padding-left: calc(1rem + 4px);
}

/* ----- Accordion chevron rotation ----- */
.bg-carmony-bg button[\@click*="open"] svg {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ----- Equipment list refined ----- */
ul.grid li {
    transition: padding-left 0.2s ease;
    line-height: 1.6;
}
ul.grid li:hover {
    padding-left: 4px;
}
ul.grid li::before {
    content: '·';
    color: rgba(26, 26, 26, 0.4);
    margin-right: 0.5em;
    font-weight: bold;
}

/* ----- Pagination: active state shadow ----- */
nav[aria-label="Pagination"] a.bg-carmony-darker {
    box-shadow: 0 4px 12px -3px rgba(26, 26, 26, 0.4);
}

/* ----- Empty state polish ----- */
.bg-carmony-bg.rounded-3xl > svg {
    opacity: 0.5;
}

/* ----- Admin tables : refined zebra + hover ----- */
main table {
    border-collapse: separate;
    border-spacing: 0;
}
main table tbody tr {
    transition: background-color 0.2s ease;
}
main table tbody tr:hover {
    background-color: rgba(26, 26, 26, 0.025);
}
main table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(26, 26, 26, 0.05);
}
main table thead th {
    background: linear-gradient(180deg, rgba(232,232,232,0.6) 0%, rgba(216,216,216,0.4) 100%);
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    font-feature-settings: 'cpsp' 1;
}

/* ----- Admin status badges : polished ----- */
main .px-2\.5.py-1.rounded-full {
    transition: transform 0.2s ease;
    letter-spacing: 0.04em;
}

/* ----- Admin "Ouvrir →" / "Modifier →" links ----- */
main a[href*="action="]:not(.bg-carmony-darker):not([class*="rounded-full"]) {
    transition: color 0.2s ease, transform 0.25s ease;
    display: inline-block;
}
main a[href*="action="]:hover {
    color: #1a1a1a;
    transform: translateX(3px);
}

/* ----- Trade-in success card visual harmony ----- */
main .bg-carmony-bg\/60 {
    background: linear-gradient(180deg, rgba(232, 232, 232, 0.9) 0%, rgba(216, 216, 216, 0.6) 100%);
    border: 1px solid rgba(26, 26, 26, 0.04);
}

/* ----- Select native styling: hide default arrow, add custom ----- */
select:not([multiple]):not([size]) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* ----- Disable hover lift on touch ----- */
@media (hover: none) and (pointer: coarse) {
    section.py-20.sm\:py-28 article:hover,
    article#working:hover, article#contacts:hover, article#about:hover,
    .group:hover img,
    article.group:hover {
        transform: none !important;
    }
    section#cars-in-stock a:hover img, section#order a:hover img {
        transform: none !important;
    }
}

/* ----- Reduce motion: full a11y compliance ----- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.15s !important;
        scroll-behavior: auto !important;
    }
    section#top h1 { animation: none !important; }
    section#top img:hover { transform: none !important; filter: drop-shadow(0 30px 60px rgba(0,0,0,0.25)) !important; }
    .group-hover\:scale-105 { transform: none !important; }
    article.group:hover, article.group.bg-carmony-bg.rounded-3xl:hover { transform: none !important; }
    section#cars-in-stock a:hover img, section#order a:hover img { transform: none !important; filter: none !important; }
    section#cars-in-stock a:hover h2, section#order a:hover h2 { transform: none !important; letter-spacing: 0.02em !important; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ----- Cars detail: prevent body scroll when drawer open (handled in JS via overflow toggle) ----- */

/* ----- Touch target minimum 44x44 (WCAG AAA) ----- */
header button[aria-label*="menu"],
header button[aria-label*="Menu"],
header button[aria-label*="enu"] {
    min-width: 44px;
    min-height: 44px;
}

/* ----- Hero image safety: prevent overflow on very narrow screens ----- */
@media (max-width: 380px) {
    section#top img { max-width: 92%; margin: 0 auto; }
    section#top h1 { letter-spacing: 0.16em !important; font-size: 2.2rem !important; }
}

/* ----- Filter mobile: ensure full width buttons ----- */
@media (max-width: 1023px) {
    aside form.bg-carmony-bg {
        margin-top: 16px;
    }
}

/* ----- Car detail: equipment lists more legible ----- */
ul.grid li {
    line-height: 1.5;
}

/* ----- "En vedette" badge: harmonize with status ----- */
.bg-carmony-darker.text-white.absolute {
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

/* ----- Fav button: smoother heart interaction ----- */
.fav-btn {
    transition: background-color 0.2s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fav-btn:active { transform: scale(0.92); }
.fav-btn[data-fav="1"] svg {
    color: rgb(239 68 68) !important;
    fill: currentColor !important;
}

/* ----- Trade-in & login: harmonize header padding mobile ----- */
@media (max-width: 640px) {
    body > header.bg-carmony-bg {
        padding-top: max(env(safe-area-inset-top), 16px) !important;
    }
}

/* ----- Cars/Car/Trade-in: scroll-padding for sticky header ----- */
html { scroll-padding-top: 88px; }

/* ----- Footer: safe-area on iOS ----- */
footer {
    padding-bottom: max(env(safe-area-inset-bottom), 1.5rem);
}

/* ----- Cookie banner stack on mobile (safe-area aware) ----- */
@media (max-width: 640px) {
    [x-data="cookieBanner()"] > div {
        padding-bottom: max(20px, calc(env(safe-area-inset-bottom) + 8px)) !important;
    }
}

/* ----- Drawer menu: ensure nav links wrap nicely ----- */
aside nav a {
    word-break: keep-all;
    hyphens: none;
}

/* ----- Listing: featured badge position fix when wishlist heart present ----- */
@media (max-width: 480px) {
    article .top-3.right-14 { right: 56px !important; font-size: 10px !important; padding: 4px 8px !important; }
    article .top-3.right-3 { right: 12px !important; }
    article .top-3.left-3 { left: 12px !important; font-size: 10px !important; padding: 4px 8px !important; }
}

/* ----- Car detail breadcrumb: ellipsis for long names ----- */
nav[aria-label="Fil d'Ariane"] span.truncate {
    max-width: 60vw;
    display: inline-block;
    vertical-align: bottom;
}

/* ----- Sticky aside on car detail: max-height to avoid overflow ----- */
@media (min-width: 1024px) {
    aside .lg\:sticky {
        max-height: calc(100vh - 7rem);
        overflow-y: auto;
        scrollbar-width: thin;
        padding-right: 4px;
    }
    aside .lg\:sticky::-webkit-scrollbar { width: 6px; }
    aside .lg\:sticky::-webkit-scrollbar-thumb { background: rgba(26,26,26,0.15); border-radius: 3px; }
}

/* ----- Force visible text in cars filter inputs (white bg + dark text) ----- */
aside form input,
aside form select {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}
aside form input::placeholder,
aside form select::placeholder {
    color: #9a9a9a !important;
    -webkit-text-fill-color: #9a9a9a !important;
}

/* ----- Better h1 on car detail mobile ----- */
@media (max-width: 640px) {
    section.py-10.sm\:py-14 h1.font-display {
        font-size: 2.25rem !important;
        line-height: 1.05 !important;
    }
}

/* ----- Pagination: refined luxe pills ----- */
nav[aria-label="Pagination"] a {
    font-variant-numeric: tabular-nums lining-nums;
    min-width: 40px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
nav[aria-label="Pagination"] a:not(.bg-carmony-darker):hover {
    background-color: rgba(26, 26, 26, 0.05);
    border-color: rgba(26, 26, 26, 0.15);
    transform: translateY(-1px);
}
nav[aria-label="Pagination"] a.bg-carmony-darker {
    box-shadow: 0 4px 14px -3px rgba(26, 26, 26, 0.45), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ----- Total count number on cars hero ----- */
section.bg-carmony-bg p {
    font-variant-numeric: tabular-nums lining-nums;
}

/* ----- Avoid horizontal scroll on mobile (overflow-x: hidden on body class already, this is paranoia) ----- */
html { overflow-x: clip; }

/* ----- Trade-in number inputs: tabular nums ----- */
form input[type="number"],
form input[inputmode="numeric"] {
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: 0.01em;
}

/* ----- Input focus: higher contrast outline ----- */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline-color: #1a1a1a;
}

/* ----- Buttons: minimum height for touch ----- */
button[type="submit"], a.rounded-full {
    min-height: 44px;
}
button[type="submit"].py-2,
a.rounded-full.py-1,
a.rounded-full.py-1\.5,
a.rounded-full.py-2 {
    min-height: 0;
}

/* ----- Cars listing: button "Voir" alignment ----- */
article .pt-4.border-t a.rounded-full {
    flex-shrink: 0;
}

/* ----- Specifications dl: alignment fix ----- */
dl.grid div {
    align-items: baseline;
}
dl.grid dd {
    word-break: break-word;
}

/* =====================================================================
   FINITION HAUTE QUALITÉ — passages 1-10
   Subtle premium polish: typography, motion, depth, rhythm.
   ===================================================================== */

/* ----- P1: Home 3-cards — premium card finish ----- */
.home-card {
    background-image:
        radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.45), rgba(255,255,255,0) 60%),
        linear-gradient(180deg, #d8d8d8 0%, #d2d2d2 100%);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.55) inset,
        0 -1px 0 rgba(0,0,0,0.04) inset,
        0 4px 16px -8px rgba(26,26,26,0.06);
    transition:
        transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        background-position 0.6s ease;
}
.home-card:hover {
    box-shadow:
        0 1px 0 rgba(255,255,255,0.7) inset,
        0 0 0 1px rgba(0,0,0,0.04) inset,
        0 24px 60px -22px rgba(26,26,26,0.22),
        0 8px 24px -10px rgba(26,26,26,0.10);
}
.home-card-num {
    background: radial-gradient(60% 60% at 30% 30%, #ffffff, #f3f3f3 70%, #eaeaea 100%);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.9) inset,
        0 -1px 0 rgba(0,0,0,0.04) inset,
        0 6px 16px -8px rgba(26,26,26,0.18);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease;
}
.home-card:hover .home-card-num {
    transform: translateY(-2px) scale(1.04);
    box-shadow:
        0 1px 0 rgba(255,255,255,1) inset,
        0 -1px 0 rgba(0,0,0,0.05) inset,
        0 14px 28px -12px rgba(26,26,26,0.28);
}
.home-card svg {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.home-card:hover svg {
    transform: translateY(-2px) scale(1.06);
}
.home-card button {
    transition:
        background-color 0.4s ease,
        color 0.4s ease,
        transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.4s ease,
        letter-spacing 0.4s ease;
    letter-spacing: 0.02em;
}
.home-card:hover button {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -8px rgba(26,26,26,0.28);
    letter-spacing: 0.06em;
}

/* ----- P2: Hero — refined ultra-wide breathing room ----- */
@media (min-width: 1536px) {
    section#top h1 {
        letter-spacing: 0.01em;
    }
    section#top {
        padding-top: 8rem;
        padding-bottom: 7rem;
    }
}

/* ----- P3: Marketing copy section — refined typography ----- */
section.py-16.sm\:py-24.bg-white p {
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

/* ----- P4: Universal focus-visible ring (a11y premium) ----- */
*:focus { outline: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible {
    outline: 2px solid rgba(26, 26, 26, 0.85);
    outline-offset: 3px;
    border-radius: inherit;
    transition: outline-offset 0.18s ease;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline-offset: 2px;
}
.bg-carmony-darker:focus-visible,
.bg-black:focus-visible,
[class*="bg-gradient"]:focus-visible {
    outline-color: rgba(255, 255, 255, 0.9);
}

/* ----- P5: Smooth scroll with reduced-motion respect ----- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ----- P6: Body refined kerning + optical sizing ----- */
body {
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'ss01' 1;
    text-rendering: optimizeLegibility;
}
.font-display, [class*="font-display"] {
    font-feature-settings: 'kern' 1, 'liga' 1, 'dlig' 1, 'onum' 1;
    font-optical-sizing: auto;
}

/* ----- P7: Card images — subtle ambient gradient overlay on hover ----- */
section#cars-in-stock a > div::before,
section#order > div > a > div::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.45) 100%);
    opacity: 0.85;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}
section#cars-in-stock a:hover > div::before,
section#order > div > a:hover > div::before {
    opacity: 1;
}

/* ----- P8: Reveal-on-scroll smooth opt-in ----- */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----- P9: Selection color — branded ----- */
::selection {
    background: rgba(26, 26, 26, 0.92);
    color: #ffffff;
}

/* ----- P10: Form fields — refined glow on focus ----- */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.06), 0 1px 0 rgba(26, 26, 26, 0.12) inset;
    background-color: rgba(255, 255, 255, 0.96);
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.bg-white\/10:focus,
.bg-white\/15:focus,
[class*="bg-white\\/"]:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.10), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

/* ----- P11: Header — premium subtle pulse on logo hover ----- */
header a[aria-label*="ARMONY"] svg,
header a[aria-label*="armony"] svg {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), filter 0.5s ease;
}
header a[aria-label*="ARMONY"]:hover svg,
header a[aria-label*="armony"]:hover svg {
    transform: rotate(-4deg) scale(1.06);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}

/* ----- P12: Lang switcher — pill background for active state ----- */
header button:where([\@click*="setLang"]) {
    padding: 4px 10px;
    border-radius: 999px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ----- P13: Drawer menu links — subtle indent on hover ----- */
aside nav a {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
}
aside nav a:hover {
    transform: translateX(6px);
}

/* ----- P14: Card detail "Réserver" / "Demander un essai" — premium feel ----- */
section .bg-carmony-darker.text-white,
button.bg-carmony-darker.text-white {
    transition:
        background-color 0.4s ease,
        transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.4s ease,
        letter-spacing 0.4s ease;
}
section .bg-carmony-darker.text-white:hover,
button.bg-carmony-darker.text-white:not([disabled]):hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -10px rgba(26, 26, 26, 0.45);
    letter-spacing: 0.025em;
}

/* ----- P15: Image lazy-load fade-in ----- */
img[loading="lazy"] {
    transition: opacity 0.6s ease, filter 0.6s ease;
}
img[loading="lazy"]:not([data-loaded]) {
    opacity: 0.6;
    filter: blur(4px);
}
img[loading="lazy"][data-loaded] {
    opacity: 1;
    filter: blur(0);
}

/* ----- P16: Admin sidebar nav — refined active indicator ----- */
aside nav a.bg-carmony-darker,
aside nav a.bg-black {
    position: relative;
}
aside nav a.bg-carmony-darker::before,
aside nav a.bg-black::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    width: 3px;
    height: 60%;
    background: currentColor;
    border-radius: 2px;
    opacity: 0;
    transform: translateY(-50%) scaleY(0.6);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
aside nav a.bg-carmony-darker::before,
aside nav a.bg-black::before {
    opacity: 1;
    transform: translateY(-50%) scaleY(1);
}

/* ----- P17: Eyebrow text — refined letter-spacing rhythm ----- */
[class*="uppercase"][class*="tracking-"] {
    text-transform: uppercase;
    font-feature-settings: 'kern' 1, 'tnum' 1;
}

/* ----- P18: Pricing display — refined tabular figures ----- */
[class*="font-display"][class*="text-"][class*="€"],
.font-display:has(+ span:contains("€")),
[class*="text-3xl"][class*="font-display"],
[class*="text-4xl"][class*="font-display"],
[class*="text-5xl"][class*="font-display"] {
    font-variant-numeric: lining-nums tabular-nums;
}

/* ----- P19: Subtle horizontal rules ----- */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.08) 20%, rgba(0,0,0,0.08) 80%, transparent 100%);
}

/* ----- P20: Footer — refined copyright tracking ----- */
footer p {
    font-feature-settings: 'kern' 1, 'tnum' 1;
}

/* ----- P21: Admin KPI badges — never wrap, always one line ----- */
[class*="bg-emerald"].rounded-full,
[class*="bg-rose"].rounded-full,
[class*="bg-amber"].rounded-full,
[class*="bg-blue"].rounded-full,
.tabular-nums.rounded-full,
.inline-flex.rounded-full {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    flex: 0 0 auto;
}

/* ----- P22: Admin KPI cards — make value+badge layout robust ----- */
@media (max-width: 640px) {
    /* When KPI value gets long, allow it to truncate or wrap gracefully */
    .grid > .bg-carmony-card .font-display,
    .grid > .bg-carmony-bg .font-display {
        word-break: keep-all;
        overflow-wrap: anywhere;
    }
}

/* ----- P23: Generic — always-on-line micro-pills ----- */
[class*="text-[10px]"][class*="rounded-full"],
[class*="text-[11px]"][class*="rounded-full"],
[class*="text-xs"][class*="rounded-full"]:not(.w-full) {
    white-space: nowrap;
}
