/* =====================================================================
   MARKET — Feuille de styles principale
   Direction : éditorial chaud, encre profonde + accent corail/ambre.
   Typo : Fraunces (display) + Outfit (texte).
   ===================================================================== */

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

:root {
    --ink:        #14110f;
    --ink-soft:   #3a322c;
    --paper:      #faf6f0;
    --paper-2:    #f3ece2;
    --line:       #e4d9c9;
    --accent:     #e8552b;     /* corail brûlé */
    --accent-2:   #f0a830;     /* ambre */
    --accent-ink: #b23d18;
    --green:      #2f7d52;
    --radius:     14px;
    --radius-lg:  22px;
    --shadow:     0 1px 2px rgba(20,17,15,.06), 0 8px 28px -12px rgba(20,17,15,.18);
    --shadow-lg:  0 20px 60px -20px rgba(20,17,15,.35);
    --font-body:  'Outfit', system-ui, sans-serif;
    --font-disp:  'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1120px, 92vw); margin-inline: auto; }
.wrap-sm { width: min(560px, 92vw); margin-inline: auto; }

/* ---------- Typographie ---------- */
h1, h2, h3 { font-family: var(--font-disp); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.3rem; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }
.eyebrow {
    font-size: .78rem; font-weight: 600; letter-spacing: .18em;
    text-transform: uppercase; color: var(--accent-ink);
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-body); font-weight: 600; font-size: 1rem;
    padding: .8rem 1.5rem; border-radius: 100px; border: 2px solid var(--ink);
    background: var(--ink); color: var(--paper); cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; border-width: 1.5px; }
.btn-danger { background: #c0392b; border-color: #c0392b; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(250,246,240,.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { font-family: var(--font-disp); font-weight: 700; font-size: 1.5rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink-soft); font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 7rem) 0; position: relative; overflow: hidden; }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 50% at 85% 0%, rgba(240,168,48,.20), transparent 70%),
        radial-gradient(50% 60% at 0% 100%, rgba(232,85,43,.14), transparent 70%);
}
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 52ch; margin-top: 1.4rem; }
.hero-cta { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.4rem;
    background: #fff; border: 1px solid var(--line); padding: .4rem .9rem;
    border-radius: 100px; font-size: .85rem; font-weight: 500; box-shadow: var(--shadow);
}
.hero-badge b { color: var(--accent-ink); }

/* ---------- Sections ---------- */
section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section-head { max-width: 60ch; margin-bottom: 2.5rem; }
.section-head p { margin-top: .8rem; }

