:root {

    --color-bg: transparent;

    --color-surface: rgba(255, 255, 255, 0.6);


    --color-primary: #1f4b57;

    --color-text: #1a1917;

    --color-border: rgba(31, 77, 90, 0.15);

    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-blur: blur(18px);
    --color-transport: #3B82F6;

    --color-brand: #2c6268;

    --color-brand-dark: #1f4b57;

    --color-brand-light: #6b808a;

    --color-accent: #d45b4c;



    --color-success-bg: rgba(44, 98, 104, 0.1);
    --color-success-text: #1f4b57;
    --color-error: #d45b4c;


    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --history-collapsed-height: 56px;


    --shadow-sm:
        0 2px 4px rgba(25, 45, 55, 0.02),
        0 8px 16px rgba(25, 45, 55, 0.04);

    --shadow-md:
        0 10px 40px -10px rgba(31, 77, 90, 0.08),
        0 4px 12px -4px rgba(31, 77, 90, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);

    --shadow-lg:
        0 24px 60px -12px rgba(31, 77, 90, 0.14),
        0 8px 24px -4px rgba(31, 77, 90, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    --shadow-float: 0 40px 80px -20px rgba(0, 0, 0, 0.1);


    --font-heading: 'Sora', sans-serif;
    --font-main: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}


.sub-product-flex {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-top: 16px;
    flex-wrap: wrap;

}

.sub-product-flex>div:first-child {
    flex: 1;
    min-width: 250px;

}

.preview-box {
    width: 200px;

    flex-shrink: 0;
    text-align: center;
    background: #fff;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.preview-box.visible {
    opacity: 1;
    transform: translateY(0);
}

.preview-image-wrapper {
    width: 100%;
    aspect-ratio: 4/3;

    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    background: #F8FAFC;
    border-radius: var(--radius-md);
}

.preview-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-text {
    display: block;
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 500;
}

.subproduct-empty {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.04);
    color: var(--color-text);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 600px) {
    .sub-product-flex {
        flex-direction: column;
        align-items: stretch;
    }

    .preview-box {
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
    }
}

@media (max-width: 520px) {
    .hero-section {
        padding: 40px 16px;
    }

    .hero-content h1 {
        font-size: 2.1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .container {
        padding: 0 12px calc(48px + var(--history-collapsed-height) + env(safe-area-inset-bottom));

    }

    .formulaire {
        padding: 24px 16px;

        border-radius: 20px;
        width: 100%;
    }

    form select,
    form input {
        margin-bottom: 16px;
    }

    .result {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .result-value-big {
        font-size: 3rem;
    }

    .result-product-image {
        width: 72px;
        height: 72px;
    }

    .action-buttons-group {
        flex-direction: column;
    }

    .fullscreen-toggle {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .wizard-progress-container {
        padding: 0 8px;

    }

    .step-indicator {
        min-width: 60px;

    }

    .step-label {
        font-size: 0.75rem;

    }
}


.form-select-styled {
    width: 100%;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    background-image: radial-gradient(circle at top right, #FFFFFF, transparent), radial-gradient(circle at bottom left, #E2E8F0, transparent);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}


::selection {
    background: rgba(16, 185, 129, 0.2);

    color: #047857;
}

/* UTILITIES */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

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

.text-muted {
    color: #64748B;
}

[data-theme='dark'] .text-muted {
    color: #94A3B8;
}

.text-sm {
    font-size: 0.85rem;
}

.no-underline {
    text-decoration: none;
}

.mb-0 {
    margin-bottom: 0;
}

.flex {
    display: flex;
}

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

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.gap-24 {
    gap: 24px;
}

.gap-32 {
    gap: 32px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-32 {
    margin-top: 32px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-32 {
    margin-bottom: 32px;
}

.mb-48 {
    margin-bottom: 48px;
}

.p-0 {
    padding: 0;
}

.border-0 {
    border: 0;
}

.max-w-300 {
    max-width: 300px;
}

.min-w-160 {
    min-width: 160px;
}

.max-w-800 {
    max-width: 800px;
}

.w-full {
    width: 100%;
}

.list-disc {
    margin-left: 20px;
    list-style-type: disc;
}

.is-hidden {
    display: none !important;
}

.emoji-lg {
    font-size: 2.5rem;
}

.emoji-md {
    font-size: 2rem;
}




.navbar {
    background: rgba(255, 255, 255, 0.7);

    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0 32px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);

    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.brand-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 40px;
}

.brand-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-primary);
}

.brand-title span {
    font-weight: 400;
    color: var(--color-brand);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar img {
    height: 48px;
    object-fit: contain;
}

.navbar h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}


.hero-section {
    text-align: center;
    padding: 80px 24px 64px;
    background-color: #ffffff;
    background-image: radial-gradient(#E2E8F0 1px, transparent 1px), radial-gradient(#E2E8F0 1px, #ffffff 1px);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;

    background-image:
        radial-gradient(circle at 10% 20%, rgba(226, 232, 240, 0.5) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 20%),
        linear-gradient(#f1f5f9 1px, transparent 1px),
        linear-gradient(90deg, #f1f5f9 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    background-position: 0 0, 0 0, -1px -1px, -1px -1px;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--color-bg), transparent);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 16px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-content .highlight {
    color: var(--color-brand);
    position: relative;
    display: inline-block;

    text-shadow: 0 0 30px rgba(16, 185, 129, 0.2);

}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748B;
    max-width: 640px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}


.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}


.formulaire {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    width: 100%;
    max-width: 650px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result--wide {
    text-align: left;
    max-width: 800px;
}

.formulaire::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--color-brand), #10B981);
    opacity: 0.85;
    pointer-events: none;
}

.formulaire:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}

.formulaire:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
    border-color: rgba(16, 185, 129, 0.35);
}

.formulaire h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 32px;
    font-weight: 700;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    letter-spacing: -0.02em;
}


form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.product-type-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--color-border);
}

