/* =========================================================
   ANDALOCI — Tapis & Artisanat Marocain
   Identité "atelier du souk" : le cuir brut, la main qui le
   façonne. Motif signature : la piqûre sellier (stitch-frame)
   qui encadre les visuels, en écho au travail du cuir.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,900&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
    --ink:        #241A10;
    --paper:      #F4EAD9;
    --paper-deep: #E9DBC0;
    --card:       #FFFDF9;
    --hide:       #B9793F;
    --hide-light: #DDA968;
    --rust:       #A6391D;
    --rust-dark:  #7E2A15;
    --pine:       #1E5B46;
    --pine-dark:  #143D30;
    --whatsapp:   #22A45D;
    --whatsapp-dark:#187A45;

    --font-display: 'Fraunces', serif;
    --font-body: 'Work Sans', sans-serif;

    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 14px 32px rgba(36, 26, 16, 0.14);
    --shadow-sm: 0 4px 12px rgba(36, 26, 16, 0.08);
}

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

html { overflow-x: hidden; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container-inner { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }

/* =========================================================
   BANDEAU D'ANNONCE
   ========================================================= */

.announce-bar {
    background: var(--rust);
    color: #fff;
}

.announce-bar p {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    padding: 9px clamp(18px, 4vw, 48px);
}

.announce-bar i { margin-right: 6px; }

/* =========================================================
   EN-TÊTE
   ========================================================= */

.main-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--paper);
    border-bottom: 1px solid rgba(36, 26, 16, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.logo-frame {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    display: block;
}

.logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text { min-width: 0; }

.brand-text .wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.01em;
    color: var(--ink);
    white-space: nowrap;
}

.brand-text .subline {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--pine);
    white-space: nowrap;
}

.header-cta {
    flex: 0 0 auto;
}

/* Bouton WhatsApp — utilisé partout où une commande est possible */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: linear-gradient(135deg, var(--whatsapp), var(--whatsapp-dark));
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 12px 20px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(24, 122, 69, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(24, 122, 69, 0.4);
}

.btn-whatsapp i { font-size: 1.15rem; }

.btn-whatsapp.small {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 0.88rem;
}

/* =========================================================
   MOTIF SIGNATURE — cadre "piqûre sellier"
   ========================================================= */

.stitch-frame {
    position: relative;
    border-radius: var(--radius);
    padding: 9px;
    background: var(--card);
}

.stitch-frame::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 2px dashed var(--rust);
    border-radius: calc(var(--radius) - 8px);
    opacity: 0.55;
    pointer-events: none;
}

.stitch-frame img {
    border-radius: calc(var(--radius) - 12px);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: clamp(36px, 6vw, 64px) 0 clamp(40px, 6vw, 70px);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--rust);
    margin-bottom: 16px;
}

.hero-eyebrow::before {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--rust);
    display: inline-block;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.08;
    color: var(--ink);
    margin-bottom: 20px;
}

.hero-text h1 em {
    font-style: normal;
    color: var(--rust);
}

.hero-text p {
    font-size: clamp(1rem, 1.4vw, 1.12rem);
    color: rgba(36, 26, 16, 0.78);
    max-width: 46ch;
    line-height: 1.6;
    margin-bottom: 26px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.link-catalogue {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--ink);
    border-bottom: 2px solid var(--pine);
    padding-bottom: 3px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.link-catalogue:hover { color: var(--pine); }

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trust-chip {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pine-dark);
    background: rgba(30, 91, 70, 0.1);
    border: 1px solid rgba(30, 91, 70, 0.25);
    padding: 7px 14px;
    border-radius: 999px;
}

.hero-media {
    position: relative;
}

.hero-media .stitch-frame {
    transform: rotate(-1.6deg);
    box-shadow: var(--shadow);
}

.hero-media .stitch-frame img { height: 420px; }

.hero-caption {
    position: absolute;
    bottom: -14px;
    left: 24px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

/* =========================================================
   CATALOGUE
   ========================================================= */

.catalogue {
    padding: 10px 0 clamp(48px, 6vw, 80px);
}

.section-heading {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 34px;
}

.section-heading .hero-eyebrow { justify-content: center; }

.section-heading h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    color: var(--ink);
    margin-bottom: 10px;
}

.section-heading p {
    color: rgba(36, 26, 16, 0.72);
    font-size: 0.98rem;
}

.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 34px;
    padding-bottom: 4px;
}

.tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--paper-deep);
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tab i { color: var(--hide); }

.tab:hover { background: #DFCEA9; }

.tab.active {
    background: var(--ink);
    color: var(--paper);
    box-shadow: var(--shadow-sm);
}

.tab.active i { color: var(--hide-light); }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(36, 26, 16, 0.06);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.product-media {
    position: relative;
    padding: 12px 12px 0;
}

.product-link {
    display: block;
}

.product-info-cta {
    padding: 0 20px 22px;
}

.product-media .stitch-frame { padding: 6px; }

.product-media .stitch-frame img {
    height: 230px;
    border-radius: calc(var(--radius) - 12px);
}

.category-tag {
    position: absolute;
    top: 22px;
    left: 22px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--rust);
    box-shadow: var(--shadow-sm);
}

