/* ============================================================================
   DECIDAUTO — POLISH CSS (ultimate refinements 2026-04-07)
   ============================================================================
   Charge APRES decidauto-theme.css. Apporte les raffinements ultimes :
     - multi-layer shadows realistes (depth + relief)
     - effets 3D subtils (perspective + transform)
     - glassmorphism avance (3 variantes)
     - micro-interactions (magnetic hover, tilt, glow)
     - polish typographique (tabular nums, optical sizing, balance)
     - states ultra-fins (hover, active, focus, disabled)
     - badges premium (gradient + inner glow)
     - dividers gradient
     - empty states premium
   ============================================================================ */


/* ============================================================================
   1. MULTI-LAYER SHADOWS (depth realiste, 3-5 layers)
   ============================================================================
   Inspires par les ombres de Material Design 3 et iOS, mais avec teintes forest.
   Plus la valeur monte, plus l'objet "flotte" haut.
*/

.shadow-depth-1 {
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 2px 6px rgba(6, 31, 37, 0.04);
}

.shadow-depth-2 {
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 4px 8px rgba(6, 31, 37, 0.06),
        0 8px 16px rgba(6, 31, 37, 0.04);
}

.shadow-depth-3 {
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 4px 8px rgba(6, 31, 37, 0.06),
        0 12px 24px rgba(6, 31, 37, 0.08),
        0 16px 32px rgba(6, 31, 37, 0.04);
}

.shadow-depth-4 {
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 4px 8px rgba(6, 31, 37, 0.06),
        0 16px 32px rgba(6, 31, 37, 0.10),
        0 24px 48px rgba(6, 31, 37, 0.06),
        0 32px 64px rgba(6, 31, 37, 0.04);
}

.shadow-depth-5 {
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 4px 8px rgba(6, 31, 37, 0.06),
        0 16px 32px rgba(6, 31, 37, 0.10),
        0 32px 64px rgba(6, 31, 37, 0.12),
        0 48px 96px rgba(6, 31, 37, 0.06);
}

/* Inner shadows pour effet "enfonce" / relief */
.shadow-inset-soft {
    box-shadow: inset 0 2px 4px rgba(6, 31, 37, 0.06);
}

.shadow-inset-medium {
    box-shadow:
        inset 0 2px 4px rgba(6, 31, 37, 0.08),
        inset 0 1px 2px rgba(6, 31, 37, 0.04);
}

.shadow-inset-deep {
    box-shadow:
        inset 0 4px 8px rgba(6, 31, 37, 0.10),
        inset 0 2px 4px rgba(6, 31, 37, 0.06);
}

