/**
 * Web Generation - RTL Stylesheet for Arabic
 * Version 4.0 - SEO 2026
 * 
 * Critère S3: Contenu localisé (Support RTL complet)
 */

/* ========== BASE RTL ========== */
html[dir="rtl"],
body.rtl {
    direction: rtl;
    text-align: right;
}

/* ========== TYPOGRAPHY ========== */
body.rtl {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    letter-spacing: 0;
}

/* ========== HEADER ========== */
body.rtl .wg-header-inner {
    flex-direction: row-reverse;
}

body.rtl .wg-nav-list {
    flex-direction: row-reverse;
}

body.rtl .wg-nav-dropdown .wg-nav-submenu {
    left: auto;
    right: 0;
    text-align: right;
}

body.rtl .wg-nav-submenu li a {
    flex-direction: row-reverse;
}

body.rtl .wg-nav-submenu li a i {
    margin-left: 10px;
    margin-right: 0;
}

body.rtl .wg-nav-social {
    flex-direction: row-reverse;
}

body.rtl .wg-lang-switcher {
    margin-left: 0;
    margin-right: 15px;
}

body.rtl .wg-lang-dropdown {
    left: 0;
    right: auto;
}

/* ========== HERO SECTION ========== */
body.rtl .wg-hero-content {
    text-align: right;
}