.category-tag.gamme2 { background: var(--hide); color: var(--ink); }
.category-tag.gamme3 { background: var(--pine); }

.product-info {
    padding: 18px 20px 22px;
    text-align: center;
}

.product-link .product-info {
    padding-bottom: 6px;
}

.product-info h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    margin-bottom: 6px;
}

.price {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--rust-dark);
    margin-bottom: 16px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: var(--pine-dark);
    font-weight: 600;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* Emplacements réservés pour les prochains produits */
.product-card-soon {
    background: transparent;
    box-shadow: none;
    border: 2px dashed rgba(36, 26, 16, 0.18);
}

.product-card-soon:hover {
    transform: none;
    box-shadow: none;
}

.product-media-soon {
    padding: 12px 12px 0;
}

.placeholder-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 230px;
    background: var(--paper-deep);
    border: none;
}

.placeholder-frame::before {
    border-color: rgba(36, 26, 16, 0.25);
}

.placeholder-frame i {
    font-size: 1.6rem;
    color: rgba(36, 26, 16, 0.35);
}

.product-card-soon .product-info h3 {
    color: rgba(36, 26, 16, 0.55);
}

.soon-label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    color: rgba(36, 26, 16, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================================
   PIED DE PAGE
   ========================================================= */

.site-footer {
    background: var(--ink);
    color: var(--paper);
    padding: 40px 0 26px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(244, 234, 217, 0.14);
}

.footer-brand .wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: rgba(244, 234, 217, 0.65);
    margin-top: 4px;
    max-width: 40ch;
}

.site-footer .btn-whatsapp { flex: 0 0 auto; }

.footer-note {
    text-align: center;
    padding-top: 18px;
    font-size: 0.78rem;
    color: rgba(244, 234, 217, 0.5);
}

/* =========================================================
   PAGE PRODUIT — galerie & fiche détaillée
   ========================================================= */

.breadcrumb-bar {
    padding: 18px 0 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--card);
    border: 1px solid rgba(36, 26, 16, 0.12);
    padding: 9px 16px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.back-btn:hover {
    background: var(--paper-deep);
    transform: translateX(-3px);
}

.product-page {
    padding: 26px 0 clamp(48px, 6vw, 80px);
}

.product-detail {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(28px, 5vw, 56px);
    align-items: start;
}

.gallery-main .stitch-frame img {
    height: 420px;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.gallery-thumb {
    flex: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font: inherit;
    appearance: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

.gallery-thumb:hover { transform: translateY(-2px); }

.gallery-thumb.active {
    border-color: var(--rust);
}

.detail-info .category-tag {
    position: static;
    display: inline-block;
    margin-bottom: 14px;
}

.detail-info h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    color: var(--ink);
    margin-bottom: 12px;
}

.detail-info .price {
    font-size: 1.7rem;
    margin-bottom: 18px;
}

.detail-info .description {
    color: rgba(36, 26, 16, 0.78);
    line-height: 1.7;
    margin-bottom: 22px;
    max-width: 52ch;
}

.detail-info .hero-trust {
    margin-bottom: 26px;
}

.detail-info .btn-whatsapp {
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
    font-size: 1rem;
}

@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .gallery-main .stitch-frame img { height: 320px; }
}

@media (max-width: 560px) {
    .gallery-main .stitch-frame img { height: 250px; }

    .gallery-thumb img { height: 66px; }
}


@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-media { order: -1; }

    .hero-media .stitch-frame img { height: 300px; }

    .hero-text p { max-width: 60ch; }
}

/* =========================================================
   RESPONSIVE — Mobile
   ========================================================= */

@media (max-width: 560px) {
    .announce-bar p { font-size: 0.74rem; }

    .header-inner { padding-top: 12px; padding-bottom: 12px; gap: 12px; }

    .logo-frame { width: 48px; height: 48px; }

    .brand-text .wordmark { font-size: 1.2rem; }

    .brand-text .subline { font-size: 0.62rem; letter-spacing: 0.08em; }

    .header-cta .btn-whatsapp {
        width: 46px;
        height: 46px;
        justify-content: center;
        border-radius: 50%;
        padding: 0;
        font-size: 0;
        gap: 0;
    }

    .header-cta .btn-whatsapp i { font-size: 1.25rem; }

    .hero { padding: 26px 0 34px; }

    .hero-media .stitch-frame img { height: 240px; }

    .hero-caption { left: 14px; font-size: 0.7rem; padding: 6px 12px; }

    .tabs { justify-content: flex-start; flex-wrap: nowrap; }

    .products-grid { grid-template-columns: 1fr; gap: 18px; }

    .footer-inner { flex-direction: column; align-items: flex-start; }

    .site-footer .btn-whatsapp { width: 100%; justify-content: center; }
}
