/* ==========================================================================
   StockExpress — Page d'accueil publique
   Thème : vert #0F766E. Compatible Bootstrap 5, mobile-first et RTL.
   ========================================================================== */

:root {
    --se-primary: #0F766E;
    --se-primary-dark: #134E4A;
    --se-accent: #FACC15;
    --se-ink: #0F172A;
    --se-muted: #64748B;
    --se-surface: #FFFFFF;
    --se-bg: #F8FAFC;
    --se-border: #E2E8F0;
    --se-radius: 16px;
    --se-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    --se-shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
}

.se-home h2.se-title { font-weight: 800; letter-spacing: -.4px; margin: 0; color: var(--se-ink); }
.se-home .se-section { margin: 2.75rem 0; }
.se-home .se-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.se-home .se-section-head .se-sub { color: var(--se-muted); margin: .25rem 0 0; }
.se-home .se-seeall { font-weight: 600; text-decoration: none; color: var(--se-primary); white-space: nowrap; }
.se-home .se-seeall:hover { color: var(--se-primary-dark); }

/* ---------- HERO ---------------------------------------------------------- */
.se-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    border-radius: var(--se-radius);
    margin: -.5rem 0 1rem;
    padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 56px);
    background:
        radial-gradient(1200px 400px at 80% -10%, rgba(250, 204, 21, .18), transparent 60%),
        linear-gradient(135deg, var(--se-primary) 0%, var(--se-primary-dark) 100%);
}
.se-hero::after {
    content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 22px 22px;
}
.se-hero > * { position: relative; z-index: 1; }
.se-hero h1 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; line-height: 1.12; letter-spacing: -.6px; }
.se-hero .se-lead { opacity: .92; font-size: clamp(15px, 2vw, 19px); max-width: 620px; }
/* Eyebrow */
.se-hero .se-eyebrow {
    display: inline-flex; align-items: center; gap: .45rem;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .26);
    padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
    letter-spacing: .2px; backdrop-filter: blur(4px);
}
.se-hero .se-eyebrow i { color: var(--se-accent); }

/* CTAs hero */
.se-hero-cta { display: flex; flex-wrap: wrap; gap: .65rem; }
.se-hero-cta .btn { border-radius: 12px; font-weight: 700; padding: .7rem 1.3rem;
    transition: transform .15s ease, box-shadow .18s ease, background .18s ease, color .18s ease; }