/* Combinaison outer + inner highlight pour relief premium */
.shadow-relief {
    box-shadow:
        0 2px 4px rgba(6, 31, 37, 0.04),
        0 8px 16px rgba(6, 31, 37, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(6, 31, 37, 0.03);
}

.shadow-relief-lg {
    box-shadow:
        0 4px 8px rgba(6, 31, 37, 0.06),
        0 16px 32px rgba(6, 31, 37, 0.08),
        0 32px 64px rgba(6, 31, 37, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 0 rgba(6, 31, 37, 0.04);
}

/* Colored shadows (emerald glow naturel) */
.shadow-emerald-sm {
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.18),
        0 1px 3px rgba(16, 185, 129, 0.10);
}

.shadow-emerald-md {
    box-shadow:
        0 8px 20px rgba(16, 185, 129, 0.25),
        0 4px 8px rgba(16, 185, 129, 0.15),
        0 1px 3px rgba(16, 185, 129, 0.08);
}

.shadow-emerald-lg {
    box-shadow:
        0 16px 40px rgba(16, 185, 129, 0.32),
        0 8px 16px rgba(16, 185, 129, 0.18),
        0 4px 8px rgba(16, 185, 129, 0.10);
}

.shadow-emerald-glow {
    box-shadow:
        0 0 0 1px rgba(16, 185, 129, 0.20),
        0 4px 16px rgba(16, 185, 129, 0.30),
        0 16px 48px rgba(16, 185, 129, 0.20),
        0 0 80px rgba(16, 185, 129, 0.15);
}


/* ============================================================================
   2. PREMIUM CARD (vehicule, feature, etc.)
   ============================================================================ */

.card-premium {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 4px 12px rgba(6, 31, 37, 0.06),
        0 16px 32px rgba(6, 31, 37, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(229, 226, 216, 0.6);
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    isolation: isolate;
    will-change: transform;
}

.card-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-premium > * {
    position: relative;
    z-index: 1;
}

.card-premium:hover {
    transform: translateY(-8px);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow:
        0 4px 8px rgba(6, 31, 37, 0.04),
        0 16px 32px rgba(6, 31, 37, 0.10),
        0 32px 64px rgba(6, 31, 37, 0.10),
        0 48px 96px rgba(16, 185, 129, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.card-premium:hover::before {
    opacity: 0.8;
}

/* Variant : top rank (gradient border + glow) */
.card-premium-top {
    box-shadow:
        0 0 0 2px rgba(16, 185, 129, 0.40),
        0 4px 12px rgba(6, 31, 37, 0.06),
        0 16px 40px rgba(16, 185, 129, 0.18),
        0 32px 80px rgba(16, 185, 129, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.card-premium-top::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #10B981 0%, #34D399 50%, #10B981 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}


/* ============================================================================
   3. GLASSMORPHISM AVANCE (3 variantes)
   ============================================================================ */

.glass-frost {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.50);
    box-shadow:
        0 8px 32px rgba(6, 31, 37, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.80),
        inset 0 -1px 0 rgba(6, 31, 37, 0.04);
}

.glass-frost-dark {
    background: rgba(15, 58, 66, 0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 16px 48px rgba(6, 31, 37, 0.40),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(0, 0, 0, 0.20);
}

.glass-emerald {
    background: rgba(16, 185, 129, 0.10);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow:
        0 8px 24px rgba(16, 185, 129, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}


/* ============================================================================
   4. INPUTS PREMIUM (relief + focus glow)
   ============================================================================ */

.input-premium {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink-900);
    background: #ffffff;
    border: 1.5px solid var(--bone-200);
    border-radius: 12px;
    box-shadow:
        inset 0 2px 4px rgba(6, 31, 37, 0.03),
        0 1px 2px rgba(6, 31, 37, 0.02);
    transition:
        border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-premium::placeholder {
    color: var(--ink-400);
    font-weight: 400;
}

.input-premium:hover {
    border-color: var(--bone-100);
    background: #FCFCFB;
}

.input-premium:focus {
    outline: none;
    border-color: var(--emerald-500);
    background: #ffffff;
    box-shadow:
        inset 0 2px 4px rgba(6, 31, 37, 0.02),
        0 0 0 4px rgba(16, 185, 129, 0.12),
        0 4px 12px rgba(16, 185, 129, 0.10);
}

.input-premium:disabled {
    background: var(--bone-50);
    color: var(--ink-400);
    cursor: not-allowed;
    box-shadow: none;
}

/* Variante dark */
.input-premium-dark {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition:
        border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-premium-dark::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
}

.input-premium-dark:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.input-premium-dark:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(52, 211, 153, 0.60);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        0 0 0 4px rgba(52, 211, 153, 0.20),
        0 8px 24px rgba(16, 185, 129, 0.20);
}


/* ============================================================================
   5. BADGES PREMIUM (gradient + inner glow)
   ============================================================================ */

.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
}

.badge-emerald {
    color: #047857;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow:
        0 1px 2px rgba(16, 185, 129, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.80);
}

.badge-emerald-solid {
    color: #ffffff;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: 1px solid rgba(16, 185, 129, 0.40);
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.30),
        0 1px 3px rgba(16, 185, 129, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.30);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.10);
}

.badge-forest {
    color: #ffffff;
    background: linear-gradient(135deg, #134754 0%, #061F25 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 4px 12px rgba(6, 31, 37, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.badge-amber {
    color: #92400E;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 1px solid rgba(245, 158, 11, 0.30);
    box-shadow:
        0 1px 2px rgba(245, 158, 11, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.80);
}

.badge-rose {
    color: #9F1239;
    background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%);
    border: 1px solid rgba(244, 63, 94, 0.25);
    box-shadow:
        0 1px 2px rgba(244, 63, 94, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.80);
}


/* ============================================================================
   6. NUMBERS — tabular nums + gradient text
   ============================================================================ */

.tabular-nums {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.numeric-display {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1, 'cv11' 1;
    letter-spacing: -0.02em;
}

.numeric-emerald {
    background: linear-gradient(135deg, #10B981 0%, #047857 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.numeric-forest {
    background: linear-gradient(135deg, #134754 0%, #061F25 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
}


/* ============================================================================
   7. DIVIDERS PREMIUM (gradient fades)
   ============================================================================ */

.divider-fade {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(6, 31, 37, 0.12) 50%,
        transparent 100%
    );
    border: none;
}

.divider-fade-dark {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 100%
    );
    border: none;
}

.divider-fade-emerald {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(16, 185, 129, 0.40) 50%,
        transparent 100%
    );
    border: none;
}

.divider-vertical-fade {
    width: 1px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(6, 31, 37, 0.12) 50%,
        transparent 100%
    );
}


/* ============================================================================
   8. BUTTONS PREMIUM (states ultra-fins)
   ============================================================================ */

.btn-emerald-deluxe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: 1px solid rgba(16, 185, 129, 0.50);
    border-radius: 14px;
    cursor: pointer;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.10);
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.06),
        0 8px 24px rgba(16, 185, 129, 0.32),
        0 4px 8px rgba(16, 185, 129, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.30),
        inset 0 -1px 0 rgba(0, 0, 0, 0.10);
    transition:
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-emerald-deluxe::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.30) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}