.product-type-header label {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--color-brand-dark);

}

.product-type-image {
    height: 56px;

    width: auto;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    padding: 3px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.product-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.type-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    width: 100%;
    min-width: 0;
    margin-top: 0;
    height: auto;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    color: inherit;
    font: inherit;
    appearance: none;
    text-shadow: none;
}

.type-card.is-static {
    cursor: default;
    transform: none;
    box-shadow: var(--shadow-sm);
}

.type-card.is-static:hover {
    transform: none;
    background: white;
    box-shadow: var(--shadow-sm);
    border-color: var(--color-border);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
    text-align: center;
}

@media (max-width: 900px) {
    .process-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}


.type-card:active {
    transform: scale(0.96);
    background: #f1f5f9;
}

.type-card:hover {
    transform: translateY(-8px);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: var(--shadow-md);
    border-color: var(--color-brand-light);
}

.type-card:active {
    background: #f1f5f9;
    box-shadow: var(--shadow-sm);
}

.type-card:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
    box-shadow: var(--shadow-md);
}

.type-card.selected {
    border: 2px solid var(--color-brand);
    background: var(--color-success-bg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.type-card.selected:hover {
    background: var(--color-success-bg);
}

.type-card img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;

    border: 1px solid #F1F5F9;
    padding: 2px;
    background: white;
}

.type-card span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.2;
}

@media (max-width: 600px) {
    .product-type-grid {
        grid-template-columns: repeat(2, 1fr);

        gap: 12px;
    }
}

@media (max-width: 520px) {
    .product-type-grid {
        grid-template-columns: 1fr;
        gap: 16px;

    }


    .type-card {
        padding: 20px;
        flex-direction: row;

        text-align: left;
        align-items: center;
    }

    .type-card img {
        width: 48px;
        height: 48px;
        margin-right: 12px;
    }

    .type-card span {
        font-size: 1rem;
    }

    .type-card {
        padding: 14px;
    }

    .type-card img {
        width: 56px;
        height: 56px;
    }
}


#optiontypedeproduit:empty {
    display: none;
}

#optiontypedeproduit:not(:empty) {
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
}

form>div {
    margin-bottom: 24px;
}

form select,
form input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--color-primary);
    font-family: var(--font-main);
    transition: all 0.3s ease;
    margin-bottom: 24px;
    height: 48px;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310B981'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 0px;

}

form select:hover,
form input:hover {
    border-color: #CBD5E1;

}

form select:focus,
form input:focus {
    outline: none;
    border-color: var(--color-brand);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(31, 77, 90, 0.1);

}

form input:valid:not(:placeholder-shown),
form select:valid {
    border-color: rgba(16, 185, 129, 0.65);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
    background-color: rgba(255, 255, 255, 0.9);
}

form input:valid:not(:placeholder-shown) {
    background-size: 18px;
    background-position: right 12px center;
}

form select:valid {
    background-size: 18px, 16px;
    background-position: right 40px center, right 16px center;
}


form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310B981'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23059669'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: right 40px center, right 16px center;
    background-size: 0px, 16px;

}


button,
.btn-primary {
    width: 100%;
    flex: 1;
    min-width: 140px;
    padding: 14px 24px;
    margin-top: 12px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #2a6a78 100%);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-heading);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    height: 52px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    text-decoration: none;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.35) 45%, transparent 70%);
    opacity: 0;
    transform: translateX(-120%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), 0 10px 18px rgba(0, 0, 0, 0.12);
}

button:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #475569, #1E293B);

    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.2),
        0 4px 6px -2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(5, 150, 105, 0.3);

    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:hover::after {
    opacity: 0.9;
    transform: translateX(120%);
}

button:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}


.btn-secondary {
    background: #F1F5F9;

    color: #475569;
    font-weight: 600;
    border: 1px solid transparent;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-shadow: none;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    flex: 1;
    min-width: 140px;
}

