/* ==========================================================================
   DESIGN SYSTEM - MAISON NOUVELLE (Ivory, Ink Black, Sand Gold, Clay Rose)
   ========================================================================== */

/* Typography & Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&display=swap');

:root {
    /* Color Palette */
    --clr-bg: #F6F3EE;          /* Ivory / Linen */
    --clr-text: #151515;        /* Ink Black */
    --clr-text-muted: #7A7672;  /* Cool Earth Gray */
    --clr-primary: #BFA888;     /* Sand Gold */
    --clr-primary-hover: #AA9373;
    --clr-accent: #D1A18C;      /* Clay Rose / Terracotta */
    --clr-secondary: #FFFFFF;   /* Clean White */
    --clr-border: #E5E0DA;
    --clr-footer-bg: #1B1A18;   /* Warm Charcoal */

    /* Fonts */
    --ff-title: 'Cormorant Garamond', serif;
    --ff-body: 'Montserrat', sans-serif;

    /* Transitions */
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;

    /* Shadows */
    --shadow-soft: 0 10px 30px rgba(27, 26, 24, 0.03);
    --shadow-medium: 0 15px 40px rgba(27, 26, 24, 0.06);

    /* Containers */
    --max-width: 1200px;
}

/* Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--ff-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Structural Components */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
}

.section-white {
    background-color: #FFFFFF;
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
}

/* Titles & Badges */
h1, h2, h3, h4, h5 {
    font-family: var(--ff-title);
    font-weight: 400;
    line-height: 1.2;
}

h2 {
    font-size: 3.2rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    letter-spacing: 0.5px;
}

h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background-color: var(--clr-primary);
    margin: 20px auto 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(191, 168, 136, 0.08);
    color: var(--clr-primary);
    padding: 6px 18px;
    border-radius: 0;
    font-family: var(--ff-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 1px solid rgba(191, 168, 136, 0.2);
    margin-bottom: 25px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 36px;
    font-family: var(--ff-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 0;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--clr-text);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--clr-primary);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--clr-text);
    border: 1px solid var(--clr-text);
}

.btn-secondary:hover {
    background-color: var(--clr-text);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.btn-accent {
    background-color: var(--clr-accent);
    color: #FFFFFF;
}

.btn-accent:hover {
    background-color: #BF8D79;
    transform: translateY(-1px);
}

.btn-outline-light {
    background-color: transparent;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
    background-color: #FFFFFF;
    color: var(--clr-text);
    border-color: #FFFFFF;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(246, 243, 238, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--clr-border);
    transition: var(--transition-smooth);
}

header.scrolled {
    background-color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(27, 26, 24, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    transition: var(--transition-smooth);
}

header.scrolled nav {
    padding: 16px 0;
}

.logo {
    font-family: var(--ff-title);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--clr-text);
    letter-spacing: 2px;
}

.logo span {
    color: var(--clr-primary);
}

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

.nav-links a {
    font-family: var(--ff-body);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--clr-text-muted);
}

.nav-links a:hover {
    color: var(--clr-text);
}

/* Header Cart Button Icon */
.btn-header-cart {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ff-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    position: relative;
    padding: 8px 16px;
    border: 1px solid var(--clr-border);
    background: none;
    transition: var(--transition-fast);
}

.btn-header-cart:hover {
    border-color: var(--clr-text);
}

.btn-header-cart svg {
    width: 16px;
    height: 16px;
    fill: var(--clr-text);
}

.cart-badge-count {
    background-color: var(--clr-accent);
    color: #FFFFFF;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 16px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background-color: var(--clr-text);
    transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 180px 0 100px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(246, 243, 238, 0.85), rgba(246, 243, 238, 0.95)), url('../assets/hero_bg.png') no-repeat center center/cover;
    position: relative;
}