.btn-emerald-deluxe > * {
    position: relative;
    z-index: 2;
}

.btn-emerald-deluxe:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.06),
        0 16px 40px rgba(16, 185, 129, 0.42),
        0 8px 16px rgba(16, 185, 129, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.40),
        inset 0 -1px 0 rgba(0, 0, 0, 0.10);
}

.btn-emerald-deluxe:hover::before {
    transform: translateX(100%);
}

.btn-emerald-deluxe:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.06),
        0 8px 16px rgba(16, 185, 129, 0.30),
        0 4px 8px rgba(16, 185, 129, 0.20),
        inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-emerald-deluxe:disabled,
.btn-emerald-deluxe[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 1px 2px rgba(6, 31, 37, 0.06);
}

/* Ghost button (transparent forest) */
.btn-ghost-forest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--forest-700);
    background: rgba(15, 58, 66, 0.04);
    border: 1.5px solid rgba(15, 58, 66, 0.12);
    border-radius: 14px;
    cursor: pointer;
    transition:
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-ghost-forest:hover {
    transform: translateY(-1px);
    background: rgba(15, 58, 66, 0.08);
    border-color: rgba(15, 58, 66, 0.20);
    color: var(--forest-900);
    box-shadow: 0 4px 12px rgba(6, 31, 37, 0.06);
}

.btn-ghost-forest:active {
    transform: translateY(0);
}


/* ============================================================================
   9. EMPTY STATE PREMIUM
   ============================================================================ */

.empty-state-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 24px;
    background: linear-gradient(180deg, #F8F7F2 0%, #ffffff 100%);
    border: 1.5px dashed rgba(6, 31, 37, 0.12);
}

