/* ============================================
   THEME ISLAMIQUE - CORRECTION RTL
   ============================================ */

:root {
    --islamic-green: #007474;
    --islamic-green-dark: #034240;
    --islamic-green-light: #11B7B3;
    --islamic-gold: #C99475;
    --islamic-gold-dark: #896350;
    --islamic-gold-light: #F2BDA2;
    --islamic-white: #FFFFFF;
    --islamic-beige: #EBEAE2;
    --islamic-brown: #5D4037;
    --islamic-gray: #8D6E63;
}

/* Base - RTL correct */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Tahoma', 'Segoe UI', sans-serif;
    background-color: var(--islamic-beige);
    color: #333;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

/* ============================================
   CORRECTION POUR LES CHIFFRES ET PRIX (LTR)
   ============================================ */

/* Forcer les chiffres et prix en LTR */
.price-ltr,
.price-amount,
.total-amount,
.frais-amount,
.number-ltr,
.product-price,
.price-display,
.old-price,
.new-price,
.regular-price,
.price-value,
.amount,
.total,
.subtotal,
.cart-total,
.order-total,
.phone-number,
.order-id,
.date-number {
    direction: ltr !important;
    unicode-bidi: bidi-override !important;
    display: inline-block !important;
    text-align: left !important;
}

/* Pour les prix dans les cartes produits */
.product-price {
    direction: ltr !important;
    text-align: center !important;
    display: block !important;
}

.product-price span {
    direction: ltr !important;
    display: inline-block !important;
}

/* Pour les badges et statistiques */
.badge {
    direction: ltr !important;
    display: inline-block !important;
}

/* Pour les tableaux */
.table td, 
.table th {
    text-align: center !important;
}

/* Pour les colonnes texte en arabe */
.table td:first-child,
.table th:first-child,
.table td:nth-child(2),
.table th:nth-child(2) {
    text-align: right !important;
}

/* Pour les inputs contenant des nombres */
input[type="number"],
input[type="tel"],
.price-input,
.quantity-input {
    direction: ltr !important;
    text-align: left !important;
}

/* Pour la pagination */
.pagination {
    direction: ltr !important;
}

.pagination .page-link {
    direction: ltr !important;
}

/* Pour les progress bars */
.progress-bar {
    direction: ltr !important;
}

/* ============================================
   HEADER ISLAMIQUE
   ============================================ */

.top-bar {
    background-color: var(--islamic-green-dark);
    color: var(--islamic-gold-light);
    font-size: 0.85rem;
    padding: 8px 0;
    direction: rtl;
}

.top-bar a {
    color: var(--islamic-gold-light);
    text-decoration: none;
}

.top-bar a:hover {
    color: var(--islamic-gold);
}

.islamic-header {
    background: linear-gradient(135deg, var(--islamic-green) 0%, var(--islamic-green-dark) 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    direction: rtl;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 1rem 1rem !important;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--islamic-gold) !important;
}

.navbar-nav .nav-link.active {
    color: var(--islamic-gold) !important;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 30px;
    height: 2px;
    background: var(--islamic-gold);
}

/* ============================================
   HERO SECTION
   ============================================ */

.islamic-hero {
    position: relative;
    min-height: 550px;
    background: linear-gradient(135deg, var(--islamic-green) 0%, var(--islamic-green-dark) 100%);
    overflow: hidden;
    direction: rtl;
}

.islamic-hero .hero-content {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
}

.islamic-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.islamic-hero .arabic-title {
    font-size: 2.5rem;
    color: var(--islamic-gold);
    margin-bottom: 1rem;
}

/* ============================================
   CARTES PRODUITS
   ============================================ */

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    position: relative;
    direction: rtl;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.product-badge .badge {
    background: var(--islamic-gold);
    color: var(--islamic-green-dark);
    padding: 5px 12px;
    border-radius: 20px;
}

.product-image {
    position: relative;
    overflow: hidden;
    background: #f5f0e6;
}

.product-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.95);
    transition: bottom 0.3s;
}

.product-card:hover .product-actions {
    bottom: 0;
}

.product-actions .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.product-info {
    padding: 1.2rem;
    text-align: center;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--islamic-green);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--islamic-green);
    direction: ltr !important;
    text-align: center !important;
}

.product-price .old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.85rem;
    margin-left: 8px;
    direction: ltr !important;
    display: inline-block;
}

.product-price .new-price {
    color: #dc3545;
    direction: ltr !important;
    display: inline-block;
}

/* ============================================
   BOUTONS
   ============================================ */