/* ---------- Grilles de features ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.8rem; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ico {
    width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; margin-bottom: 1rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); }

/* ---------- Bandeau de stats ---------- */
.stats-band { background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: 2.5rem; }
.stats-band .grid-3 { gap: 1rem; }
.stat { text-align: center; }
.stat .num { font-family: var(--font-disp); font-size: 2.6rem; font-weight: 700; color: var(--accent-2); }
.stat .lbl { color: #cbbfae; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cbbfae; padding: 3rem 0 2rem; margin-top: 4rem; }
.site-footer a { color: #e9dccb; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .8rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .5rem; }
.foot-legal { border-top: 1px solid #2a2521; margin-top: 2rem; padding-top: 1.5rem; font-size: .85rem; }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; }
.field .hint { font-size: .82rem; color: var(--ink-soft); margin-top: .3rem; }
.input, .textarea, .select {
    width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
    padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius);
    background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,85,43,.15);
}
.textarea { min-height: 120px; resize: vertical; }

/* ---------- Cartes d'auth ---------- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem 0;
    background: radial-gradient(60% 50% at 50% 0%, rgba(240,168,48,.18), transparent 70%), var(--paper); }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 2.5rem; box-shadow: var(--shadow-lg); width: min(440px, 92vw); }
.auth-card h1 { font-size: 2rem; margin-bottom: .3rem; }
.auth-card .sub { color: var(--ink-soft); margin-bottom: 1.8rem; }

/* ---------- Alertes ---------- */
.alert { padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.2rem; font-weight: 500; }
.alert-error { background: #fdecea; color: #a4291a; border: 1px solid #f3c7c0; }
.alert-success { background: #e8f5ee; color: #1f6b41; border: 1px solid #bfe3cd; }
.alert ul { margin-left: 1.2rem; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
@media (max-width: 860px) { .dash { grid-template-columns: 1fr; } }
.dash-side { background: var(--ink); color: var(--paper); padding: 1.6rem 1.2rem; }
.dash-side .brand { color: var(--paper); display: block; margin-bottom: 2rem; }
.dash-nav a { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-radius: 10px;
    color: #cbbfae; font-weight: 500; margin-bottom: .25rem; }
.dash-nav a:hover, .dash-nav a.active { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.dash-main { padding: clamp(1.4rem, 3vw, 2.6rem); background: var(--paper); }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 860px) { .kpi-grid { grid-template-columns: repeat(2,1fr); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.kpi .lbl { font-size: .82rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.kpi .val { font-family: var(--font-disp); font-size: 1.9rem; font-weight: 700; margin-top: .3rem; }

/* ---------- Tableaux ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); font-size: .94rem; }
.table th { background: var(--paper-2); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: .2rem .65rem; border-radius: 100px; font-size: .78rem; font-weight: 600; }
.badge-paid { background: #e0f0e7; color: var(--green); }
.badge-pending { background: #fdf0d9; color: #9a6a12; }
.badge-failed { background: #fbe3e0; color: #b23d18; }
.badge-draft { background: var(--paper-2); color: var(--ink-soft); }

/* ---------- Storefront ---------- */
.store-hero { padding: 3rem 0 2rem; }
.store-cover { height: 200px; border-radius: var(--radius-lg); background: var(--paper-2) center/cover; margin-bottom: -50px; border: 1px solid var(--line); }
.store-logo { width: 92px; height: 92px; border-radius: 20px; background: #fff center/cover; border: 3px solid #fff; box-shadow: var(--shadow); object-fit: cover; }
.product-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.4rem; }
@media (max-width: 860px) { .product-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .product-grid { grid-template-columns: 1fr; } }
.product-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius-lg); overflow:hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; display:flex; flex-direction:column; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card .thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--accent-2), var(--accent)) center/cover; }
.product-card .body { padding: 1.1rem 1.2rem 1.3rem; display:flex; flex-direction:column; gap:.5rem; flex:1; }
.product-card .price { font-family: var(--font-disp); font-size: 1.3rem; font-weight: 700; color: var(--accent-ink); }
.product-card .compare { text-decoration: line-through; color: var(--ink-soft); font-size: .9rem; margin-left:.4rem; }

.product-detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail .cover { aspect-ratio: 4/3; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--accent-2), var(--accent)) center/cover; border:1px solid var(--line); }
.buy-box { background:#fff; border:1px solid var(--line); border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: var(--shadow); position: sticky; top: 90px; }
.buy-box .price { font-family: var(--font-disp); font-size: 2.4rem; font-weight: 700; color: var(--accent-ink); }

/* ---------- Simulation paiement (téléphone) ---------- */
.phone-sim { max-width: 380px; margin: 2rem auto; background: var(--ink); border-radius: 36px; padding: 14px; box-shadow: var(--shadow-lg); }
.phone-screen { background: var(--paper); border-radius: 26px; padding: 1.8rem 1.4rem; text-align: center; }
.phone-screen .op-logo { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); margin: 0 auto 1rem; display:grid; place-items:center; color:#fff; font-weight:700; font-size:1.4rem; }
.phone-amount { font-family: var(--font-disp); font-size: 2.4rem; font-weight: 700; margin: .6rem 0; }
.phone-actions { display:flex; gap:.7rem; margin-top: 1.4rem; }

/* ---------- Divers ---------- */
.tag-pills { display:flex; flex-wrap:wrap; gap:.5rem; }
.pill { background: var(--paper-2); border:1px solid var(--line); padding:.35rem .8rem; border-radius:100px; font-size:.85rem; }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}
.text-center{text-align:center}.muted{color:var(--ink-soft)}
.flex{display:flex}.flex-between{display:flex;justify-content:space-between;align-items:center}
.gap-1{gap:.5rem}.gap-2{gap:1rem}.wrap-flex{flex-wrap:wrap}
.divider{height:1px;background:var(--line);margin:1.5rem 0}

/* Animation d'entrée */
@keyframes rise { from { opacity:0; transform: translateY(18px);} to { opacity:1; transform:none; } }
.rise { animation: rise .6s cubic-bezier(.2,.7,.3,1) both; }
.rise-2 { animation-delay:.08s } .rise-3 { animation-delay:.16s } .rise-4{animation-delay:.24s}