.empty-state-premium .icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-radius: 24px;
    box-shadow:
        0 8px 24px rgba(16, 185, 129, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.empty-state-premium h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--forest-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.empty-state-premium p {
    font-size: 0.9375rem;
    color: var(--ink-500);
    max-width: 28rem;
    line-height: 1.6;
    text-wrap: pretty;
}


/* ============================================================================
   10. MAGNETIC HOVER (suit la souris)
   ============================================================================
   Necessite JS leger : data-magnetic="" sur l'element
*/
.magnetic {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}


/* ============================================================================
   11. TILT 3D (perspective hover)
   ============================================================================ */

.tilt-3d {
    transform-style: preserve-3d;
    perspective: 1200px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tilt-3d:hover {
    transform: perspective(1200px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
}


/* ============================================================================
   12. SECTION DIVIDER (wave / curve)
   ============================================================================ */

.section-divider-wave {
    position: relative;
    height: 80px;
    overflow: hidden;
}

.section-divider-wave::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 50% 60%, 0 0);
}


/* ============================================================================
   13. PROGRESS BAR PREMIUM (gradient + glow)
   ============================================================================ */

.progress-premium {
    position: relative;
    height: 8px;
    background: var(--bone-100);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(6, 31, 37, 0.06);
}

.progress-premium > .bar {
    height: 100%;
    background: linear-gradient(90deg, #34D399 0%, #10B981 50%, #059669 100%);
    border-radius: 999px;
    box-shadow:
        0 0 12px rgba(16, 185, 129, 0.50),
        inset 0 1px 0 rgba(255, 255, 255, 0.30);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.progress-premium > .bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.40) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: progressShimmer 2s linear infinite;
}

@keyframes progressShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}


/* ============================================================================
   14. PILL TABS PREMIUM
   ============================================================================ */

.pill-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem;
    background: var(--bone-100);
    border-radius: 14px;
    box-shadow: inset 0 2px 4px rgba(6, 31, 37, 0.04);
}

.pill-tabs > button {
    padding: 0.5rem 1.125rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ink-500);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition:
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-tabs > button:hover {
    color: var(--ink-900);
    background: rgba(255, 255, 255, 0.50);
}

.pill-tabs > button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.30),
        0 1px 2px rgba(16, 185, 129, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}


/* ============================================================================
   15. KBD (clavier shortcut display)
   ============================================================================ */

kbd, .kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    padding: 0.125rem 0.5rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--forest-900);
    background: linear-gradient(180deg, #ffffff 0%, #F8F7F2 100%);
    border: 1px solid var(--bone-200);
    border-radius: 6px;
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.06),
        inset 0 -1px 0 rgba(6, 31, 37, 0.08),
        inset 0 1px 0 #ffffff;
}


/* ============================================================================
   16. NUMBER COUNT-UP (CSS only, via tabular-nums)
   ============================================================================ */

.count-up {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
}


/* ============================================================================
   17. SCROLLBAR PREMIUM (horizontal carousels)
   ============================================================================ */

.scrollbar-premium::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.scrollbar-premium::-webkit-scrollbar-track {
    background: rgba(6, 31, 37, 0.04);
    border-radius: 999px;
}

.scrollbar-premium::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.40);
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.30);
}

.scrollbar-premium::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #059669 0%, #10B981 100%);
}


/* ============================================================================
   18. UTILITIES — typo polish
   ============================================================================ */

.tracking-tightest { letter-spacing: -0.04em; }
.tracking-display  { letter-spacing: -0.025em; }
.leading-tightest  { line-height: 0.9; }

.font-display-balance {
    text-wrap: balance;
    letter-spacing: -0.02em;
    line-height: 0.95;
}

/* Optical sizing pour Inter */
@supports (font-optical-sizing: auto) {
    .text-optical {
        font-optical-sizing: auto;
    }
}


/* ============================================================================
   19. SCROLL SNAP UTILITIES
   ============================================================================ */

.snap-x-mandatory {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.snap-center {
    scroll-snap-align: center;
}

.snap-start {
    scroll-snap-align: start;
}


/* ============================================================================
   20. FOCUS RING PREMIUM (override pour bouton emerald)
   ============================================================================ */

.btn-emerald-deluxe:focus-visible,
.btn-ghost-forest:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px #ffffff,
        0 0 0 6px rgba(16, 185, 129, 0.45),
        0 8px 24px rgba(16, 185, 129, 0.32);
}


/* ============================================================================
   21. CARD VEHICULE — Polish specifique results.php
   ============================================================================ */