body.rtl .wg-hero-buttons {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

body.rtl .wg-hero-badge {
    flex-direction: row-reverse;
}

/* ========== NAVIGATION ========== */
body.rtl .fa-chevron-down {
    margin-left: 0;
    margin-right: 5px;
}

body.rtl .fa-chevron-right {
    transform: rotate(180deg);
}

body.rtl .fa-arrow-right {
    transform: rotate(180deg);
}

/* ========== BREADCRUMB ========== */
body.rtl .wg-breadcrumb-list {
    flex-direction: row-reverse;
}

body.rtl .wg-breadcrumb-list li:not(:last-child)::after {
    content: '\\';
    margin-left: 0;
    margin-right: 8px;
}

/* ========== CARDS & BOXES ========== */
body.rtl .wg-card,
body.rtl .wg-service-card,
body.rtl .wg-portfolio-card {
    text-align: right;
}

body.rtl .wg-card-icon {
    margin-left: auto;
    margin-right: 0;
}

body.rtl .wg-card-content {
    text-align: right;
}

/* ========== LISTS ========== */
body.rtl ul,
body.rtl ol {
    padding-left: 0;
    padding-right: 20px;
}

body.rtl li {
    text-align: right;
}

body.rtl .wg-feature-list li {
    flex-direction: row-reverse;
}

body.rtl .wg-feature-list li i {
    margin-left: 10px;
    margin-right: 0;
}

/* ========== FORMS ========== */
body.rtl input,
body.rtl textarea,
body.rtl select {
    text-align: right;
    direction: rtl;
}

body.rtl input[type="email"],
body.rtl input[type="tel"],
body.rtl input[type="url"] {
    direction: ltr;
    text-align: left;
}

body.rtl .wg-form-group label {
    text-align: right;
}

body.rtl .wg-form-icon {
    left: auto;
    right: 15px;
}

body.rtl .wg-form-icon + input {
    padding-left: 15px;
    padding-right: 45px;
}

/* ========== BUTTONS ========== */
body.rtl .wg-btn i {
    margin-left: 0;
    margin-right: 8px;
}

body.rtl .wg-btn-icon-right i {
    margin-left: 8px;
    margin-right: 0;
}

/* ========== FOOTER ========== */
body.rtl .wg-footer-grid {
    direction: rtl;
}

body.rtl .wg-footer-col {
    text-align: right;
}

body.rtl .wg-footer-links {
    text-align: right;
}

body.rtl .wg-footer-social {
    justify-content: flex-start;
}

body.rtl .wg-footer-bottom {
    flex-direction: row-reverse;
}

/* ========== TESTIMONIALS ========== */
body.rtl .wg-testimonial-card {
    text-align: right;
}

body.rtl .wg-testimonial-author {
    flex-direction: row-reverse;
}

body.rtl .wg-testimonial-info {
    text-align: right;
}

/* ========== STATS ========== */
body.rtl .wg-stats-grid {
    direction: rtl;
}

body.rtl .wg-stat-item {
    text-align: right;
}

/* ========== ABOUT SECTION ========== */
body.rtl .wg-about-content {
    text-align: right;
}

body.rtl .wg-about-grid {
    direction: rtl;
}

/* ========== SERVICES ========== */
body.rtl .wg-services-grid {
    direction: rtl;
}

body.rtl .wg-service-number {
    left: auto;
    right: 20px;
}

/* ========== PORTFOLIO ========== */
body.rtl .wg-portfolio-grid {
    direction: rtl;
}

body.rtl .wg-portfolio-info {
    text-align: right;
}

body.rtl .wg-portfolio-tags {
    justify-content: flex-end;
}

/* ========== BLOG ========== */
body.rtl .wg-blog-grid {
    direction: rtl;
}

body.rtl .wg-blog-card-content {
    text-align: right;
}

body.rtl .wg-blog-meta {
    flex-direction: row-reverse;
}

body.rtl .wg-blog-meta span {
    flex-direction: row-reverse;
}

body.rtl .wg-blog-meta i {
    margin-left: 5px;
    margin-right: 0;
}

/* ========== CONTACT ========== */
body.rtl .wg-contact-grid {
    direction: rtl;
}

body.rtl .wg-contact-info {
    text-align: right;
}

body.rtl .wg-contact-item {
    flex-direction: row-reverse;
}

body.rtl .wg-contact-item i {
    margin-left: 15px;
    margin-right: 0;
}

/* ========== FAQ ========== */
body.rtl .wg-faq-item {
    text-align: right;
}

body.rtl .wg-faq-question {
    flex-direction: row-reverse;
}

body.rtl .wg-faq-toggle {
    margin-left: 0;
    margin-right: auto;
}

/* ========== CTA SECTION ========== */
body.rtl .wg-cta-content {
    text-align: right;
}

body.rtl .wg-cta-buttons {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* ========== MOBILE MENU ========== */
body.rtl .wg-mobile-nav {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

body.rtl .wg-mobile-nav.active {
    transform: translateX(0);
}

body.rtl .wg-mobile-header {
    flex-direction: row-reverse;
}

body.rtl .wg-mobile-nav-list li a {
    flex-direction: row-reverse;
}

body.rtl .wg-mobile-nav-list li a i {
    margin-left: 12px;
    margin-right: 0;
}

body.rtl .wg-mobile-cta {
    text-align: right;
}

body.rtl .wg-mobile-cta-phone {
    flex-direction: row-reverse;
}

body.rtl .wg-mobile-social {
    justify-content: flex-start;
}

/* ========== ANIMATIONS ========== */
body.rtl [data-aos="fade-right"] {
    transform: translate3d(50px, 0, 0);
}

body.rtl [data-aos="fade-left"] {
    transform: translate3d(-50px, 0, 0);
}

/* ========== SCROLLBAR ========== */
body.rtl::-webkit-scrollbar {
    width: 8px;
}

body.rtl::-webkit-scrollbar-track {
    background: #0a0a0f;
}

body.rtl::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff6b6b 0%, #4ecdc4 100%);
    border-radius: 4px;
}

/* ========== RESPONSIVE RTL ========== */
@media (max-width: 991px) {
    body.rtl .wg-header-inner {
        flex-direction: row-reverse;
    }
    
    body.rtl .wg-mobile-toggle {
        margin-left: 0;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    body.rtl .wg-hero-content {
        text-align: center;
    }
    
    body.rtl .wg-hero-buttons {
        justify-content: center;
    }
    
    body.rtl .wg-cta-buttons {
        justify-content: center;
    }
    
    body.rtl .wg-footer-col {
        text-align: center;
    }
    
    body.rtl .wg-footer-social {
        justify-content: center;
    }
}

/* ================================================================
   SECTION RELATED METIERS (hub-cards) - RTL
   ================================================================ */

body.rtl .wg-metier-related,
[dir="rtl"] .wg-metier-related {
    direction: rtl;
    text-align: right;
}

body.rtl .wg-metier-related .wg-section-header,
[dir="rtl"] .wg-metier-related .wg-section-header {
    text-align: center;
}

body.rtl .wg-metier-related-grid,
[dir="rtl"] .wg-metier-related-grid {
    direction: rtl;
}

body.rtl .wg-hub-card,
[dir="rtl"] .wg-hub-card {
    direction: rtl;
    text-align: right;
}

body.rtl .wg-hub-card-body,
[dir="rtl"] .wg-hub-card-body {
    text-align: right;
}

body.rtl .wg-hub-card-link,
[dir="rtl"] .wg-hub-card-link {
    flex-direction: row-reverse;
}

body.rtl .wg-hub-card-link .fa-arrow-right,
[dir="rtl"] .wg-hub-card-link .fa-arrow-right {
    transform: scaleX(-1);
}

body.rtl .wg-hub-card-price,
[dir="rtl"] .wg-hub-card-price {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

/* Fix: image overflow RTL */
body.rtl .wg-hub-card-image,
[dir="rtl"] .wg-hub-card-image {
    direction: ltr;
    overflow: hidden;
}

/* Section maillage interne RTL */
body.rtl .wg-internal-links-section,
[dir="rtl"] .wg-internal-links-section {
    direction: rtl;
    text-align: right;
}

body.rtl .wg-internal-links-title,
[dir="rtl"] .wg-internal-links-title {
    text-align: right;
}

body.rtl .wg-internal-links-title i,
[dir="rtl"] .wg-internal-links-title i {
    margin-right: 0;
    margin-left: 8px;
}

body.rtl .wg-internal-links-inline,
[dir="rtl"] .wg-internal-links-inline {
    direction: rtl;
    justify-content: flex-start;
}

body.rtl .wg-internal-link-card,
[dir="rtl"] .wg-internal-link-card {
    direction: rtl;
    text-align: right;
}

body.rtl .wg-internal-link-card i,
[dir="rtl"] .wg-internal-link-card i {
    margin-right: 0;
    margin-left: 8px;
}

body.rtl .wg-section-cta,
[dir="rtl"] .wg-section-cta {
    text-align: center;
}

/* Services pricing section RTL */
body.rtl .wg-svc-grid,
[dir="rtl"] .wg-svc-grid {
    direction: rtl;
}

body.rtl .wg-svc-card,
[dir="rtl"] .wg-svc-card {
    direction: rtl;
    text-align: right;
}

body.rtl .wg-svc-card-header,
[dir="rtl"] .wg-svc-card-header {
    flex-direction: row-reverse;
}

body.rtl .wg-svc-card-icon,
[dir="rtl"] .wg-svc-card-icon {
    margin-right: 0;
    margin-left: 16px;
}

body.rtl .wg-svc-ideal,
[dir="rtl"] .wg-svc-ideal {
    direction: rtl;
    text-align: right;
}

body.rtl .wg-svc-ideal i,
[dir="rtl"] .wg-svc-ideal i {
    margin-right: 0;
    margin-left: 8px;
}

body.rtl .wg-svc-includes li,
[dir="rtl"] .wg-svc-includes li {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .wg-svc-includes li i,
[dir="rtl"] .wg-svc-includes li i {
    margin-right: 0;
    margin-left: 8px;
}

body.rtl .wg-svc-footer,
[dir="rtl"] .wg-svc-footer {
    flex-direction: row-reverse;
}

body.rtl .wg-svc-price,
[dir="rtl"] .wg-svc-price {
    direction: ltr;
    unicode-bidi: embed;
    text-align: right;
}
