/* ═══════════════════════════════════════════════════
   BIM-SOLUTION-DZ — RTL Arabic Overrides
   Police : Cairo (Google Fonts)
   ═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

html[dir="rtl"],
html[dir="rtl"] body {
  font-family: 'Cairo', 'Inter', sans-serif;
  direction: rtl;
}

/* ══════════════════════════════
   NAVBAR
══════════════════════════════ */

/* Navbar principal : inverser logo ↔ liens */
html[dir="rtl"] #navbar {
  flex-direction: row-reverse;
}

/* Liens de nav : de droite à gauche */
html[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

/* Logo : NE PAS inverser — en RTL natural le dot est à droite (début lecture) */
/* Pas de row-reverse sur .nav-logo */

/* Hamburger : placer à gauche (fin de lecture RTL) */
html[dir="rtl"] .hamburger {
  order: -1;
  margin-right: auto;
  margin-left: 0;
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
html[dir="rtl"] .hero-inner {
  flex-direction: row-reverse;
}
html[dir="rtl"] .hero-content {
  text-align: right;
}
/* line2 est display:block dans style.css → force un saut de ligne — on annule */
html[dir="rtl"] .hero-title .line2 {
  display: inline;
}
html[dir="rtl"] .hero-badge,
html[dir="rtl"] .hero-actions {
  justify-content: flex-start;
}
html[dir="rtl"] .hero-tags {
  justify-content: flex-start;
}

/* hero-logo-right : en RTL flex-end = gauche, on corrige vers droite */
html[dir="rtl"] .hero-logo-right {
  margin-left: 0;
  margin-right: 2rem;
  justify-content: flex-start;
}

/* Responsive hero RTL */
@media (max-width: 900px) {
  html[dir="rtl"] #hero {
    padding-top: calc(70px + 2rem) !important;
    align-items: flex-start !important;
    min-height: auto !important;
  }
  html[dir="rtl"] .hero-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2rem !important;
  }
  html[dir="rtl"] .hero-content {
    max-width: 100% !important;
  }
  html[dir="rtl"] .hero-logo-right {
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-top: 1.5rem !important;
    width: 100% !important;
  }
  html[dir="rtl"] .btn-alerte-formation {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    box-sizing: border-box !important;
  }
}
@media (max-width: 700px) {
  html[dir="rtl"] .nav-logo {
    font-size: 1rem !important;
    gap: 5px !important;
  }
  html[dir="rtl"] .btn-autoentrepreneur {
    display: none !important;
  }
  html[dir="rtl"] .hero-actions {
    flex-direction: column !important;
    gap: 0.8rem !important;
  }
  html[dir="rtl"] .hero-actions a {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* ══════════════════════════════
   SECTIONS GÉNÉRALES
══════════════════════════════ */
html[dir="rtl"] .section-label {
  justify-content: flex-start;
}
html[dir="rtl"] .section-title,
html[dir="rtl"] .section-desc {
  text-align: right;
}
/* Centrage explicite (override inline style) */
html[dir="rtl"] .section-label[style*="center"],
html[dir="rtl"] .section-title[style*="center"],
html[dir="rtl"] .section-desc[style*="center"] {
  text-align: center;
}

/* ══════════════════════════════
   CARDS PROJET & FORMATION
══════════════════════════════ */
html[dir="rtl"] .projet-body,
html[dir="rtl"] .formation-card,
html[dir="rtl"] .contact-info {
  text-align: right;
}
html[dir="rtl"] .projet-tags,
html[dir="rtl"] .formation-tags {
  justify-content: flex-start;
}
html[dir="rtl"] .formation-info {
  text-align: right;
}
html[dir="rtl"] .formation-level {
  text-align: right;
}

/* ══════════════════════════════
   SERVICES
══════════════════════════════ */
html[dir="rtl"] .service-card {
  text-align: right;
}
html[dir="rtl"] .service-tags {
  justify-content: flex-start;
}

/* ══════════════════════════════
   AUTOMATION
══════════════════════════════ */
html[dir="rtl"] .automation-hero {
  flex-direction: row-reverse;
}
html[dir="rtl"] .auto-items {
  text-align: right;
}
html[dir="rtl"] .auto-item {
  flex-direction: row-reverse;
  text-align: right;
}
html[dir="rtl"] .auto-item > div {
  text-align: right;
}

/* ══════════════════════════════
   FAMILLES REVIT
══════════════════════════════ */
html[dir="rtl"] .familles-header-wrap {
  flex-direction: row-reverse;
}
html[dir="rtl"] .famille-benefit-card {
  text-align: right;
}
html[dir="rtl"] .process-step {
  text-align: right;
}
html[dir="rtl"] .familles-cta-block {
  text-align: right;
}
html[dir="rtl"] .familles-cta-actions {
  justify-content: flex-start;
}

/* ══════════════════════════════
   CONTACT
══════════════════════════════ */
html[dir="rtl"] .contact-detail {
  flex-direction: row-reverse;
  text-align: right;
}
html[dir="rtl"] .contact-form label {
  text-align: right;
}
html[dir="rtl"] .contact-form input,
html[dir="rtl"] .contact-form textarea,
html[dir="rtl"] .contact-form select {
  text-align: right;
  direction: rtl;
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
html[dir="rtl"] footer {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] footer > div {
  text-align: right;
}
html[dir="rtl"] .footer-socials {
  flex-direction: row-reverse;
}

/* ══════════════════════════════
   PROFILE MODAL
══════════════════════════════ */
html[dir="rtl"] .pm-title-block,
html[dir="rtl"] .pm-text,
html[dir="rtl"] .pm-section {
  text-align: right;
}
html[dir="rtl"] .pm-header {
  flex-direction: row-reverse;
  flex-wrap: wrap;
}
html[dir="rtl"] .pm-timeline {
  border-right: 2px solid var(--border);
  border-left: none;
  padding-right: 1.5rem;
  padding-left: 0;
}
html[dir="rtl"] .pm-exp {
  padding-right: 0;
  flex-direction: row-reverse;
  text-align: right;
}
html[dir="rtl"] .pm-exp-date {
  text-align: right;
}
html[dir="rtl"] .pm-section-title {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
html[dir="rtl"] .pm-skills-grid {
  direction: rtl;
}
html[dir="rtl"] .pm-skill-card {
  flex-direction: row-reverse;
  text-align: right;
}
html[dir="rtl"] .pm-skill-card span {
  text-align: right;
}
html[dir="rtl"] .pm-tools {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] .pm-formation {
  direction: rtl;
}
html[dir="rtl"] .pm-form-item {
  flex-direction: row-reverse;
  text-align: right;
}
html[dir="rtl"] .pm-cta {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

/* ══════════════════════════════
   SÉLECTEUR DE LANGUE
══════════════════════════════ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.lang-switch:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0,200,255,0.06);
}
.lang-switch::after {
  display: none !important;
}
