/* ==========================================================================
   Dominex — Boutique / Market (thème Solimi navy/cyan)
   ========================================================================== */

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

:root {
    --navy: #001634;
    --navy-2: #012a62;
    --navy-3: #052850;
    --cyan: #02d9f9;
    --cyan-2: #22d3ee;
    --cyan-deep: #0891b2;
    --cyan-deeper: #0e7490;
    --cyan-100: #cffafe;
    --cyan-50: #ecfeff;
    --text: #012a62;
    --text2: #0f2a4a;
    --muted: #5b6b83;
    --border: rgba(1, 42, 98, 0.13);
    --shadow-sm: 0 2px 8px rgba(0, 22, 52, 0.06);
    --shadow: 0 10px 30px rgba(0, 22, 52, 0.10);
    --red: #dc2626;
    --green: #059669;
    --font: "Century Gothic", CenturyGothic, "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

body {
    font-family: var(--font);
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(900px 460px at 88% -10%, rgba(2, 217, 249, 0.14), transparent 60%),
        radial-gradient(700px 420px at 0% 12%, rgba(1, 42, 98, 0.08), transparent 60%),
        linear-gradient(160deg, #ffffff, #f8fafc);
}

/* ── Topbar ── */
.topbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(1, 42, 98, 0.08);
}
.topbar__inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; gap: 16px;
    padding: 12px 20px;
}
.topbar__logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; text-decoration: none; font-weight: 900; color: var(--navy); text-transform: uppercase; letter-spacing: 0.02em; }
.topbar__logo img { height: 38px; width: auto; background: #fff; border-radius: 9px; padding: 3px; box-shadow: var(--shadow-sm); }
.topbar__nav { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.topbar__nav .btn { white-space: nowrap; flex-shrink: 0; }
.user-corner { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; margin-left: 4px; }
.uc-avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #012a62, #001634); color: #fff; border: 2px solid var(--cyan); box-shadow: 0 4px 14px rgba(0, 22, 52, 0.20); overflow: hidden; text-decoration: none; }
.uc-avatar i { font-size: 1.05rem; }
.uc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.uc-action { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap; }
.uc-action:hover { color: var(--cyan-deeper); }
.uc-action i { font-size: 0.78rem; }

@media (max-width: 640px) {
    .topbar__inner { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
    .topbar__logo img { height: 32px; }
    .topbar__logo { font-size: 0.9rem; }
    .topbar__nav { width: 100%; margin-left: 0; justify-content: flex-end; gap: 8px; }
    .topbar__nav .btn { padding: 6px 11px; font-size: 0.76rem; }
}

/* ── Boutons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 12px; border: 0; cursor: pointer;
    font-family: var(--font); font-weight: 700; font-size: 0.9rem;
    text-decoration: none; transition: transform 0.15s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: linear-gradient(135deg, #012a62, #001634); color: #fff; box-shadow: 0 8px 20px rgba(0, 22, 52, 0.22); }
.btn--cyan { background: var(--cyan); color: var(--navy); }
.btn--cyan:hover { box-shadow: 0 10px 24px rgba(2, 217, 249, 0.4); }
.btn--outline { background: #fff; border: 1.5px solid var(--border); color: var(--navy-2); }
.btn--danger { background: var(--red); color: #fff; }
.btn--success { background: var(--green); color: #fff; }
.btn--sm { padding: 7px 13px; font-size: 0.8rem; border-radius: 9px; }
.btn--block { width: 100%; }

/* ── Conteneur / flash ── */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.flashes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.flash { padding: 12px 16px; border-radius: 12px; font-size: 0.86rem; font-weight: 600; border: 1px solid; }
.flash--success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.flash--danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.flash--warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.flash--info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* ── En-tête de page ── */
.page-hero { padding: 34px 0 8px; text-align: center; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; color: var(--navy); }
.page-hero p { color: var(--muted); margin-top: 6px; }
/* ── Recherche + catégories ── */
.search-bar { display: flex; gap: 10px; max-width: 560px; margin: 18px auto 8px; }
.search-bar input {
    flex: 1; padding: 12px 16px; border-radius: 12px; border: 1.5px solid var(--border);
    font-family: var(--font); font-size: 0.95rem; color: var(--text); background: #fff; outline: none;
}
.search-bar input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(2, 217, 249, 0.2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 8px; }
.chip {
    padding: 7px 14px; border-radius: 100px; border: 1px solid var(--border);
    background: #fff; color: var(--navy-2); font-size: 0.82rem; font-weight: 700;
    text-decoration: none; transition: all 0.2s;
}
.chip:hover { border-color: var(--cyan); }
.chip.active { background: var(--navy); color: var(--cyan); border-color: var(--navy); }

/* ── Grille produits / boutiques ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.product-card {
    background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-card__img { aspect-ratio: 4/3; background: var(--cyan-50); display: grid; place-items: center; overflow: hidden; }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__img .ph { font-size: 2.6rem; opacity: 0.4; }
.product-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__name { font-weight: 700; color: var(--text); font-size: 1rem; }
.product-card__shop { font-size: 0.78rem; color: var(--muted); }
.product-card__price { font-weight: 800; color: var(--navy-2); font-size: 1.05rem; margin-top: auto; }
.product-card__price .old { color: var(--muted); text-decoration: line-through; font-weight: 600; font-size: 0.85rem; margin-right: 6px; }

/* ── Carte boutique ── */
.shop-card {
    background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px;
    transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; color: inherit;
}
.shop-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.shop-card h3 { color: var(--text); font-size: 1.05rem; }
.shop-card p { color: var(--muted); font-size: 0.86rem; margin-top: 4px; }
.section-title { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin: 26px 0 14px; }

/* ── Détail produit ── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.product-detail__img { border-radius: 18px; overflow: hidden; background: var(--cyan-50); aspect-ratio: 1/1; display: grid; place-items: center; border: 1px solid var(--border); }
.product-detail__img img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__img .ph { font-size: 4rem; opacity: 0.35; }
.product-detail h1 { font-size: 1.7rem; font-weight: 800; color: var(--navy); }
.product-detail .price { font-size: 1.6rem; font-weight: 800; color: var(--navy-2); margin: 10px 0; }
.product-detail .desc { color: var(--muted); line-height: 1.6; margin-bottom: 18px; }

/* ── Formulaires ── */
.card-form { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.field label .hint { color: var(--muted); font-weight: 400; font-size: 0.78rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 13px; border-radius: 11px; border: 1.5px solid var(--border);
    font-family: var(--font); font-size: 0.95rem; color: var(--text); background: #fff; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(2, 217, 249, 0.2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Commandes ── */
.order-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.order-card h4 { color: var(--text); font-size: 0.95rem; }
.order-card .meta { color: var(--muted); font-size: 0.82rem; margin: 6px 0 12px; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 46px 20px; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); margin-top: 30px; padding: 22px; text-align: center; color: var(--muted); font-size: 0.82rem; }
.footer a { color: var(--cyan-deeper); font-weight: 600; }

@media (max-width: 720px) {
    .product-detail { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

* { touch-action: manipulation; }