.veh-card {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(229, 226, 216, 0.7);
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 4px 12px rgba(6, 31, 37, 0.05),
        0 16px 32px rgba(6, 31, 37, 0.04);
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    isolation: isolate;
}

.veh-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.30);
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 8px 16px rgba(6, 31, 37, 0.06),
        0 24px 48px rgba(6, 31, 37, 0.08),
        0 48px 96px rgba(16, 185, 129, 0.12);
}

.veh-card .veh-img {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #F8F7F2 0%, #EFEDE5 100%);
}

.veh-card .veh-img img {
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.veh-card:hover .veh-img img {
    transform: scale(1.06);
}

/* Top rank highlight */
.veh-card.is-top {
    border-color: rgba(16, 185, 129, 0.50);
    box-shadow:
        0 0 0 1px rgba(16, 185, 129, 0.40),
        0 4px 12px rgba(6, 31, 37, 0.06),
        0 16px 40px rgba(16, 185, 129, 0.18),
        0 32px 80px rgba(16, 185, 129, 0.10);
}

.veh-card.is-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10B981 0%, #34D399 50%, #10B981 100%);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.50);
    z-index: 1;
}


/* ============================================================================
   22. RANK BADGE PREMIUM (numero de classement)
   ============================================================================ */

.rank-badge-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 1.125rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.20);
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.10),
        0 8px 24px rgba(16, 185, 129, 0.40),
        0 4px 8px rgba(16, 185, 129, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.40),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}

.rank-badge-premium.is-1 {
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.10),
        0 8px 24px rgba(245, 158, 11, 0.50),
        0 4px 8px rgba(245, 158, 11, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.50),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}

.rank-badge-premium.is-2 {
    background: linear-gradient(135deg, #E5E7EB 0%, #9CA3AF 100%);
    color: #1F2937;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.30);
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.10),
        0 8px 24px rgba(156, 163, 175, 0.40),
        0 4px 8px rgba(156, 163, 175, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.60),
        inset 0 -2px 4px rgba(0, 0, 0, 0.10);
}

.rank-badge-premium.is-3 {
    background: linear-gradient(135deg, #FCA5A5 0%, #C2410C 100%);
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.10),
        0 8px 24px rgba(194, 65, 12, 0.40),
        0 4px 8px rgba(194, 65, 12, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.40),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}


/* ============================================================================
   23. PRICE DISPLAY PREMIUM
   ============================================================================ */

.price-display {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.price-display .price-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--forest-900);
    letter-spacing: -0.025em;
    line-height: 1;
}

.price-display .price-currency {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--forest-700);
    letter-spacing: -0.01em;
}

.price-display .price-period {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.25rem;
}


/* ============================================================================
   24. ICON BACKDROP (icone avec fond circulaire premium)
   ============================================================================ */

.icon-backdrop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    color: var(--emerald-600);
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.80);
}

.icon-backdrop-lg {
    width: 56px;
    height: 56px;
    border-radius: 16px;
}

.icon-backdrop-forest {
    background: linear-gradient(135deg, #134754 0%, #061F25 100%);
    color: #6EE7B7;
    box-shadow:
        0 4px 12px rgba(6, 31, 37, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}


/* ============================================================================
   25. RESPONSIVE — mobile polish
   ============================================================================ */

@media (max-width: 640px) {
    .veh-card {
        border-radius: 20px;
    }

    .card-premium {
        border-radius: 18px;
    }

    .btn-emerald-deluxe,
    .btn-ghost-forest {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
}


/* ============================================================================
   26. TOUCH DEVICE — disable hover effects on touch
   ============================================================================ */

@media (hover: none) {
    .card-premium:hover,
    .veh-card:hover {
        transform: none;
    }

    .btn-emerald-deluxe:hover,
    .btn-ghost-forest:hover {
        transform: none;
    }
}


/* ============================================================================
   27. REDUCED MOTION (override polish)
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .progress-premium > .bar::after,
    .btn-emerald-deluxe::before {
        animation: none !important;
    }

    .veh-card,
    .card-premium {
        transition: none !important;
    }
}


/* ============================================================================
   28. AUTO-UPGRADE — surcharge des classes existantes du site
   ============================================================================
   Cette section ameliore AUTOMATIQUEMENT les composants existants sans
   necessiter de modification des fichiers .php des views.
*/

/* ----- Toutes les cards vehicule (results.php) -----
   On remplace les shadows existantes par les nouvelles multi-layer + hover lift premium */
.vehicle-card {
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform;
    isolation: isolate;
}

.vehicle-card:not(.card-rank-1) {
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 4px 12px rgba(6, 31, 37, 0.05),
        0 16px 32px rgba(6, 31, 37, 0.04) !important;
}

.vehicle-card:not(.card-rank-1):hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.30) !important;
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.04),
        0 8px 16px rgba(6, 31, 37, 0.06),
        0 24px 48px rgba(6, 31, 37, 0.08),
        0 48px 96px rgba(16, 185, 129, 0.10) !important;
}