.btn-secondary:hover {
    background: #E2E8F0;

    color: #1E293B;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.btn-secondary:active {
    transform: translateY(0);
    background: #CBD5E1;
}


.action-buttons-group {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}


.result {
    width: 100%;
    margin: 32px auto;
    max-width: 650px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    padding: 48px;
    border-radius: var(--radius-xl);
    font-size: 1.15rem;
    text-align: center;
    line-height: 1.6;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}


.result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--color-brand), #10B981);
}

.result span {
    display: inline-block;
}

.boldGreen {
    font-weight: 700;
    color: #064E3B;

}


.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 360px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--color-border);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.05);
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1100;
    padding: 88px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-collapsed {
    transform: translateX(360px);
}

.sidebar h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-primary);
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-bg);
    letter-spacing: -0.01em;
}


.sidebar-toggle {
    position: absolute;
    left: -60px;

    top: 180px;
    width: 48px;
    height: 48px;
    background: var(--color-surface);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-brand);
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    z-index: 1150;
    padding: 0;
    min-width: 0;
    margin-top: 0;
}

.sidebar-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    background: var(--color-brand);
    color: white;
    box-shadow: 0 8px 16px rgba(5, 150, 105, 0.25);
}

.sidebar-toggle:focus-visible,
.fullscreen-toggle:focus-visible,
.close-details:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}


.fullscreen-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-primary);
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    z-index: 1050;

    transition: all 0.3s ease;
    padding: 0;
    min-width: 0;
    margin-top: 0;
}

.fullscreen-toggle:hover {
    transform: scale(1.1);
    background: var(--color-brand);
    color: white;
    box-shadow: 0 8px 16px rgba(5, 150, 105, 0.25);
}


body.is-fullscreen {
    background: radial-gradient(circle at top right, #1E293B, #0F172A);

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

body.is-fullscreen .navbar,
body.is-fullscreen footer,
body.is-fullscreen .sidebar-toggle,
body.is-fullscreen .hero-section::after {
    display: none !important;
}

body.is-fullscreen .container {
    padding: 0;
    margin: 0;
    max-width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

}

body.is-fullscreen .formulaire,
body.is-fullscreen .result {
    margin: 0;
    max-height: 90vh;
    overflow-y: auto;

    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(1.02);

    backdrop-filter: blur(24px);
    background: rgba(255, 255, 255, 0.95);

    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);

}


body.is-fullscreen .formulaire::-webkit-scrollbar,
body.is-fullscreen .result::-webkit-scrollbar {
    width: 6px;
}

body.is-fullscreen .fullscreen-toggle {
    top: 32px;
    right: 32px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

body.is-fullscreen .fullscreen-toggle:hover {
    background: var(--color-brand);
    border-color: var(--color-brand);
}

body.is-fullscreen .hero-section {
    padding: 20px;
    margin: 0;
    background: none;
    position: absolute;
    top: 20px;
    left: 40px;
    text-align: left;
    z-index: 10;
}

body.is-fullscreen .hero-content h1 {
    font-size: 1.5rem;
    color: #94A3B8;
    text-shadow: none;
    margin-bottom: 0;
}

body.is-fullscreen .hero-content .highlight {
    color: #F8FAFC;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

body.is-fullscreen .hero-subtitle,
body.is-fullscreen .hero-content div:first-child {
    display: none;
}

.fullscreen-toggle:hover {
    transform: scale(1.1);
    background: var(--color-brand);
    color: white;
    box-shadow: 0 8px 16px rgba(5, 150, 105, 0.25);
}


body.is-fullscreen .fullscreen-toggle {

    background: rgba(255, 255, 255, 0.9);
}

.sidebar ul {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    padding-right: 6px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-gutter: stable;

}


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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94A3B8;
}

.sidebar ul li {
    padding: 14px 16px;
    border: 1px solid var(--color-border);

    border-radius: var(--radius-md);
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.75);
    transition: all 0.2s ease;
    position: relative;
    font-weight: 500;
}

.sidebar ul li:hover {
    background: #ffffff;
    color: var(--color-primary);
    border-color: var(--color-brand-light);
    box-shadow: var(--shadow-sm);
}

.sidebar ul li:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

.sidebar ul li.active {
    background: #ECFDF5;
    color: var(--color-brand-dark);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    border-color: rgba(16, 185, 129, 0.35);
    border-left: 3px solid var(--color-brand);
}



.detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1050;
}

.detail-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.detail-container {
    position: fixed;
    right: 420px;
    top: 100px;
    width: 340px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 32px;
    border-radius: 16px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.02);

    z-index: 1150;
    display: none;
    animation: fadeSlideLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.detail-container h3 {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 32px;

    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-bg);

    padding-right: 32px;

    font-weight: 700;
    letter-spacing: -0.01em;
}

.close-details {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 28px;
    height: 28px;
    background: #F1F5F9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    min-width: 0;
    margin-top: 0;
    border: none;
    box-shadow: none;
}

.close-details:hover {
    background: #FEE2E2;

    color: #EF4444;

    transform: rotate(90deg);
}