.btn-islamic {
    background: var(--islamic-gold);
    color: var(--islamic-green-dark);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-islamic:hover {
    background: var(--islamic-gold-dark);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-islamic {
    background: transparent;
    border: 2px solid var(--islamic-gold);
    color: var(--islamic-gold);
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
}

.btn-outline-islamic:hover {
    background: var(--islamic-gold);
    color: var(--islamic-green-dark);
}

/* ============================================
   FOOTER
   ============================================ */

.islamic-footer {
    background: var(--islamic-green-dark);
    color: #ccc;
    padding: 4rem 0 2rem;
    direction: rtl;
}

.islamic-footer h5 {
    color: var(--islamic-gold);
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.islamic-footer h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--islamic-gold);
}

.islamic-footer .footer-links {
    list-style: none;
    padding: 0;
}

.islamic-footer .footer-links li {
    margin-bottom: 0.8rem;
}

.islamic-footer .footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
}

.islamic-footer .footer-links a:hover {
    color: var(--islamic-gold);
    padding-right: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
}

/* ============================================
   VERSE OF DAY
   ============================================ */

.verse-of-day {
    background: var(--islamic-beige);
    border-right: 4px solid var(--islamic-gold);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 10px 10px 0;
    direction: rtl;
}

.verse-text {
    font-size: 1.1rem;
    font-family: 'Cairo', sans-serif;
    color: var(--islamic-green);
}

.verse-reference {
    font-size: 0.8rem;
    color: var(--islamic-gold);
}

/* ============================================
   FORMULAIRES
   ============================================ */

.form-control, .form-select {
    direction: rtl;
    text-align: right;
}

.form-control[type="number"],
.form-control[type="tel"] {
    direction: ltr !important;
    text-align: left !important;
}

/* ============================================
   ALERTES
   ============================================ */

.alert {
    border-radius: 12px;
    border: none;
    direction: rtl;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .islamic-hero h1 {
        font-size: 1.8rem;
    }
    
    .islamic-hero .arabic-title {
        font-size: 1.5rem;
    }
    
    .product-image img {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .product-image img {
        height: 180px;
    }
}
/* ============================================
   CORRECTIONS SUPPLEMENTAIRES RTL
   ============================================ */

/* Correction pour les listes */
ul, ol {
    padding-right: 20px;
    padding-left: 0;
}

/* Correction pour les breadcrumbs */
.breadcrumb {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb-item + .breadcrumb-item {
    padding-right: 0.5rem;
    padding-left: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-right: 0;
    padding-left: 0.5rem;
}

/* Correction pour les badges */
.badge {
    display: inline-block;
    direction: ltr;
}

/* Correction pour les boutons avec icônes */
.btn i {
    margin-left: 5px;
    margin-right: 0;
}

/* Correction pour les cartes */
.card {
    direction: rtl;
}

.card-header {
    text-align: right;
}

/* Correction pour les modals */
.modal-header .btn-close {
    margin: -0.5rem auto -0.5rem -0.5rem;
}

.modal-body {
    text-align: right;
}

/* Correction pour les tableaux */
.table th, .table td {
    vertical-align: middle;
}

/* Correction pour les progress bars */
.progress {
    direction: ltr;
}

/* Correction pour les sliders */
.carousel-indicators {
    direction: ltr;
}

.carousel-control-prev, .carousel-control-next {
    direction: ltr;
}

/* Correction pour les dropdowns */
.dropdown-menu {
    text-align: right;
}

/* Correction pour les inputs group */
.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
    border-radius: 0 0.375rem 0.375rem 0;
}

.input-group > :not(:first-child):not(.dropdown-menu) {
    margin-left: 0;
    margin-right: -1px;
    border-radius: 0.375rem 0 0 0.375rem;
}

/* Correction pour les prix dans le récapitulatif */
.bg-light .d-flex .fw-bold,
.bg-light .price-amount {
    direction: ltr !important;
    display: inline-block !important;
}

/* Correction pour les totaux */
.total-display {
    direction: ltr !important;
    display: inline-block;
}


/* ============================================
   FOOTER - COULEUR VERTE COMME LE MENU
   ============================================ */

.islamic-footer {
    background: linear-gradient(135deg, var(--islamic-green) 0%, var(--islamic-green-dark) 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 2rem;
    direction: rtl;
    margin-top: auto;
}

.islamic-footer h5 {
    color: var(--islamic-gold);
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.islamic-footer h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--islamic-gold);
}

.islamic-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.islamic-footer .footer-links li {
    margin-bottom: 0.8rem;
}

.islamic-footer .footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.islamic-footer .footer-links a:hover {
    color: var(--islamic-gold);
    padding-right: 5px;
}

.islamic-footer .text-gold {
    color: var(--islamic-gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Bouton WhatsApp dans le footer */
.islamic-footer .btn-success {
    background-color: #25D366;
    border: none;
    transition: all 0.3s;
}

.islamic-footer .btn-success:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
}

/* Icônes de paiement */
.islamic-footer .bi-credit-card,
.islamic-footer .bi-cash-stack,
.islamic-footer .bi-wallet2 {
    color: var(--islamic-gold);
    opacity: 0.8;
    transition: all 0.3s;
}

.islamic-footer .bi-credit-card:hover,
.islamic-footer .bi-cash-stack:hover,
.islamic-footer .bi-wallet2:hover {
    opacity: 1;
    transform: scale(1.05);
}