/* ========================================
   STYLE.CSS - Styles globaux et réutilisables
   ======================================== */

/* Import des polices fines et élégantes */
@import url('fonts.css');

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    /* Couleurs */
    --bg-cream: #FFFEFB;
    --text-dark: #191919;
    --accent-yellow: #FDD06E;
    --accent-red: #DF4949;
    --bg-gray: #F5F5F5;
    --overlay-dark: rgba(25, 25, 25, 0.35);
    --text-muted: rgba(25, 25, 25, 0.35);
    
    /* Typographie */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Instrument Serif', Georgia, serif;
}

html {
    overflow-x: hidden;
}

body {
    /* Plusieurs panneaux (panier, menu mobile, drawers de filtres) sont en
       position: fixed et planqués hors écran via un offset négatif ou un
       transform : leur boîte dépasse quand même le viewport et compte comme
       zone scrollable sur mobile sans ce overflow-x: hidden. */
    overflow-x: hidden;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
    font-weight: 600;
}

h5 {
    font-size: 1.25rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 700;
}
/* Header */
header {
    background: var(--bg-cream);
    padding: 20px 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(25, 25, 25, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.7;
}

.logo svg {
    height: 35px;
    width: auto;
}

nav {
    display: flex;
    gap: 42px;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.3s;
    letter-spacing: 0.3px;
}

nav a:hover {
    opacity: 0.6;
}

.header-icons {
    display: flex;
    gap: 24px;
    align-items: center;
}

.icon {
    width: 28px;
    height: 28px;
    cursor: pointer;
    position: relative;
    transition: opacity 0.3s;
}

.icon:hover {
    opacity: 0.6;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--accent-yellow);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Menu Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    width: 26px;
    height: 26px;
    padding: 0;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--text-dark);
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-cream);
    padding: 88px 24px 40px;
    z-index: 98;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu a {
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    padding: 18px 0;
    border-bottom: 1px solid rgba(25, 25, 25, 0.08);
    letter-spacing: 0.3px;
}

.mobile-menu a.mobile-menu-cta {
    margin-top: 28px;
    padding: 15px 20px;
    background: var(--accent-yellow, #FDD06E);
    color: #191919;
    font-weight: 600;
    text-align: center;
    border-radius: 10px;
    border-bottom: none;
    font-size: 16px;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* Masquer le bouton flottant cookies quand le menu mobile est ouvert */
body.nav-open #ckFloatBtn {
    display: none;
}

/* Panier Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.cart-overlay.active {
    display: block;
}

.cart-header {
    padding: 30px;
    border-bottom: 1px solid rgba(25, 25, 25, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 24px;
    font-weight: 700;
}

.cart-close {
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--text-dark);
    transition: opacity 0.3s;
}

.cart-close:hover {
    opacity: 0.6;
}

.cart-items {
    padding: 30px;
}

.cart-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(25, 25, 25, 0.1);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    background: var(--bg-gray);
    flex-shrink: 0;
}

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

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

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-brand {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--text-dark);
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: var(--text-dark);
    color: white;
}

.quantity-value {
    font-size: 16px;
    font-weight: 500;
}

.cart-item-price {
    font-size: 18px;
    font-weight: 600;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 10px;
    transition: opacity 0.3s;
}

.cart-item-remove:hover {
    opacity: 0.6;
}

.cart-footer {
    padding: 30px;
    border-top: 1px solid rgba(25, 25, 25, 0.1);
    position: sticky;
    bottom: 0;
    background: white;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-total-label {
    font-size: 18px;
    font-weight: 600;
}

.cart-total-price {
    font-size: 24px;
    font-weight: 700;
}

.cart-checkout {
    width: 100%;
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
    letter-spacing: 0.5px;
}

.cart-checkout:hover {
    opacity: 0.8;
}

.cart-empty {
    padding: 50px 30px;
    text-align: center;
}

.cart-empty p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Buttons */
.btn-primary {
    background: var(--accent-yellow);
    color: var(--bg-cream);
    border: 1px solid var(--accent-yellow);
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-yellow);
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--text-dark);
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.btn-outline:hover {
    background: var(--text-dark);
    color: white;
}

/* Scrolling Banner */
.scrolling-banner {
    background: var(--accent-yellow);
    padding: 10px;
    overflow: hidden;
    white-space: nowrap;
}

.scrolling-content {
    display: inline-flex;
    gap: 50px;
    animation: scroll 30s linear infinite;
}

.scrolling-content span {
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Section Title (réutilisable) */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 46px;
    margin-bottom: 50px;
}

.section-title hr {
    flex: 1;
    max-width: 333px;
    border: none;
    border-top: 1px solid var(--text-dark);
}

.section-title h2 {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

/* Footer */
footer {
    background: var(--bg-gray);
    padding: 75px 100px 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h4 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
}

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

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

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

.footer-column a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s;
}

.footer-column a:hover {
    opacity: 0.6;
}

.footer-bottom {
    border-top: 1px solid rgba(25, 25, 25, 0.5);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(25, 25, 25, 0.5);
    font-size: 16px;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: rgba(25, 25, 25, 0.5);
    text-decoration: none;
    font-size: 16px;
}

/* ========================================
   RESPONSIVE - Header & Footer
   ======================================== */

@media (max-width: 1024px) {
    header {
        padding: 20px 40px;
    }

    footer {
        padding: 50px 40px 30px;
    }

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

    .section-title h2 {
        font-size: 40px;
    }

    .footer-column h4 {
        font-size: 22px;
    }

    .cart-sidebar {
        width: 400px;
        right: -400px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .logo svg {
        height: 28px;
    }

    nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    footer {
        padding: 40px 20px 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 18px;
    }

    .section-title h2 {
        font-size: 32px;
    }

    .footer-column h4 {
        font-size: 20px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* ========================================
   RESPONSIVE - Petits mobiles (≤ 480px)
   ======================================== */

@media (max-width: 480px) {
    header {
        padding: 14px 16px;
    }

    .btn-primary,
    .btn-outline {
        padding: 13px 22px;
        font-size: 15px;
    }

    footer {
        padding: 36px 16px 28px;
    }

    .footer-content {
        gap: 28px;
    }

    .footer-column p,
    .footer-column a,
    .footer-links a,
    .footer-bottom p {
        font-size: 15px;
    }

    .section-title h2 {
        font-size: 26px;
        line-height: 1.2;
    }

    /* Aucune image ne dépasse jamais sa colonne */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Modal Connexion */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-dark);
    line-height: 1;
}

.modal-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 400;
}

.modal-content p {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-actions .btn-primary,
.modal-actions .btn-outline {
    padding: 15px 30px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
}

.modal-actions .btn-primary {
    background: var(--text-dark);
    color: white;
    border: 2px solid var(--text-dark);
}

.modal-actions .btn-primary:hover {
    background: #000;
}

.modal-actions .btn-outline {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.modal-actions .btn-outline:hover {
    background: var(--text-dark);
    color: white;
}

/* Cart item color */
.cart-item-color {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}