:root {
    --primary: #7B8FE3;
    --primary-cyan: #5DD4E8;
    --dark-bg: #2A2A2A;
    --light-gray: #F8F9FA;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-Hairline.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-HairlineItalic.woff2') format('woff2');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-Thin.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-ThinItalic.woff2') format('woff2');
    font-weight: 200;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-ExtraLight.woff2') format('woff2');
    font-weight: 250;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-ExtraLightItalic.woff2') format('woff2');
    font-weight: 250;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-LightItalic.woff2') format('woff2');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-RegularItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-BookItalic.woff2') format('woff2');
    font-weight: 450;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-SemiBoldItalic.woff2') format('woff2');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-Heavy.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('as_fonts/Mont-HeavyItalic.woff2') format('woff2');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

body {
    position: relative;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: var(--text-dark);
    /* background-color: #fff; */
}

body::before {
    content: "";
    display: block;
    position: absolute;
    z-index: -1;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 450px;
    background: url(filigramme.png) no-repeat left center / contain;
}

/* New */

/* body {
   
    font-family: 'Mont', 'Montserrat', sans-serif;
    font-weight: 400;
    color: var(--text-dark);
    background-color: var(--light-gray);
} */

.main-header {
    background-color: #fff;
    padding: 1rem 0;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
}

/* New */

/* .main-header {
    background-color: var(--primary);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
} */

