/* ════════════════════════════════════════════════════════════════
   SUFFAYA — base.css
   Fichier 1/14 — Fondations globales
   Contenu : Reset · Variables · Polices · Body · Icônes · Utilitaires
   Chargé en PREMIER sur toutes les pages (avant tout autre CSS)
   ════════════════════════════════════════════════════════════════ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1. RESET UNIVERSEL
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   2. VARIABLES CSS GLOBALES
   Toutes les couleurs, tailles et espacements du site
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
    /* ── Couleurs principales ── */
    --acc:          #6366f1;       /* Violet principal (boutons, liens actifs) */
    --acc-d:        #4f46e5;       /* Violet foncé (hover) */
    --acc2:         #818cf8;       /* Violet clair (textes accentués) */
    --acc-glow:     rgba(99,102,241,.15);

    /* ── Or / Prix ── */
    --gold:         #f59e0b;
    --gold-d:       #d97706;
    --gold-glow:    rgba(245,158,11,.12);

    /* ── États ── */
    --ok:           #22c55e;       /* Succès / En stock */
    --err:          #ef4444;       /* Erreur / Rupture */
    --warn:         #f59e0b;       /* Avertissement */

    /* ── Fonds (mode sombre par défaut) ── */
    --bg:           #07090f;       /* Fond le plus sombre (body) */
    --sur:          #0d1117;       /* Surface secondaire */
    --card:         #111820;       /* Fond des cartes */
    --card-h:       #15202e;       /* Fond des cartes au hover */
    --hdr:          rgba(7,9,15,.88); /* Header avec flou */

    /* ── Bordures ── */
    --brd:          #1a2740;
    --brd-h:        #263650;       /* Bordure au hover */

    /* ── Textes ── */
    --tx:           #f1f5f9;       /* Texte principal */
    --tx2:          #cbd5e1;       /* Texte secondaire */
    --mu:           #64748b;       /* Texte muet */
    --mu2:          #475569;       /* Texte très muet */

    /* ── Typographie ── */
    --font:         'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'Poppins', 'Plus Jakarta Sans', var(--font);

    /* ── Dimensions ── */
    --radius:       12px;
    --radius-lg:    16px;
    --radius-sm:    8px;
    --container:    1560px;

    /* ── Ombres ── */
    --shadow:       0 4px 24px rgba(0,0,0,.4);
    --shadow-lg:    0 12px 48px rgba(0,0,0,.55);

    /* ── Transitions ── */
    --trans:        cubic-bezier(.4,0,.2,1);
    --transition:   all .2s ease;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   3. POLICES AUTO-HÉBERGÉES
   Aucune dépendance à Google Fonts
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Plus Jakarta Sans (police principale) ── */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/assets/fonts/plus-jakarta-sans-400.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/assets/fonts/plus-jakarta-sans-500.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/assets/fonts/plus-jakarta-sans-600.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/assets/fonts/plus-jakarta-sans-700.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/assets/fonts/plus-jakarta-sans-800.woff2') format('woff2');
    font-weight: 800; font-style: normal; font-display: swap;
}

/* ── Poppins (auth, panier, checkout) ── */
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-400.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-500.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-600.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-700.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-800.woff2') format('woff2');
    font-weight: 800; font-style: normal; font-display: swap;
}

/* ── Space Mono (codes commandes, références — non utilisé pour les prix) ── */
@font-face {
    font-family: 'Space Mono';
    src: url('/assets/fonts/space-mono-400.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Space Mono';
    src: url('/assets/fonts/space-mono-700.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   4. BASE HTML & BODY
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    color: var(--tx);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── Images — règle de base ── */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── SVG inline dans les cercles catégories — taille fixe ── */
.csc-circle > svg {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    flex-shrink: 0 !important;
    display: block !important;
}

/* ── Correction CRITIQUE : empêche les icônes SVG de s'agrandir ── */
img[src*="/assets/icons/"] {
    display: inline-block;
    width: 20px;
    height: 20px;
    max-width: 20px !important;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ── Liens ── */
a {
    color: var(--acc);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: var(--acc-d); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   5. GRILLE PRINCIPALE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}
.container-md {
    max-width: var(--container);
    margin: 0 auto;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   6. CLASSES D'ICÔNES SVG
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Icône inline générique */
.ico {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Icône de navigation (header, drawer) */
.nav-icon {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    max-width: none !important;
}

/* Icône de statistique (dashboard) */
.stat-icon {
    display: block;
    width: 1.6rem;
    height: 1.6rem;
    flex-shrink: 0;
    max-width: none !important;
}

/* Icône dans un bouton */
.btn-icon {
    display: inline-block;
    width: .9rem;
    height: .9rem;
    vertical-align: middle;
    margin-right: 4px;
    flex-shrink: 0;
    max-width: none !important;
}

/* Icône d'alerte / info */
.alert-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
    max-width: none !important;
}

/* Icône footer / petite */
.f-icon {
    display: inline-block;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    max-width: none !important;
}

/* ── Étoiles de notation ── */
.star-full  { color: #f59e0b; }
.star-empty { color: #334155; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   7. BOUTONS GLOBAUX
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .88rem;
    font-family: var(--font);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--acc);
    color: #fff;
}
.btn-primary:hover {
    background: var(--acc-d);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,.35);
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--brd);
    color: var(--tx2);
}
.btn-outline:hover {
    border-color: var(--acc);
    color: var(--acc2);
    background: var(--acc-glow);
}
.btn-danger {
    background: rgba(239,68,68,.1);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,.25);
}
.btn-danger:hover { background: rgba(239,68,68,.2); }

.btn-sm  { padding: 7px 14px; font-size: .78rem; border-radius: var(--radius-sm); }
.btn-lg  { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   8. MESSAGES FLASH (succès / erreur)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.flash-success {
    background: rgba(34,197,94,.08);
    border-bottom: 2px solid var(--ok);
    color: #86efac;
    padding: 12px 20px;
    text-align: center;
    font-size: .875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.flash-error {
    background: rgba(239,68,68,.08);
    border-bottom: 2px solid var(--err);
    color: #fca5a5;
    padding: 12px 20px;
    text-align: center;
    font-size: .875rem;
}
.flash-warn {
    background: rgba(245,158,11,.08);
    border-bottom: 2px solid var(--warn);
    color: #fde68a;
    padding: 12px 20px;
    text-align: center;
    font-size: .875rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   9. UTILITAIRES GLOBAUX
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Responsive — afficher/cacher selon la taille d'écran */
.mobile-only  { display: block; }
.desktop-only { display: none !important; }

@media (min-width: 768px) {
    .mobile-only  { display: none !important; }
    .desktop-only { display: block !important; }
}
/* Restaurer le flex sur les éléments flex en desktop */
@media (min-width: 768px) {
    a.desktop-only.shop-action-btn,
    button.desktop-only.shop-action-btn { display: flex !important; }
}

/* Scrollbar invisible */
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* Animation d'apparition au scroll */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity .5s var(--trans), transform .5s var(--trans);
}
.reveal.animate {
    opacity: 0;
    transform: translateY(18px);
}
.reveal.animate.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .07s; }
.reveal-delay-2 { transition-delay: .14s; }
.reveal-delay-3 { transition-delay: .21s; }
.reveal-delay-4 { transition-delay: .28s; }

/* Contenu principal (min-height pour éviter footer collé) */
.shop-main { min-height: 60vh; }

/* Prix en monospace */
.price-mono { font-family: var(--font-mono); }