/* Top rank glow + bar superieure */
.card-rank-1 {
    position: relative;
    box-shadow:
        0 0 0 1.5px rgba(16, 185, 129, 0.45),
        0 4px 12px rgba(6, 31, 37, 0.06),
        0 16px 40px rgba(16, 185, 129, 0.18),
        0 32px 80px rgba(16, 185, 129, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

.card-rank-1:hover {
    transform: translateY(-8px);
    box-shadow:
        0 0 0 2px rgba(16, 185, 129, 0.60),
        0 8px 16px rgba(6, 31, 37, 0.06),
        0 24px 56px rgba(16, 185, 129, 0.28),
        0 48px 96px rgba(16, 185, 129, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

/* Bar gradient au-dessus du rank 1 */
.card-rank-1::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10B981 0%, #34D399 50%, #10B981 100%);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.50);
    z-index: 5;
    border-radius: inherit inherit 0 0;
}

/* ----- Buttons CTA existants -----
   Surcharge .btn-cta-fr et .cta-gradient avec un effet shimmer + relief */
.btn-cta-fr {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.06),
        0 8px 24px rgba(16, 185, 129, 0.32),
        0 4px 8px rgba(16, 185, 129, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.30),
        inset 0 -1px 0 rgba(0, 0, 0, 0.10) !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.10);
}

.btn-cta-fr::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}

.btn-cta-fr:hover::before {
    transform: translateX(100%);
}

.btn-cta-fr:hover {
    box-shadow:
        0 1px 2px rgba(6, 31, 37, 0.06),
        0 16px 40px rgba(16, 185, 129, 0.42),
        0 8px 16px rgba(16, 185, 129, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.40),
        inset 0 -1px 0 rgba(0, 0, 0, 0.10) !important;
}

/* ----- Tabular nums sur tous les prix/montants -----
   Cible toutes les classes de prix pour alignement parfait des chiffres */
.text-emerald-600,
.text-emerald-500,
.text-emerald-700,
[class*="font-black"][class*="text-"],
[class*="font-bold"][class*="text-"] {
    font-feature-settings: 'tnum' 1, 'lnum' 1;
}

/* Force tabular nums sur toutes les valeurs euro */
.font-display,
[class*="text-2xl"],
[class*="text-3xl"],
[class*="text-4xl"],
[class*="text-5xl"],
[class*="text-6xl"],
[class*="text-7xl"] {
    font-feature-settings: 'tnum' 1, 'lnum' 1, 'cv11' 1;
}

/* ----- Inputs du formulaire mini-modif (hero pill) -----
   Effet enfonce avec inner shadow */