.top-bar {
    height: 31px;
    background-color: #1b2841;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo img {
    max-height: 60px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link-custom {
    color: var(--white) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.nav-link-custom:hover {
    opacity: 0.8;
}

.btn-espaces {
    border-radius: 50px;
    background-color: #d8518a;
    color: #fff;
    padding: 0.5rem 1.5rem;
    border: none;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-espaces:hover {
    background-color: #be4377;
    /* transform: translateY(-2px); */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); */
}

/* New */

/* .btn-espaces {
    background-color: var(--white);
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    border: none;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-espaces:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
} */

.btn-contact {
    background-color: var(--white);
    color: rgb(26, 39, 64);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1.6px solid rgb(26, 39, 64);
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-contact:hover {
    background-color: rgb(26, 39, 64);
    color: #fff;
}

.sidebar {
    background: linear-gradient(180deg, var(--primary-cyan) 0%, #4BC4D8 100%);
    min-height: calc(100vh - 200px);
    padding: 3rem 2rem;
    color: var(--white);
}

.sidebar-logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: var(--dark-bg);
}

.step-indicator {
    font-size: 5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.step-text {
    font-size: 1.2rem;
    opacity: 0.9;
}

.step-divider {
    width: 200px;
    height: 2px;
    background-color: var(--white);
    margin: 2rem 0;
}

.simulator-info {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: auto;
}

.main-content-wrapper {
    position: relative;
    min-height: 400px;
}

.main-content {
    padding: 3rem 1rem 10rem;
    /* padding: 6rem 2rem 10rem; */
    /* background-color: var(--white); */
}

.loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #FFFFFF;
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.loading-overlay.htmx-request {
    display: flex;
    opacity: 1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.content-header {
    display: flex;
    /* justify-content: space-between; */
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.content-header.center {
    justify-content: center;
}

.main-title {
    /* New */
    font-family: "Raleway", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--text-dark);
}

.subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 3rem;
}

.subtitle a {
    color: var(--text-light);
    text-decoration: none;
}

.subtitle a:hover {
    color: var(--primary);
}

.products-grid-home {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.products-grid-home .product-card {
    flex: 0 1 calc((100% - 6rem) / 5);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card {
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    text-decoration: none !important;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

.product-card * {
    text-decoration: none !important;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(107, 127, 215, 0.2);
    transform: translateY(-5px);
}

.product-card.selected {
    border-color: var(--primary);
    background-color: #F0F3FF;
}

.product-checkbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    cursor: pointer;
}

.product-card.selected .product-checkbox {
    background-color: var(--primary);
    border-color: var(--primary);
}

.product-card.selected .product-checkbox::after {
    content: '✓';
    color: var(--white);
    position: absolute;
    top: -3px;
    left: 2px;
    font-size: 14px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* .product-icon {
position: relative;
margin: 0 auto 1.5rem;
display: flex;
align-items: center;
justify-content: center;
}

.product-icon img {
max-width: 100%;
max-height: 100px;
}                    

.product-details img.btn-picto {
max-width: 30px;
display: inline;
margin: 0;
padding: 0 5px 0;
} */

.product-icon {
    position: relative;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon img {
    max-width: 100%;
    max-height: 100px;
}

.icon-wrapper {
    position: relative;
    display: inline-block;
    /* Important pour que le wrapper prenne la taille de l'image */
}

.icon-wrapper>img {
    width: 100%;
    max-width: 100%;
    max-height: 100px;
    display: block;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.product-details img.btn-picto {
    max-width: 30px;
    display: inline;
    margin: 0;
    padding: 0 5px 0;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-nav {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-plain {
    background-color: var(--dark-bg);
    color: var(--white);
    transition: all 0.3s;
}

.btn-plain:hover {
    background-color: #1A1A1A;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-border {
    background-color: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.btn-border:hover {
    border-color: var(--dark-bg);
    color: var(--dark-bg);
    transform: translateY(-2px);
}

.main-footer {
    background-color: #1b2841;
    color: var(--white);
    padding: 3rem 0 2rem;
}

/* New */

/* .main-footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 3rem 0 2rem;
} */

.main-footer p {
    font-size: 14px;
    line-height: 21px;
}

.footer-logo {
    margin-bottom: 1rem;
    max-width: 200px;
}

.footer-logo img {
    width: 100%;
    height: auto;
}

.footer-logo-img {
    width: auto;
    height: auto;
    max-height: 60px;
}

.footer-tagline {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 2rem;
}

.footer-description {
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 900;
    max-width: 400px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: #CCCCCC;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--white);
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    color: #CCCCCC;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--white);
}

.cta-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cta-card {
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.cta-card-white {
    background-color: var(--white);
    color: var(--text-dark);
}

.cta-card-blue {
    background: linear-gradient(135deg, var(--primary) 0%, #8B9EE8 100%);
    color: var(--white);
}

.cta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.cta-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cta-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.cta-arrow {
    font-size: 1.5rem;
}

.footer-bottom {
    border-top: 1px solid #444;
    margin-top: 3rem;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-legal a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease-in-out;
}

.footer-legal a:hover {
    color: #999;
}

.footer-copyright {
    color: #999;
    font-size: 0.85rem;
}

@media (max-width: 991px) {
    .sidebar {
        min-height: auto;
        padding: 2rem;
    }
    .sidebar-logo {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .step-indicator {
        font-size: 3rem;
    }
    .main-content {
        padding: 2rem 1.5rem;
    }
    .main-title {
        font-size: 2rem;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-grid-home .product-card {
        flex: 0 1 calc((100% - 1.5rem) / 2);
    }
}

@media (max-width: 768px) {
    .main-header .col-6.col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .main-nav {
        flex-direction: row;
        gap: 1rem;
        justify-content: flex-start !important;
    }
    .products-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 1rem;
    }
    .products-grid-home .product-card {
        flex: 0 1 calc((100% - 1.5rem) / 2);
    }
    .product-card {
        padding: 1.5rem 1rem;
    }
    .footer-description {
        max-width: 100%;
    }
    .cta-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    body::before {
        width: 100%;
    }
    .footer-legal {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    .logo {
        font-size: 1.5rem;
    }
    .main-title {
        font-size: 1.5rem;
    }
    .nav-buttons {
        flex-direction: column;
        width: 100%;
    }
    .btn-nav {
        width: 100%;
    }
    .products-grid-home {
        flex-direction: column;
        align-items: center;
    }
    .products-grid-home .product-card {
        flex: 0 1 100%;
        width: 100%;
    }
    .icon-wrapper>img {
        min-width: 80px;
    }
}

.product-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-thumb {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.product-thumb:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(123, 143, 227, 0.2);
}

.product-thumb.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f0f3ff 0%, #ffffff 100%);
}

.product-thumb img {
    width: 100%;
    height: auto;
    max-height: 96px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.product-thumb-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 0.5rem;
}

.sketchfab-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border: 2px solid var(--border-color);
    border-radius: 12px;
}

.sketchfab-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.color-selector {
    padding: 2rem;
}

.color-options {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-option:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.color-option.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(123, 143, 227, 0.2);
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.product-details p {
    text-align: justify;
}

.product-details img {
    max-width: 500px;
    width: 100%;
    display: block;
    margin: 3rem auto;
}

@media (max-width: 991px) {
    .product-thumbnails {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    .product-thumb {
        min-width: 150px;
        flex-shrink: 0;
    }
    .product-thumb:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 576px) {
    .color-option {
        width: 60px;
        height: 60px;
    }
    .color-selector {
        padding: 1.5rem;
    }
    .sketchfab-embed-wrapper {
        padding-bottom: 75%;
    }
}

.info-badge {
    background-color: #0d6efd;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    cursor: help;
    font-style: italic;
}

.info-badge:hover {
    background-color: #0b5ed7;
}

/* Style du tooltip */

.tooltip-inner {
    max-width: 300px;
    text-align: left;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .product-icon img[src="as_pictos/portails.svg"] {
        margin: 15px 0;
    }
}