@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    border-color: var(--color-error) !important;
}




.wizard-progress-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 40px;
    position: relative;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
    position: relative;
    width: 90px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-heading);
    border: 2px solid #E2E8F0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94A3B8;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: var(--color-brand);
    color: white;
    box-shadow: 0 0 0 4px rgba(44, 98, 104, 0.2), 0 10px 15px -3px rgba(44, 98, 104, 0.3);
    border-color: var(--color-brand);
    transform: scale(1.1);
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 98, 104, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(44, 98, 104, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(44, 98, 104, 0);
    }
}

.step-indicator.active .step-number::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

.step-indicator.active .step-label {
    color: var(--color-brand-dark);
}

.step-indicator.completed .step-number {
    background: var(--color-brand-dark);
    color: white;
    border-color: var(--color-brand-dark);
}

.step-indicator.completed .step-number::after {
    content: '✓';
    font-size: 0.8rem;
}


.step-line {
    flex: 1;
    height: 3px;
    background: #E2E8F0;
    margin: 0 -10px;

    z-index: 1;
    margin-bottom: 20px;

    border-radius: 2px;
    transition: background 0.4s ease;
}

.step-line.active {
    background: var(--color-brand);
}


.step-section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.step-section.active {
    display: block;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-header {
    text-align: center;
    margin-bottom: 24px;
}

.step-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.step-header p {
    color: #64748B;
}

.text-brand-bold {
    color: var(--color-brand);
    font-weight: 700;
}

.step-section.active {
    display: block;
}

.detail-container p {
    font-size: 0.95rem;
    margin-bottom: 20px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #F1F5F9;

    padding-bottom: 12px;
}

.detail-container p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.version-badge {
    margin-bottom: 16px;
    display: inline-block;
    padding: 6px 16px;
    background: #ECFDF5;
    border-radius: 20px;
    color: var(--color-brand-dark);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid #A7F3D0;
}

.container-center {
    flex: 1;
    justify-content: center;
    min-height: 60vh;
}

.detail-container .label {
    color: #94A3B8;

    font-size: 0.75rem;

    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;

    flex-shrink: 0;
    margin-right: 24px;
    padding-top: 4px;
}

.detail-container .value {
    text-align: right;
    font-weight: 600;

    font-size: 1rem;
    color: var(--color-primary);
    flex: 1;
    word-break: break-word;
    line-height: 1.5;
}


@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
        height: 64px;
    }

.wizard-navigation {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
}

.divider {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: 32px 0;
}

        flex-wrap: wrap;
    }

    .hero-section {
        padding: 48px 20px;
    }

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .formulaire {
        padding: 24px 20px;
        margin-bottom: 80px;

    }


    .wizard-navigation {
        position: fixed;
        bottom: 0px;
        left: 0;
        width: 100%;
        background: white;
        padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
        z-index: 900;
        margin-top: 0 !important;
        border-top: 1px solid var(--color-border);
    }

    body.is-embedded .wizard-navigation {
        position: static;
        width: 100%;
        background: transparent;
        padding: 0;
        box-shadow: none;
        border-top: none;
    }

    .sidebar {
        width: 85%;

        padding-top: 80px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    }

    .sidebar-collapsed {
        transform: translateX(100%);
    }

    .sidebar-toggle {
        left: -48px;
    }

    .detail-container {
        left: 50%;
        right: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 92%;
        max-width: 360px;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        animation: none;

        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }
}

@media (min-width: 1100px) {
    body:not(.is-embedded) .hero-section {
        padding-right: calc(24px + 360px);
    }

    body:not(.is-embedded) .container {
        padding-right: calc(24px + 360px);
    }

    body:not(.is-embedded) .formulaire,
    body:not(.is-embedded) .result {
        max-width: 720px;
    }
}

