/* ================================================================
   DAR CHAKAF — SITE FEATURES CSS
   Boutons wishlist/comparateur sur les cards, toast, floating bars,
   header icons badges. S'appuie sur les variables --gold/--bg-panel
   etc déjà définies dans le <style> de chaque page.
   ================================================================ */

.dc-card-tools {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.dc-tool-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(10, 9, 8, 0.55);
    backdrop-filter: blur(6px);
    color: #f2ead9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}
.dc-tool-btn:hover { background: rgba(201, 169, 97, 0.85); color: #0a0908; transform: scale(1.08); }
.dc-tool-btn.active { background: #c9a961; color: #0a0908; border-color: #c9a961; }
.dc-tool-btn.dc-whatsapp-btn:hover { background: #25D366; color: #fff; border-color: #25D366; }

/* ---------------- TOAST ---------------- */
.dc-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #15120e;
    color: #f2ead9;
    border: 1px solid rgba(201, 169, 97, 0.32);
    padding: 12px 22px;
    border-radius: 10px;
    font-family: 'Jost', sans-serif;
    font-size: 0.92rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9999;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.65);
}
.dc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.dc-toast.error { border-color: rgba(185, 99, 74, 0.6); color: #e8b8a8; }

/* ---------------- HEADER ICON BADGES ---------------- */
.dc-header-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: inherit;
    text-decoration: none;
    font-size: 1.05rem;
}
.dc-header-icon .dc-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #c9a961;
    color: #0a0908;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ---------------- COMPARE FLOATING BAR ---------------- */
.dc-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #15120e;
    border-top: 1px solid rgba(201, 169, 97, 0.32);
    padding: 14px 24px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 999;
    flex-wrap: wrap;
}
.dc-compare-bar.show { display: flex; }
.dc-compare-bar .dc-compare-items { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dc-compare-bar img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(201,169,97,0.25); }
.dc-compare-bar .dc-compare-thumb { position: relative; }
.dc-compare-bar .dc-compare-thumb .remove {
    position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
    background: #b9634a; color: #fff; font-size: 0.6rem; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ---------------- NEWSLETTER FORM ---------------- */
.dc-newsletter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.dc-newsletter-form input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(201, 169, 97, 0.25);
    background: rgba(255,255,255,0.03);
    color: #f2ead9;
    font-family: 'Jost', sans-serif;
}
.dc-newsletter-form input[type="email"]::placeholder { color: #8e8471; }
.dc-newsletter-form button {
    padding: 12px 22px;
    border-radius: 8px;
    border: none;
    background: #c9a961;
    color: #0a0908;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
    font-family: 'Jost', sans-serif;
}
.dc-newsletter-form button:hover { background: #e6c988; }
.dc-newsletter-form button:disabled { opacity: 0.6; cursor: default; }

/* ---------------- FILTERS PANEL (catégorie) ---------------- */
.dc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-end;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(201, 169, 97, 0.14);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
}
.dc-filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.dc-filter-group label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8e8471; }
.dc-filter-group select,
.dc-filter-group input {
    padding: 9px 12px;
    border-radius: 6px;
    border: 1px solid rgba(201, 169, 97, 0.2);
    background: #15120e;
    color: #f2ead9;
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
}
.dc-filter-range { display: flex; gap: 8px; align-items: center; }
.dc-filter-range input { width: 90px; }
.dc-filters .dc-filter-reset {
    padding: 9px 16px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(201, 169, 97, 0.3);
    color: #c9a961;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
}
.dc-filter-count { color: #8e8471; font-size: 0.85rem; margin-left: auto; }

@media (max-width: 640px) {
    .dc-filters { flex-direction: column; align-items: stretch; }
    .dc-filter-group { min-width: 0; }
    .dc-compare-bar { padding: 10px 14px; }
}

/* ================================================================
   LANGUAGE SWITCHER (FR / AR)
   ================================================================ */
.dc-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid rgba(201, 169, 97, 0.25);
    border-radius: 20px;
    padding: 3px;
    font-family: 'Jost', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.dc-lang-switch span {
    padding: 4px 10px;
    border-radius: 16px;
    cursor: pointer;
    color: #8e8471;
    transition: 0.2s ease;
}
.dc-lang-switch span:hover { color: #f2ead9; }
.dc-lang-switch span.active { background: #c9a961; color: #0a0908; }

/* ================================================================
   RTL SUPPORT — appliqué quand <html dir="rtl"> (arabe)
   Couvre les composants partagés (nav, cards, footer). Le contenu
   spécifique à chaque page peut nécessiter des ajustements
   additionnels au cas par cas.
   ================================================================ */
[dir="rtl"] body { font-family: 'Jost', 'Tahoma', sans-serif; }
[dir="rtl"] .nav-actions,
[dir="rtl"] .main-nav,
[dir="rtl"] .footer-grid,
[dir="rtl"] .footer-bottom,
[dir="rtl"] .contact-socials-footer,
[dir="rtl"] .dc-newsletter-form,
[dir="rtl"] .dc-filters,
[dir="rtl"] .actions,
[dir="rtl"] .breadcrumb {
    direction: rtl;
}
[dir="rtl"] .dc-card-tools { right: auto; left: 12px; }
[dir="rtl"] .dc-header-icon .dc-badge { right: auto; left: 0; }
[dir="rtl"] .breadcrumb { text-align: right; }
[dir="rtl"] .footer-hours li,
[dir="rtl"] .stats-mini .stat-item {
    direction: rtl;
}

/* Filet de sécurité : tant qu'un texte n'a pas encore de traduction arabe
   câblée (voir la note dans i18n.js — beaucoup de contenu ne l'a pas
   encore), il reste affiché en français. Sous dir="rtl", ce texte français
   hérite quand même du sens de lecture RTL du document, ce qui déplace mal
   la ponctuation (virgule qui saute en début de ligne, etc.). unicode-bidi:
   plaintext fait détecter à CHAQUE élément son propre sens de lecture
   depuis son premier caractère fort : le français reste donc LTR et
   l'arabe (une fois traduit) reste RTL, sans réglage manuel par élément. */
[dir="rtl"] p,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] span,
[dir="rtl"] a,
[dir="rtl"] li {
    unicode-bidi: plaintext;
}
