/* Boutique Atlético — couleurs du logo : rouge, blanc, bleu roi, bleu nuit, or */
:root {
    --red: #e3141b;
    --red-dark: #b40d13;
    --blue: #1e3fae;
    --navy: #0a1640;
    --gold: #f6b400;
    --gold-soft: #fff4d1;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f6f7fb;
    --radius: 14px;
    --shadow: 0 6px 22px rgba(10, 22, 64, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Cairo', system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Barre d'annonce ---------- */
.announce {
    background: var(--navy);
    color: #fff;
    text-align: center;
    font-size: 14px;
    padding: 8px 12px;
    border-bottom: 3px solid var(--red);
}
.announce b { color: var(--gold); }

/* ---------- En-tête ---------- */
.header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}
.header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 70px;
}
.header .logo img { height: 56px; width: 56px; border-radius: 50%; object-fit: cover; }
.header .side { display: flex; align-items: center; gap: 14px; }
.header .side.end { justify-content: flex-end; }
.icon-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 0; cursor: pointer; color: var(--navy);
    font-weight: 700; font-size: 15px; padding: 6px;
}
.icon-btn svg { width: 22px; height: 22px; }
.cart-btn { position: relative; }
.cart-badge {
    position: absolute; top: -2px; left: -4px;
    background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
    min-width: 19px; height: 19px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.search-bar { display: none; background: #fff; border-top: 1px solid var(--line); padding: 10px 0; }
.search-bar.open { display: block; }
.search-bar form { display: flex; gap: 8px; }
.search-bar input { flex: 1; }

/* Menu latéral */
.drawer-bg { position: fixed; inset: 0; background: rgba(10, 22, 64, .5); z-index: 90; display: none; }
.drawer {
    position: fixed; top: 0; right: -300px; width: 280px; height: 100%;
    background: #fff; z-index: 100; transition: right .25s; overflow-y: auto;
}
.drawer.open { right: 0; }
.drawer.open + .drawer-bg { display: block; }
.drawer-head { background: var(--navy); color: #fff; padding: 18px; display: flex; align-items: center; gap: 10px; }
.drawer-head img { width: 46px; height: 46px; border-radius: 50%; }
.drawer a { display: block; padding: 13px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer a:hover { background: var(--gold-soft); color: var(--red); }

/* ---------- Hero ---------- */
.hero {
    background:
        repeating-linear-gradient(90deg, rgba(227, 20, 27, .10) 0 28px, transparent 28px 56px),
        radial-gradient(circle at 50% 0%, #20358f 0%, var(--navy) 70%);
    color: #fff;
    text-align: center;
    padding: 34px 16px 40px;
    border-bottom: 5px solid var(--gold);
}
.hero img { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 14px; box-shadow: 0 0 0 5px rgba(246, 180, 0, .35), 0 12px 30px rgba(0, 0, 0, .4); }
.hero h1 { margin: 0 0 6px; font-size: clamp(22px, 4vw, 34px); font-weight: 800; }
.hero h1 span { color: var(--gold); }
.hero p { margin: 0 auto; max-width: 640px; color: #dbe3ff; font-size: 16px; }
.hero .trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero .trust span {
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 30px; padding: 5px 14px; font-size: 13px; font-weight: 600;
}

/* ---------- Catégories ---------- */
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 14px; font-size: 21px; font-weight: 800; color: var(--navy); }
.section-title::before { content: ""; width: 6px; height: 26px; border-radius: 3px; background: linear-gradient(var(--red), var(--blue)); }
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
    flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
    background: #fff; border: 2px solid var(--line); border-radius: 12px;
    padding: 8px 16px 8px 10px; font-weight: 700; white-space: nowrap; transition: .15s;
}
.cat img, .cat .dot { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--gold-soft); }
.cat .dot { display: flex; align-items: center; justify-content: center; color: var(--red); font-size: 18px; }
.cat:hover { border-color: var(--blue); }
.cat.active { border-color: var(--red); background: var(--red); color: #fff; }

/* ---------- Cartes produits ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }

.card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line); display: flex; flex-direction: column;
    transition: transform .15s, box-shadow .15s; position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 1/1; background: #f1f3f9; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.05); }
.card .badge {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    background: var(--gold); color: var(--navy); font-weight: 800; font-size: 13px;
    padding: 2px 10px; border-radius: 20px;
    direction: ltr; unicode-bidi: isolate;
}
.card .badge.out { background: var(--navy); color: #fff; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.card h3 {
    margin: 0 0 8px; font-size: 15px; font-weight: 700; text-align: center;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 48px;
}
.card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { color: var(--red); font-weight: 800; font-size: 18px; white-space: nowrap; }
.old { color: var(--muted); text-decoration: line-through; font-size: 13px; display: block; }
.add-btn {
    width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.card:hover .add-btn { background: var(--red); }
.add-btn svg { width: 20px; height: 20px; }

/* ---------- Boutons / formulaires ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; cursor: pointer; border-radius: 12px; padding: 12px 20px;
    font-weight: 800; font-size: 16px; transition: .15s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--navy); }
.btn-outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.btn-block { width: 100%; }
.input, select.input, textarea.input {
    width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
    padding: 11px 12px; background: #fff; color: var(--ink); outline: none;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 63, 174, .12); }
.input.is-invalid { border-color: var(--red); }
.err { color: var(--red); font-size: 13px; margin-top: 3px; }
.alert { padding: 12px 14px; border-radius: 10px; margin: 14px 0; font-weight: 600; }
.alert-ok { background: #e7f8ee; color: #136c39; }
.alert-err { background: #fde8e8; color: var(--red-dark); }

/* ---------- Fiche produit ---------- */
.product-page { display: grid; gap: 24px; padding: 24px 0; }
@media (min-width: 900px) { .product-page { grid-template-columns: 1fr 1fr; align-items: start; } }
.gallery .main { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1/1; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery .thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; }
.gallery .thumbs img.active { border-color: var(--red); }
@media (min-width: 900px) { .gallery { position: sticky; top: 90px; } }

.p-info h1 { font-size: 24px; margin: 0 0 6px; color: var(--navy); }
.p-info .desc { color: #374151; white-space: pre-line; margin: 0 0 10px; }
.p-price { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 14px; }
.p-price .price { font-size: 28px; }
.p-price .old { display: inline; font-size: 17px; }
.p-price .save { background: var(--gold); color: var(--navy); font-weight: 800; border-radius: 20px; padding: 1px 10px; font-size: 14px; }

.order-box {
    background: #fff; border: 2px solid var(--red); border-radius: 16px; padding: 16px;
    box-shadow: 0 10px 30px rgba(227, 20, 27, .08);
}
.order-box h2 { margin: 0 0 12px; font-size: 18px; text-align: center; color: var(--navy); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label {
    min-width: 48px; text-align: center; padding: 7px 12px; margin: 0;
    border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 700; background: #fff;
}
.choices input:checked + label { border-color: var(--red); background: var(--red); color: #fff; }

.delivery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.delivery input { position: absolute; opacity: 0; pointer-events: none; }
.delivery label {
    border: 2px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; margin: 0;
    display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 14px;
}
.delivery label b { color: var(--blue); font-size: 15px; }
.delivery input:checked + label { border-color: var(--blue); background: #eef2ff; }

.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.qty button { width: 42px; height: 46px; border: 0; background: #f3f4f6; font-size: 20px; font-weight: 800; cursor: pointer; color: var(--navy); }
.qty input { width: 48px; height: 46px; border: 0; text-align: center; font-weight: 800; font-size: 17px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.buy-row .btn { flex: 1; height: 50px; }

.summary { background: var(--gold-soft); border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-size: 15px; }
.summary .line { display: flex; justify-content: space-between; padding: 3px 0; }
.summary .total { border-top: 2px dashed #e6c766; margin-top: 6px; padding-top: 8px; font-weight: 800; font-size: 18px; color: var(--red); }

/* ---------- Panier ---------- */
.cart-page { display: grid; gap: 20px; padding: 24px 0; }
@media (min-width: 900px) { .cart-page { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.panel { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 16px; }
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.cart-line .info { flex: 1; }
.cart-line .info b { display: block; }
.cart-line .meta { color: var(--muted); font-size: 13px; }
.cart-line form { display: inline; }
.link-del { background: none; border: 0; color: var(--red); cursor: pointer; font-size: 13px; font-weight: 700; padding: 0; }
.empty { text-align: center; padding: 50px 10px; color: var(--muted); }

/* ---------- Merci ---------- */
.thanks { max-width: 620px; margin: 30px auto; text-align: center; }
.thanks .check { width: 80px; height: 80px; border-radius: 50%; background: #16a34a; color: #fff; font-size: 44px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.thanks .num { display: inline-block; background: var(--navy); color: var(--gold); font-weight: 800; border-radius: 10px; padding: 4px 14px; letter-spacing: 1px; }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin: 26px 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); font-weight: 700; padding: 0 10px; }
.pager .current { background: var(--red); color: #fff; border-color: var(--red); }
.pager .disabled { opacity: .4; }

/* ---------- Pied de page ---------- */
.footer { background: var(--navy); color: #cbd5ff; margin-top: 40px; border-top: 5px solid var(--red); }
.footer .container { padding-top: 28px; padding-bottom: 20px; display: grid; gap: 22px; }
@media (min-width: 800px) { .footer .container { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { color: var(--gold); margin: 0 0 10px; }
.footer a { display: block; padding: 2px 0; }
.footer a:hover { color: #fff; }
.footer .brand { display: flex; gap: 12px; align-items: center; }
.footer .brand img { width: 64px; height: 64px; border-radius: 50%; }
.footer .socials { display: flex; gap: 10px; margin-top: 10px; }
.footer .socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; }
.footer .socials svg { width: 18px; height: 18px; fill: #fff; }
.copy { text-align: center; font-size: 13px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .12); }

/* WhatsApp flottant */
.wa-float {
    position: fixed; bottom: 18px; left: 18px; z-index: 80;
    width: 56px; height: 56px; border-radius: 50%; background: #25d366;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* Barre d'achat collante (mobile) */
.sticky-buy { display: none; }
@media (max-width: 899px) {
    .sticky-buy {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
        background: #fff; padding: 10px 14px; box-shadow: 0 -4px 16px rgba(0, 0, 0, .1);
        align-items: center; gap: 12px;
    }
    .sticky-buy.hide { display: none; }
    .sticky-buy .btn { flex: 1; }
    body.has-sticky .wa-float { bottom: 84px; }
}