@media (max-width: 700px) {
    .container {
        padding-bottom: calc(64px + var(--history-collapsed-height) + env(safe-area-inset-bottom));
    }

    .wizard-navigation {
        bottom: var(--history-collapsed-height);
        padding-bottom: 16px;
    }

    .sidebar {
        width: 100%;
        height: 70vh;
        max-height: 560px;
        min-height: 220px;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        border-left: none;
        border-top: 1px solid var(--color-border);
        border-radius: 20px 20px 0 0;
        padding: 56px 16px calc(24px + env(safe-area-inset-bottom));
        transform: translateY(0);
        transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        touch-action: pan-y;
        overflow: hidden;
    }

    .sidebar-collapsed {
        transform: translateY(calc(100% - var(--history-collapsed-height)));
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    }

    .sidebar-toggle {
        left: 50%;
        top: 8px;
        transform: translateX(-50%);
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        border-radius: 999px;
    }

    .sidebar-toggle:hover {
        transform: translateX(-50%) scale(1.05);
    }

    .sidebar-header,
    .sidebar ul {
        transition: opacity 0.2s ease;
    }

    .sidebar-collapsed .sidebar-header,
    .sidebar-collapsed ul {
        opacity: 0;
        pointer-events: none;
    }

    .sidebar ul {
        padding-right: 4px;
        gap: 8px;
    }

    .sidebar ul li {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .history-result {
        padding-left: 48px;
        font-size: 0.82rem;
    }
}


@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes growBar {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.formulaire {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}


.product-type-grid>div {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.product-type-grid>div:nth-child(1) {
    animation-delay: 0.1s;
}

.product-type-grid>div:nth-child(2) {
    animation-delay: 0.15s;
}

.product-type-grid>div:nth-child(3) {
    animation-delay: 0.2s;
}

.product-type-grid>div:nth-child(4) {
    animation-delay: 0.25s;
}

.product-type-grid>div:nth-child(5) {
    animation-delay: 0.3s;
}

.product-type-grid>div:nth-child(6) {
    animation-delay: 0.35s;
}


.breakdown-bar>div {
    transform-origin: left;
    animation: growBar 1.2s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}


.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(230, 81, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-brand);
    animation: spin 0.8s ease-in-out infinite;
    margin: 0 auto;
}

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


.result-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.result-product-media {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.result-product-image {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    object-fit: contain;
    box-shadow: var(--shadow-sm);
}

.result-product-title {
    font-size: 1.25rem;
    color: var(--color-primary);

    font-weight: 700;
    margin-bottom: 12px;
    text-transform: capitalize;

    letter-spacing: -0.01em;
}

.result-value-big {
    font-size: 4rem;

    font-weight: 800;
    color: var(--color-brand);
    line-height: 1;
    margin: 24px 0;

    text-shadow: 0 4px 12px rgba(230, 81, 0, 0.1);
}

.result-unit {
    font-size: 1rem;
    color: #94A3B8;
    font-weight: 500;
    vertical-align: middle;
}

.input-summary {
    display: inline-flex;
    gap: 16px;
    background: #F8FAFC;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #475569;
    border: 1px solid #E2E8F0;
    margin-bottom: 32px;
}

.context-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.context-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #F1F5F9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease;
}

.context-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.advice-box {
    background: linear-gradient(to right, #FFF7ED, #FFFCF5);
    border: 1px solid #A7F3D0;
    border-left: 4px solid var(--color-brand);
    padding: 16px 20px;
    border-radius: 8px;
    color: #9A3412;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    margin-top: 24px;
    box-shadow: 0 2px 4px rgba(230, 81, 0, 0.05);
}

.faq-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.faq-title {
    color: var(--color-brand-dark);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
}

.glossary-box {
    background: #F8FAFC;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.support-contact-card {
    text-align: center;
    background: #F0F9FF;
    border-color: #BAE6FD;
    border-left: none;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.support-email {
    color: #0284C7;
    font-weight: 600;
}


.context-card h4 {
    font-size: 0.8rem;
    color: #64748B;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.breakdown-bar {
    width: 100%;
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    margin-bottom: 12px;
}

.bar-segment {
    width: 0%;
    height: 100%;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-segment--product {
    background: var(--color-brand);
}

.bar-segment--transport {
    background: var(--color-transport);
    transition-delay: 0.2s;
}

.breakdown-legend {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.legend-fabrication {
    color: var(--color-brand);
    font-weight: 600;
}

.legend-transport {
    color: var(--color-transport);
    font-weight: 600;
}

.separator {
    color: #CBD5E1;
    margin: 0 4px;
}

.icon-car {
    font-size: 2rem;
    margin-bottom: 4px;
}

.equivalence-text {
    font-size: 0.9rem;
    color: #1E293B;
}

.sub-text {
    color: #94A3B8;
    font-size: 0.8rem;
}



@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 81, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(230, 81, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(230, 81, 0, 0);
    }
}

.container,
.result {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.type-card.pulse-active {
    animation: pulse 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}


.input-group:focus-within label {
    color: var(--color-brand);
}

.input-group:focus-within .info-icon {
    opacity: 1;
    transform: scale(1.1);
}


[data-tooltip] {
    position: relative;
    cursor: help;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #CBD5E1;
    border-radius: 50%;
    border: 1.5px solid #3B82F6;
    color: #3B82F6;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 6px;
    transition: all 0.2s ease;
    cursor: help;
    vertical-align: middle;
}

.info-icon:hover {
    color: var(--color-brand);
    border-color: var(--color-brand);
    background: rgba(230, 81, 0, 0.05);
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 8px);

    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;

    pointer-events: none;
    z-index: 1000;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    bottom: 150%;
    margin-bottom: 0;
    background: rgba(15, 23, 42, 0.9);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-tooltip]::after {
    content: '';
    bottom: 150%;
    margin-bottom: -6px;
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.9);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}


footer {
    background: #0F172A;

    color: #94A3B8;

    padding: 64px 24px 32px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-column--wide {
    flex: 1.5;
}

.certifications {
    display: flex;
    gap: 16px;
    opacity: 0.8;
    flex-wrap: wrap;
}

.certification-badge {
    border: 1px solid #CBD5E1;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
}

.footer-column h3 {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.footer-brand-title {
    color: var(--color-primary);
    margin-bottom: 16px;
}

.footer-lead {
    margin-bottom: 24px;
    max-width: 300px;
}

.footer-column p {
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
}

.footer-brand {
    font-weight: 600;
    color: white;
}

.footer-credit {
    font-size: 0.8rem;
    color: #94A3B8;
}


@media (max-width: 600px) {
    .context-grid {
        grid-template-columns: 1fr;
    }

    .wizard-progress-container {
        max-width: 100%;
    }

    .step-label {
        font-size: 0.7rem;
        line-height: 1.2;
        text-align: center;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .step-line {
        margin: 0 -6px 18px;
    }

    .wizard-navigation {
        flex-direction: column;
        align-items: stretch;
    }

    .input-summary {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 6px;
    }
}


body.is-embedded .navbar {
    display: none;
}

body.is-embedded .hero-section {
    padding: 56px 24px 40px;
    margin-bottom: 24px;
}

body.is-embedded .container {
    padding-bottom: calc(40px + var(--history-collapsed-height) + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: flex-start;
}

@media (max-width: 700px) {
    body.is-embedded .hero-section {
        padding: 40px 16px 24px;
        margin-bottom: 16px;
    }

    body.is-embedded .container {
        padding: 0 16px calc(24px + var(--history-collapsed-height) + env(safe-area-inset-bottom));
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    body.is-embedded .formulaire {
        margin-bottom: 32px;
    }
}

body.is-embedded .sidebar {
    padding-top: 32px;
}

@media (min-width: 701px) {
    body.is-embedded .sidebar-toggle {
        top: 120px;
    }
}

body.is-embedded footer {
    display: none;
}

@media print {
    body {
        background: white;
        color: black;
    }

    .sidebar,
    .sidebar-toggle,
    .navbar,
    footer,
    .close-details,
    .detail-backdrop,
    .detail-container,
    button {
        display: none !important;
    }

    .container,
    .hero-section {
        box-shadow: none;
        margin: 0;
        padding: 0;
        max-width: 100%;
        width: 100%;
        border: none;
    }

    .formulaire,
    .result {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
}


.toast {
    position: fixed;
    top: 80px;

    right: 24px;
    left: auto;
    bottom: auto;
    background: #0F172A;

    background: rgba(15, 23, 42, 0.98);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 2147483647;

    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    max-width: 90vw;

}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #10B981;
    background: #10B981;
}

.toast.error {
    border-left: 4px solid #EF4444;
    background: #EF4444;
}



.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.history-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.history-action-form {
    display: inline-flex;
    margin: 0;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    line-height: 1;
    box-shadow: none;
    font: inherit;
    letter-spacing: normal;
    text-shadow: none;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.action-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.action-icon:hover {
    background: #F1F5F9;
    border-color: var(--color-border);
    color: var(--color-brand);
    transform: translateY(-1px);
}

.action-icon:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

.history-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--color-primary);
}

.history-item-header span {
    display: block;
    line-height: 1.2;
}

.history-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.history-result {
    font-size: 0.85rem;
    color: #64748B;
    padding-left: 52px;
    line-height: 1.4;
}

.empty-state {
    cursor: default !important;
    background: none !important;
    text-align: center;
    padding: 32px 16px;
}

.empty-state:hover {
    background: none !important;
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
    filter: grayscale(100%);
}


.contact-info {
    color: #94A3B8;
    cursor: default;
}

/* CUSTOM CURSOR */
.cursor-dot,
.cursor-circle {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(31, 77, 90, 0.4);
}

.cursor-circle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(31, 77, 90, 0.5);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

@media (hover: hover) and (pointer: fine) {

    .cursor-dot,
    .cursor-circle {
        display: block;
    }

    body.has-custom-cursor {
        cursor: none;
    }

    body.has-custom-cursor a,
    body.has-custom-cursor button,
    body.has-custom-cursor input,
    body.has-custom-cursor textarea,
    body.has-custom-cursor select,
    body.has-custom-cursor .btn,
    body.has-custom-cursor label {
        cursor: none;
    }

    body.hovering .cursor-circle {
        width: 60px;
        height: 60px;
        background-color: rgba(31, 77, 90, 0.05);
        border-color: transparent;
    }

    body.hovering .cursor-dot {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* REFINED CURSOR MATCH */
.cursor-dot {
    width: 6px !important;
    height: 6px !important;
    background-color: #0F766E !important;
    box-shadow: none !important;
}

.cursor-circle {
    width: 36px !important;
    height: 36px !important;
    border: 1px solid rgba(15, 118, 110, 0.3) !important;
}

/* RESTORE NATIVE CURSOR */
html,
body,
a,
button,
input,
select,
label {
    cursor: auto !important;
}
/* DARK MODE INTEGRATION */
[data-theme='dark'] {
    color-scheme: dark;
    /* Base Colors - Midnight Slate */
    --color-bg: #020617;
    --color-surface: rgba(30, 41, 59, 0.7);
    --color-text: #F8FAFC;
    --color-border: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(15, 23, 42, 0.85);
    --glass-blur: blur(22px);

    /* Branding - Teal & Rose */
    --color-primary: #2DD4BF; /* Teal 400 */
    --color-brand: #2DD4BF;
    --color-brand-dark: #14B8A6;
    --color-brand-light: #5EEAD4;
    --color-accent: #F43F5E; /* Rose 500 */

    /* Feedback Colors */
    --color-success-bg: rgba(45, 212, 191, 0.1);
    --color-success-text: #2DD4BF;
    --color-error: #FB7185;
    --color-transport: #60A5FA;

    /* Shadows - Deep & Ambient */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md:
        0 10px 30px -10px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    --shadow-lg:
        0 25px 50px -12px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* DARK MODE OVERRIDES */
[data-theme='dark'] body {
    background-color: var(--color-bg);
    background-image:
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.08), transparent 55%),
        radial-gradient(circle at bottom left, rgba(14, 116, 144, 0.15), transparent 55%);
}

[data-theme='dark'] ::selection {
    background: rgba(45, 212, 191, 0.35);
    color: #0F172A;
}

[data-theme='dark'] .navbar {
    background: rgba(2, 6, 23, 0.85);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 12px 30px -20px rgba(2, 6, 23, 0.9);
}

[data-theme='dark'] .hero-section {
    background-color: #0B1220;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(45, 212, 191, 0.12) 0%, transparent 35%),
        radial-gradient(circle at 88% 75%, rgba(14, 116, 144, 0.16) 0%, transparent 40%),
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    background-position: 0 0, 0 0, -1px -1px, -1px -1px;
}

[data-theme='dark'] .hero-section::after {
    background: linear-gradient(to top, var(--color-bg), transparent);
}

[data-theme='dark'] .hero-subtitle {
    color: #94A3B8;
}

[data-theme='dark'] .hero-content .highlight {
    text-shadow: 0 0 24px rgba(45, 212, 191, 0.3);
}

[data-theme='dark'] .formulaire,
[data-theme='dark'] .result {
    background: var(--card-bg);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--color-text);
}

[data-theme='dark'] .formulaire h2 {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] form label {
    color: var(--color-text);
}

[data-theme='dark'] form select,
[data-theme='dark'] form input {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--color-text);
}

[data-theme='dark'] .formulaire::before {
    opacity: 0.6;
    background: linear-gradient(90deg, var(--color-brand), #2DD4BF);
}

[data-theme='dark'] form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232DD4BF'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23E2E8F0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: right 40px center, right 16px center;
    background-size: 0px, 16px;
}

[data-theme='dark'] form input:valid:not(:placeholder-shown),
[data-theme='dark'] form select:valid {
    border-color: rgba(45, 212, 191, 0.6);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
    background-color: rgba(2, 6, 23, 0.85);
}

[data-theme='dark'] form select:valid {
    background-size: 18px, 16px;
    background-position: right 40px center, right 16px center;
}

[data-theme='dark'] form select:hover,
[data-theme='dark'] form input:hover {
    border-color: rgba(94, 234, 212, 0.5);
}

[data-theme='dark'] form select:focus,
[data-theme='dark'] form input:focus {
    background-color: rgba(2, 6, 23, 0.9);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
}

[data-theme='dark'] input::placeholder {
    color: rgba(148, 163, 184, 0.7);
}

[data-theme='dark'] .btn-primary {
    background: linear-gradient(135deg, #2DD4BF 0%, #0F766E 100%);
}

[data-theme='dark'] .btn-primary:hover {
    background: linear-gradient(135deg, #5EEAD4 0%, #14B8A6 100%);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.35),
        0 4px 6px -2px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme='dark'] .btn-secondary {
    background: rgba(148, 163, 184, 0.12);
    color: #E2E8F0;
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .btn-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #F8FAFC;
}

[data-theme='dark'] .type-card {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.7);
}

[data-theme='dark'] .type-card:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(94, 234, 212, 0.45);
}

[data-theme='dark'] .type-card:active {
    background: rgba(15, 23, 42, 0.9);
}

[data-theme='dark'] .type-card.selected {
    background: rgba(45, 212, 191, 0.12);
    border-color: var(--color-brand);
}

[data-theme='dark'] .type-card.is-static:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: var(--shadow-md);
}

[data-theme='dark'] .type-card img {
    background: #0B1220;
    border-color: rgba(148, 163, 184, 0.25);
}

[data-theme='dark'] .type-card span {
    color: var(--color-text);
}

[data-theme='dark'] .preview-box {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(148, 163, 184, 0.25);
}

[data-theme='dark'] .preview-image-wrapper {
    background: rgba(148, 163, 184, 0.08);
}

[data-theme='dark'] .preview-text {
    color: #94A3B8;
}

[data-theme='dark'] .subproduct-empty {
    background: rgba(148, 163, 184, 0.12);
}

[data-theme='dark'] .product-type-image {
    background: #0B1220;
}

[data-theme='dark'] .result-unit {
    color: #94A3B8;
}

[data-theme='dark'] .result-product-image {
    background: #0B1220;
    border-color: rgba(148, 163, 184, 0.25);
}

[data-theme='dark'] .result-value-big {
    text-shadow: 0 6px 20px rgba(45, 212, 191, 0.25);
}

[data-theme='dark'] .boldGreen {
    color: #6EE7B7;
}

[data-theme='dark'] .input-summary {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.2);
    color: #E2E8F0;
}

[data-theme='dark'] .context-card {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: 0 10px 20px -16px rgba(0, 0, 0, 0.8);
}

[data-theme='dark'] .context-card:hover {
    box-shadow: 0 18px 30px -20px rgba(0, 0, 0, 0.85);
}

[data-theme='dark'] .context-card h4 {
    color: #94A3B8;
}

[data-theme='dark'] .advice-box {
    background: linear-gradient(to right, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-color: rgba(45, 212, 191, 0.3);
    color: #E2E8F0;
}

[data-theme='dark'] .breakdown-bar {
    background: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .legend-transport {
    color: var(--color-transport);
}

[data-theme='dark'] .separator {
    color: rgba(148, 163, 184, 0.6);
}

[data-theme='dark'] .equivalence-text {
    color: #E2E8F0;
}

[data-theme='dark'] .sub-text {
    color: #94A3B8;
}

[data-theme='dark'] .info-icon {
    background: rgba(148, 163, 184, 0.12);
    border-color: #60A5FA;
    color: #7DD3FC;
}

[data-theme='dark'] .sidebar {
    background: rgba(2, 6, 23, 0.96);
    border-left-color: rgba(148, 163, 184, 0.15);
    box-shadow: -8px 0 30px rgba(2, 6, 23, 0.7);
}

[data-theme='dark'] .sidebar h3 {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .sidebar ul li {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme='dark'] .sidebar ul li:hover {
    background: rgba(30, 41, 59, 0.85);
    color: var(--color-text);
    border-color: rgba(45, 212, 191, 0.35);
}

[data-theme='dark'] .sidebar ul li.active {
    background: rgba(45, 212, 191, 0.12);
    color: var(--color-brand-light);
    border-left-color: var(--color-brand);
}

[data-theme='dark'] .history-result {
    color: #94A3B8;
}

[data-theme='dark'] .action-icon:hover {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--color-brand-light);
}

[data-theme='dark'] .detail-container {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .detail-container h3 {
    color: var(--color-text);
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .detail-container p {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .detail-container .label {
    color: #94A3B8;
}

[data-theme='dark'] .detail-container .value {
    color: var(--color-text);
}

[data-theme='dark'] .close-details {
    background: rgba(148, 163, 184, 0.12);
    color: #94A3B8;
}

[data-theme='dark'] .close-details:hover {
    background: rgba(248, 113, 113, 0.2);
    color: #F87171;
}

[data-theme='dark'] .step-number {
    background: rgba(15, 23, 42, 0.8);
    color: #94A3B8;
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.8);
}

[data-theme='dark'] .step-label {
    color: #94A3B8;
}

[data-theme='dark'] .step-line {
    background: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .step-header p {
    color: #94A3B8;
}

[data-theme='dark'] .version-badge {
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.35);
    color: var(--color-brand-light);
}

[data-theme='dark'] .fullscreen-toggle {
    background: rgba(2, 6, 23, 0.7);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--color-text);
}

[data-theme='dark'] .sidebar-toggle {
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.6);
}

[data-theme='dark'] .faq-card {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .glossary-box {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .support-contact-card {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(59, 130, 246, 0.4);
}

[data-theme='dark'] .support-email {
    color: #7DD3FC;
}

[data-theme='dark'] .certification-badge {
    border-color: rgba(148, 163, 184, 0.35);
    color: #E2E8F0;
}

[data-theme='dark'] .footer-bottom {
    border-top-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .footer-credit {
    color: #CBD5E1;
}

[data-theme='dark'] ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
}

[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

[data-theme='dark'] body.is-fullscreen .formulaire,
[data-theme='dark'] body.is-fullscreen .result {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--color-text);
}

[data-theme='dark'] body.is-fullscreen .fullscreen-toggle {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(148, 163, 184, 0.25);
    color: #E2E8F0;
}

@media (max-width: 768px) {
    [data-theme='dark'] body:not(.is-embedded) .wizard-navigation {
        background: rgba(2, 6, 23, 0.95);
        border-top-color: rgba(148, 163, 184, 0.2);
        box-shadow: 0 -6px 18px rgba(2, 6, 23, 0.6);
    }
}

