:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #2c3e50;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --light-gray: #bdc3c7;
    --gray: #95a5a6;
    --dark: #34495e;
    --white: #fff;
    --glass: rgb(255 255 255 / 20%);
    --glass-border: rgb(255 255 255 / 30%);
    --shadow: 0 10px 30px rgb(0 0 0 / 10%);
    --shadow-hover: 0 15px 35px rgb(0 0 0 / 15%);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Poppins, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
}

.loader-circle {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 150px 0 100px;
    position: relative;
    overflow: hidden;
}

.boutique-hero {
    background: linear-gradient(rgb(0 0 0 / 50%), rgb(0 0 0 / 50%)), url('images/boutique-bg.jpg') no-repeat center center/cover;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgb(0 0 0 / 30%);
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 5px rgb(0 0 0 / 30%);
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.divider {
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Boutique Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: rgb(255 255 255 / 50%);
}

.product-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.monture-type img,
.lentille-type img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 10px;
}

.product-description {
    color: var(--dark);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.btn-contact {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgb(52 152 219 / 30%);
}

.btn-contact:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgb(52 152 219 / 40%);
}

/* Tabs Section */
.monture-lentille-section {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    margin: 40px auto;
    padding: 40px;
    box-shadow: var(--shadow);
}

.monture-lentille-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 30px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: Poppins, sans-serif;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fade-in 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.monture-types,
.lentille-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.monture-type,
.lentille-type {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.monture-type:hover,
.lentille-type:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}



.monture-type h3,
.lentille-type h3 {
    font-size: 1.3rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--light);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-about-text {
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgb(255 255 255 / 10%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-hours li,
.footer-contact li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-hours i,
.footer-contact i {
    margin-right: 10px;
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgb(255 255 255 / 10%);
}

.copyright {
    font-size: 0.9rem;
    color: var(--light-gray);
}

.back-to-top,
.scroll-to-bottom {
    position: fixed;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top {
    bottom: 80px;
}

.scroll-to-bottom {
    bottom: 20px;
}

.back-to-top.active,
.scroll-to-bottom.active {
    opacity: 1;
    visibility: visible;
}

.scroll-down-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background-color: rgb(0 0 0 / 50%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-down-btn.active {
    opacity: 1;
    visibility: visible;
}

.scroll-down-btn i {
    font-size: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Responnsive */

/* Responsive pour très petits écrans (Galaxy Fold) */
@media (width <= 280px) {
    .container {
        padding: 0 10px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        margin: 0 3px 8px;
    }

    .monture-type,
    .lentille-type {
        padding: 10px;
        margin: 0 auto;

        /* Centrage ajouté */
    }

    .lentille-type {
        width: 90%;

        /* Légèrement plus petit que monture-type */
    }

    .btn-contact {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

/* Mobiles moyens (à partir de 375px) */
@media (width >= 375px) {
    .monture-types,
    .lentille-types {
        padding: 0 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .lentille-type {
        width: 92%;

        /* Légère réduction par rapport à monture-type */
    }
}

/* Tablettes et mobiles larges (à partir de 481px) */
@media (width >= 481px) {
    .container {
        max-width: 95%;
    }

    .monture-types,
    .lentille-types {
        flex-flow: row wrap;
        justify-content: center;
        gap: 20px;
        padding: 0;
        min-width: auto;
    }

    .monture-type {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
        margin: 0;
    }

    .lentille-type {
        flex: 0 0 calc(48% - 20px);

        /* Légèrement plus petit */
        max-width: calc(48% - 20px);
        margin: 0;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablettes (à partir de 768px) */
@media (width >= 768px) {
    .container {
        max-width: 90%;
    }

    .section-title {
        font-size: 2rem;
    }

    .monture-type {
        flex: 0 0 calc(33.333% - 20px);
        max-width: calc(33.333% - 20px);
    }

    .lentille-type {
        flex: 0 0 calc(32% - 20px);

        /* Légère réduction */
        max-width: calc(32% - 20px);
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* iPad Pro 11" (834px) et iPad Air (820px) */
@media (width >= 820px) and (width <= 834px) {
    .monture-type {
        flex: 0 0 calc(33.333% - 25px);
        max-width: calc(33.333% - 25px);
    }

    .lentille-type {
        flex: 0 0 calc(32% - 25px);
        max-width: calc(32% - 25px);
    }

    .products-grid {
        gap: 25px;
    }
}

/* Grandes tablettes et petits écrans desktop (à partir de 1024px) */
@media (width >= 1024px) {
    .container {
        max-width: 1200px;
    }

    .monture-types,
    .lentille-types {
        gap: 30px;
        justify-content: center;
    }

    .monture-type {
        flex: 0 0 calc(25% - 30px);
        max-width: calc(25% - 30px);
    }

    .lentille-type {
        flex: 0 0 calc(24% - 30px);

        /* Légèrement plus petit */
        max-width: calc(24% - 30px);
    }

    .product-card {
        transition: transform 0.3s, box-shadow 0.3s;
    }

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgb(0 0 0 / 10%);
    }
}