/* Temporary CSS backup gradient if image fails */
.hero-fallback-gradient {
    background: linear-gradient(135deg, #F6F3EE 0%, #E8E2D9 50%, #DCD4C7 100%);
}

.hero-content {
    max-width: 650px;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 25px;
    line-height: 1.1;
    color: var(--clr-text);
}

.hero-content p {
    font-size: 1.2rem;
    font-family: var(--ff-body);
    font-weight: 300;
    color: var(--clr-text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Catalogue & Products */
.catalogue-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    color: var(--clr-text-muted);
    font-size: 1rem;
    font-weight: 300;
}

.catalogue-filter-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--clr-text-muted);
    font-family: var(--ff-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 16px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background-color: var(--clr-text);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.filter-btn.active,
.filter-btn:hover {
    color: var(--clr-text);
}

.filter-btn.active::after {
    transform: scaleX(1);
}

.produits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.produit-card {
    background-color: #FFFFFF;
    border: 1px solid var(--clr-border);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.produit-card.hidden {
    display: none;
}

.produit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.produit-img-box {
    position: relative;
    aspect-ratio: 3/4;
    background-color: #FBFBFA;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.produit-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.produit-card:hover .produit-img-box img {
    transform: scale(1.05);
}

/* Fallback visual boxes */
.fallback-img-container {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F9F7F5, #EAE5DF);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fallback-img-container svg {
    width: 60px;
    height: 60px;
    fill: var(--clr-primary);
    opacity: 0.5;
}

.produit-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.produit-info h3 {
    font-family: var(--ff-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--clr-text);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.produit-info .price {
    font-family: var(--ff-title);
    font-size: 1.6rem;
    color: var(--clr-primary);
    margin-bottom: 12px;
}

.produit-info p {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    font-weight: 300;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.5;
}

.produit-info .btn-add-to-bag {
    width: 100%;
    padding: 12px 0;
    font-size: 0.8rem;
}

/* Department Rayons Section */
.rayons-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
    color: var(--clr-text-muted);
    font-size: 1rem;
    font-weight: 300;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
}

.cat-card {
    background-color: #FFFFFF;
    border: 1px solid var(--clr-border);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cat-card:hover {
    border-color: var(--clr-text);
    background-color: #FAF9F6;
}

.cat-card .icon-box {
    width: 64px;
    height: 64px;
    background-color: #FBFBFA;
    border: 1px solid var(--clr-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition-fast);
}

.cat-card:hover .icon-box {
    background-color: var(--clr-text);
    border-color: var(--clr-text);
}

.cat-card .icon-box svg {
    width: 24px;
    height: 24px;
    fill: var(--clr-primary);
    transition: var(--transition-fast);
}

.cat-card:hover .icon-box svg {
    fill: #FFFFFF;
}

.cat-card h4 {
    font-family: var(--ff-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--clr-text);
}

/* Retail / Stock Checker Widget */
.checker-box {
    background-color: #FFFFFF;
    border: 1px solid var(--clr-border);
    padding: 30px;
    box-shadow: var(--shadow-soft);
    margin-top: 40px;
}

.checker-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.checker-input-group {
    display: flex;
    gap: 12px;
}

.checker-input-group select {
    flex-grow: 1;
    padding: 14px 20px;
    border: 1px solid var(--clr-border);
    background-color: #FFFFFF;
    font-family: var(--ff-body);
    font-size: 0.95rem;
    border-radius: 0;
    outline: none;
}

.checker-input-group select:focus {
    border-color: var(--clr-text);
}

.checker-result {
    margin-top: 15px;
    min-height: 40px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.result-success {
    color: var(--clr-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-success svg {
    fill: var(--clr-primary);
    width: 20px;
    height: 20px;
}

.result-info {
    color: var(--clr-text-muted);
}

/* Shopping Cart Drawer coulissant */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(21, 21, 21, 0.4);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background-color: #FFFFFF;
    z-index: 1600;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-drawer-header {
    padding: 30px;
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h3 {
    font-size: 1.6rem;
    color: var(--clr-text);
}

.cart-drawer-close {
    background: none;
    border: none;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
}

.cart-drawer-close:hover {
    color: var(--clr-primary);
}

/* Cart Items Container */
.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.cart-empty-message {
    text-align: center;
    color: var(--clr-text-muted);
    font-weight: 300;
    margin-top: 50px;
}

.cart-item {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid var(--clr-border);
    padding-bottom: 20px;
}

.cart-item-img {
    width: 80px;
    height: 100px;
    background-color: var(--clr-bg);
    overflow: hidden;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-details h4 {
    font-family: var(--ff-body);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-price {
    font-family: var(--ff-title);
    font-size: 1.3rem;
    color: var(--clr-primary);
    margin-bottom: 10px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--clr-border);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.qty-val {
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-remove-item {
    background: none;
    border: none;
    color: var(--clr-accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-left: auto;
}

/* Cart Footer Chiffres & Booking */
.cart-drawer-footer {
    border-top: 1px solid var(--clr-border);
    padding: 30px;
    background-color: var(--clr-bg);
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}

.subtotal-label {
    font-family: var(--ff-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.subtotal-price {
    font-family: var(--ff-title);
    font-size: 2rem;
    font-weight: 500;
    color: var(--clr-primary);
    line-height: 1;
}

/* Click & Collect Validation Form */
.cart-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-checkout-form input {
    padding: 12px 16px;
    border: 1px solid var(--clr-border);
    font-family: var(--ff-body);
    font-size: 0.9rem;
    border-radius: 0;
    background-color: #FFFFFF;
}

.cart-checkout-form input:focus {
    outline: none;
    border-color: var(--clr-text);
}

.btn-submit-checkout {
    width: 100%;
}

/* Contact / Boutique info layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--clr-text-muted);
    margin-bottom: 20px;
    font-weight: 300;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 1px solid var(--clr-border);
    border-radius: 0;
    background-color: #FFFFFF;
    color: var(--clr-text);
    font-size: 0.95rem;
    font-family: var(--ff-body);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--clr-primary);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Footer styling */
footer {
    background-color: var(--clr-footer-bg);
    color: rgba(255, 255, 255, 0.45);
    padding: 100px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    color: #FFFFFF;
    margin-bottom: 25px;
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 30px;
    font-weight: 300;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    transition: var(--transition-smooth);
}

.footer-socials a:hover {
    background-color: var(--clr-primary);
    border-color: var(--clr-primary);
    transform: translateY(-3px);
}

.footer-socials a svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.footer-links h4,
.footer-contact h4 {
    color: #FFFFFF;
    font-size: 1.1rem;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    font-family: var(--ff-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background-color: var(--clr-primary);
    margin-top: 8px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links a {
    font-size: 0.9rem;
    font-weight: 400;
}

.footer-links a:hover {
    color: var(--clr-primary);
    padding-left: 5px;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 0.95rem;
}

.footer-contact-item svg {
    width: 18px;
    height: 18px;
    fill: var(--clr-primary);
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.8rem;
}

.footer-bottom a:hover {
    color: var(--clr-primary);
}

/* Responsive Grid and layouts */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }

    .hero {
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

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

    .devis-grid,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--clr-bg);
        flex-direction: column;
        padding: 30px 24px;
        gap: 20px;
        border-bottom: 1px solid var(--clr-border);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid var(--clr-border);
    }

    .btn-header-cart {
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

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

    .produits-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cart-drawer {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }

    .btn {
        width: 100%;
    }
}