input[type="number"][name="fonds_disponibles"],
input[type="number"][name="budget_mensuel"] {
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

input[type="number"][name="fonds_disponibles"]:focus,
input[type="number"][name="budget_mensuel"]:focus {
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        0 0 0 4px rgba(52, 211, 153, 0.20),
        0 8px 24px rgba(16, 185, 129, 0.20) !important;
}

/* ----- Hero pill (criteria pills, status pills) -----
   Effet de profondeur subtil */
.hero-pill {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
    transition:
        background 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-pill:hover {
    transform: translateY(-1px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 12px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* ----- Filter checkboxes (sidebar filtres results) -----
   Better depth and inner glow */
.filter-checkbox {
    box-shadow:
        inset 0 2px 4px rgba(6, 31, 37, 0.04),
        0 1px 2px rgba(6, 31, 37, 0.03) !important;
}

.filter-checkbox:checked {
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.30),
        0 1px 3px rgba(16, 185, 129, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.30),
        inset 0 -1px 0 rgba(0, 0, 0, 0.10) !important;
}

/* ----- Stat rings dans hero home -----
   Subtle glow animation */
.stat-ring circle:last-child {
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.40));
}

/* ----- Card form (formulaire principal home) -----
   Multi-layer shadow + better border */
.card-form-gradient,
#search-card {
    box-shadow:
        0 4px 12px rgba(6, 31, 37, 0.20),
        0 16px 40px rgba(6, 31, 37, 0.30),
        0 32px 80px rgba(6, 31, 37, 0.40),
        0 64px 128px rgba(6, 31, 37, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(0, 0, 0, 0.20) !important;
}

/* ----- Stepper circles -----
   Better depth on active step */
.stepper-connector {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.30);
}

/* ----- Body smooth font rendering -----
   Premium font features partout */
body {
    font-feature-settings: 'cv02' 1, 'cv11' 1, 'ss01' 1, 'ss03' 1, 'kern' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ----- Headings tracking polish -----
   Negative tracking sur gros titres pour densite optique */
h1, .text-6xl, .text-7xl, .text-8xl {
    letter-spacing: -0.025em !important;
    text-wrap: balance;
}

h2, .text-4xl, .text-5xl {
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h3, .text-2xl, .text-3xl {
    letter-spacing: -0.015em;
}

/* ----- Smooth scroll behavior global -----
   Override pour animations meilleures */
html {
    scroll-padding-top: 100px;
    scroll-behavior: smooth;
}

/* ----- Selection -----
   Refined selection color */
::selection {
    background-color: rgba(16, 185, 129, 0.20);
    color: #061F25;
    text-shadow: none;
}

/* ----- Anchor focus -----
   Better link focus states */
a:focus-visible {
    outline: 2px solid #10B981;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ----- Image rendering -----
   Crisp images */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* ----- Backdrop blur fallback -----
   Pour les vieux navigateurs */
@supports not (backdrop-filter: blur(20px)) {
    .glass-frost,
    .glass-frost-dark,
    .hero-pill {
        background: rgba(255, 255, 255, 0.92) !important;
    }
}

/* ----- Sticky elements with backdrop -----
   Refined sticky elements */
.sidebar-sticky-fr {
    position: sticky;
    top: 7rem;
}

@media (min-width: 1024px) {
    .sidebar-sticky-fr {
        max-height: calc(100vh - 8rem);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

/* ----- Section transitions -----
   Smoother section appearances on scroll */
section {
    will-change: transform;
}

/* ----- Form elements -----
   Better consistency */
button,
input,
select,
textarea {
    font-family: inherit;
    font-feature-settings: inherit;
}

/* ----- Disabled states -----
   Premium disabled appearance */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ----- Loading states -----
   Cursor wait sur loading */
[aria-busy="true"] {
    cursor: progress;
    position: relative;
    pointer-events: none;
}

[aria-busy="true"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(2px);
    z-index: 99;
}


/* ============================================================================
   29. PARALLAX ORBS (subtle motion sur scroll)
   ============================================================================ */

.orb-emerald,
.orb-emerald-lg {
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    body:hover .orb-emerald {
        transform: translate(8px, -4px);
    }
    body:hover .orb-emerald-lg {
        transform: translate(-12px, 6px);
    }
}


/* ============================================================================
   30. PRINT POLISH (override)
   ============================================================================ */

@media print {
    .veh-card,
    .card-premium,
    .vehicle-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .btn-emerald-deluxe,
    .btn-cta-fr,
    .cta-gradient {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}