.se-hero-cta .btn:hover { transform: translateY(-2px); }
.se-cta-primary { background: #fff; color: var(--se-primary); border: none; box-shadow: var(--se-shadow-sm); }
.se-cta-primary:hover { background: #fff; color: var(--se-primary-dark); box-shadow: var(--se-shadow); }
.se-cta-ghost { background: rgba(255, 255, 255, .10); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.se-cta-ghost:hover { background: rgba(255, 255, 255, .20); color: #fff; }

/* Mini cartes de confiance (colonne droite) */
.se-trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .85rem; }
.se-trust-card {
    display: flex; flex-direction: column; gap: .12rem; text-decoration: none;
    background: rgba(255, 255, 255, .97); color: var(--se-ink);
    border-radius: 16px; padding: 1.15rem 1rem; box-shadow: var(--se-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, color .18s ease;
}
a.se-trust-card:hover { transform: translateY(-3px); box-shadow: var(--se-shadow); color: var(--se-primary); }
.se-trust-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: #ecfdf5; color: var(--se-primary); font-size: 1.15rem; margin-bottom: .55rem; }
.se-trust-ico.urgent { background: #fef2f2; color: #DC2626; }
.se-trust-tt { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.se-trust-sub { font-size: .78rem; color: var(--se-muted); }

/* Recherche avancée (hero — scopé .se-hero pour ne pas entrer en collision avec le header) */
.se-hero .se-search {
    background: rgba(255, 255, 255, .97); border-radius: var(--se-radius);
    padding: .55rem; box-shadow: var(--se-shadow); max-width: 760px;
}
.se-hero .se-search .form-control, .se-hero .se-search .form-select { border: 1px solid var(--se-border); border-radius: 12px; height: 52px; }
.se-hero .se-search .form-control:focus, .se-hero .se-search .form-select:focus { border-color: var(--se-primary); box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .15); }
.se-hero .se-search-ico { position: absolute; top: 50%; inset-inline-start: 1rem; transform: translateY(-50%); color: var(--se-muted); pointer-events: none; z-index: 2; }
.se-hero .se-search-input { padding-inline-start: 2.5rem !important; }
.se-hero .se-search .btn-search { background: var(--se-primary); color: #fff; font-weight: 700; border: none; border-radius: 12px; height: 52px; transition: background .18s ease, transform .15s ease; }
.se-hero .se-search .btn-search:hover { background: var(--se-primary-dark); transform: translateY(-1px); }
.se-suggests { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.se-suggests-label { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; opacity: .9; }
.se-suggests-label i { color: var(--se-accent); }
.se-suggests a {
    font-size: .82rem; text-decoration: none; color: #fff;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28);
    padding: .3rem .75rem; border-radius: 999px; transition: background .15s ease, transform .15s ease;
}
.se-suggests a:hover { background: rgba(255, 255, 255, .26); transform: translateY(-1px); }

/* autocomplete dropdown */
.se-ac-wrap { position: relative; }
.se-ac {
    position: absolute; top: calc(100% + 4px); inset-inline: 0; z-index: 30;
    background: #fff; border: 1px solid var(--se-border); border-radius: 12px;
    box-shadow: var(--se-shadow); overflow: hidden; display: none;
}
.se-ac.show { display: block; }
.se-ac a { display: block; padding: .55rem .9rem; color: var(--se-ink); text-decoration: none; font-size: .9rem; }
.se-ac a:hover, .se-ac a.active { background: var(--se-bg); color: var(--se-primary); }

/* Statistiques commerciales (bande pleine largeur) */
.se-stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; margin-top: clamp(24px, 3vw, 38px); }
.se-stat { background: rgba(255, 255, 255, .97); color: var(--se-ink); border-radius: 14px; padding: 1.1rem .75rem; text-align: center; box-shadow: var(--se-shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.se-stat:hover { transform: translateY(-2px); box-shadow: var(--se-shadow); }
.se-stat .num { font-size: clamp(22px, 3vw, 32px); font-weight: 800; color: var(--se-primary); line-height: 1; font-variant-numeric: tabular-nums; }
.se-stat .lbl { font-size: .8rem; color: var(--se-muted); margin-top: .4rem; }
@media (max-width: 767.98px) { .se-stats-bar { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Accessibilité : focus visible + reduced motion --------------- */
.se-hero a:focus-visible, .se-hero button:focus-visible,
.se-hero .form-control:focus-visible, .se-hero .form-select:focus-visible,
.se-trust-card:focus-visible {
    outline: 3px solid #fff; outline-offset: 2px; border-radius: 10px;
}
.se-cta-primary:focus-visible { outline-color: var(--se-primary-dark); }
/* Cartes & liens sur fond clair : anneau vert */
.se-cat:focus-visible, .se-pcard:focus-visible, .se-supcard:focus-visible,
.se-feature:focus-visible, .se-seeall:focus-visible {
    outline: 3px solid var(--se-primary); outline-offset: 2px; border-radius: 14px;
}
/* Chiffres tabulaires : prix, compteurs */
.se-pcard .se-price, .se-pcard .se-old, .se-cat-count { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
    .se-home *, .se-hero * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    .se-pcard:hover, .se-cat:hover, .se-trust-card:hover, .se-stat:hover, .se-feature:hover,
    .se-supcard:hover, .se-hero-cta .btn:hover, .se-suggests a:hover, .se-hero .se-search .btn-search:hover { transform: none !important; }
}

/* ---------- CATÉGORIES ---------------------------------------------------- */
.se-cat {
    display: block; text-decoration: none; color: var(--se-ink); height: 100%;
    background: #fff; border: 1px solid var(--se-border); border-radius: 14px;
    padding: 1.1rem .75rem; text-align: center; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.se-cat:hover { transform: translateY(-3px); box-shadow: var(--se-shadow); border-color: var(--se-primary); color: var(--se-primary); }
.se-cat .se-cat-ico {
    width: 56px; height: 56px; margin: 0 auto .6rem; border-radius: 50%;
    display: grid; place-items: center; font-size: 26px; background: #ecfdf5; color: var(--se-primary);
    background-size: cover; background-position: center;
}
.se-cat strong { display: block; font-size: .92rem; line-height: 1.2; }
.se-cat .se-cat-meta { font-size: .76rem; color: var(--se-muted); margin-top: .25rem; }
.se-cat .se-cat-count { display: inline-block; margin-top: .4rem; font-size: .72rem; font-weight: 700; color: var(--se-primary); background: #ecfdf5; padding: .1rem .5rem; border-radius: 999px; }

/* ---------- CARTE PRODUIT ------------------------------------------------- */
.se-pcard {
    display: flex; flex-direction: column; height: 100%; background: #fff;
    border: 1px solid var(--se-border); border-radius: 14px; overflow: hidden;
    text-decoration: none; color: var(--se-ink); transition: transform .18s, box-shadow .18s;
}
.se-pcard:hover { transform: translateY(-3px); box-shadow: var(--se-shadow); }
.se-pcard .se-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--se-bg); overflow: hidden; }
.se-pcard .se-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.se-pcard .se-thumb .se-noimg { width: 100%; height: 100%; display: grid; place-items: center; color: #94A3B8; font-size: 1.6rem; }
.se-pcard .se-flags { position: absolute; top: .5rem; inset-inline-start: .5rem; display: flex; flex-direction: column; gap: .3rem; }
.se-pcard .se-flag { font-size: .68rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; color: #fff; }
.se-flag.urgent { background: #DC2626; }
.se-flag.featured { background: var(--se-accent); color: #1f2937; }
.se-flag.discount { position: absolute; top: .5rem; inset-inline-end: .5rem; background: #16A34A; }
.se-pcard .se-body { padding: .7rem .8rem .85rem; display: flex; flex-direction: column; flex: 1; }
.se-pcard .se-supplier { font-size: .72rem; color: var(--se-muted); display: flex; align-items: center; gap: .25rem; }
.se-pcard .se-supplier i { color: var(--se-primary); }
.se-pcard .se-pname { font-size: .9rem; font-weight: 600; line-height: 1.25; margin: .25rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.se-pcard .se-meta { font-size: .74rem; color: var(--se-muted); margin-bottom: .4rem; }
.se-pcard .se-price-row { margin-top: auto; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.se-pcard .se-price { font-size: 1.05rem; font-weight: 800; color: var(--se-primary); }
.se-pcard .se-old { font-size: .8rem; color: #94A3B8; text-decoration: line-through; }
.se-pcard .se-moq { font-size: .72rem; color: var(--se-muted); margin-top: .25rem; }

/* ---------- FOURNISSEURS -------------------------------------------------- */
.se-supcard {
    display: flex; align-items: center; gap: .85rem; height: 100%;
    background: #fff; border: 1px solid var(--se-border); border-radius: 14px; padding: 1rem;
    text-decoration: none; color: var(--se-ink); transition: transform .18s, box-shadow .18s;
}
.se-supcard:hover { transform: translateY(-3px); box-shadow: var(--se-shadow); }
.se-supcard .se-suplogo { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #ecfdf5; display: grid; place-items: center; color: var(--se-primary); font-weight: 800; flex: none; }
.se-supcard .se-supname { font-weight: 700; line-height: 1.2; }
.se-supcard .se-supmeta { font-size: .78rem; color: var(--se-muted); }
.se-supcard .se-verified { color: var(--se-primary); font-size: .76rem; font-weight: 700; }

/* ---------- POURQUOI / FEATURES ------------------------------------------- */
.se-feature { height: 100%; background: #fff; border: 1px solid var(--se-border); border-radius: 14px; padding: 1.4rem; transition: transform .18s, box-shadow .18s; }
.se-feature:hover { transform: translateY(-3px); box-shadow: var(--se-shadow); }
.se-feature .se-fico { width: 48px; height: 48px; border-radius: 12px; background: #ecfdf5; color: var(--se-primary); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: .8rem; }
.se-feature h3 { font-size: 1rem; font-weight: 700; }
.se-feature p { font-size: .86rem; color: var(--se-muted); margin: 0; }

/* ---------- COMMENT ÇA MARCHE --------------------------------------------- */
.se-steps { list-style: none; margin: 0; padding: 0; }
.se-steps li { display: flex; gap: .85rem; padding: .55rem 0; }
.se-step-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--se-primary); color: #fff; font-weight: 800; display: grid; place-items: center; }

/* ---------- SECTION VENDEUR + bandeaux ------------------------------------ */
.se-band { border-radius: var(--se-radius); padding: clamp(28px, 4vw, 48px); }
.se-band.seller { background: linear-gradient(135deg, #0F766E 0%, #115E59 100%); color: #fff; }
.se-band.cta { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); border: 1px solid #a7f3d0; text-align: center; }
.se-band .se-adv { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.se-band .se-adv li { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.se-band .se-adv i { color: var(--se-accent); }

/* ---------- PAIEMENTS / SÉCURITÉ ------------------------------------------ */
.se-pay { display: flex; flex-wrap: wrap; gap: .6rem; }
.se-pay .se-pay-item { display: inline-flex; align-items: center; gap: .45rem; background: #fff; border: 1px solid var(--se-border); border-radius: 10px; padding: .5rem .8rem; font-size: .84rem; font-weight: 600; }
.se-pay .se-pay-item img { height: 22px; }

/* ---------- DIVERS -------------------------------------------------------- */
.se-empty { text-align: center; color: var(--se-muted); background: #fff; border: 1px dashed var(--se-border); border-radius: 14px; padding: 2rem; }

/* ---------- RTL ----------------------------------------------------------- */
[dir="rtl"] .se-pcard .se-supplier,
[dir="rtl"] .se-band .se-adv li,
[dir="rtl"] .se-steps li { text-align: right; }
[dir="rtl"] .se-hero .se-lead { margin-inline-start: 0; }
