/* ===== HOME PAGE STYLES ===== */

/* Override body background for home */
.home-page {
  background: #ffffff;
}

/* ===== TOPBAR ===== */
.topbar {
  background: #f0a500;
  padding: 0;
  position: relative;
  z-index: 200;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}

.topbar-links {
  display: flex;
  gap: 0;
}

.topbar-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 1rem;
  height: 36px;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(255,255,255,0.3);
  transition: background 0.18s;
  white-space: nowrap;
}

.topbar-links a:first-child {
  border-left: 1px solid rgba(255,255,255,0.3);
}

.topbar-links a:hover {
  background: rgba(255,255,255,0.2);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-icons a {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transition: background 0.18s;
}

.social-icons a:hover {
  background: rgba(255,255,255,0.25);
}

.topbar-lang {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0 0.5rem;
  border-left: 1px solid rgba(255,255,255,0.3);
}

/* ===== MAIN HEADER ===== */
.main-header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 150;
}

.main-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
}

.site-logo {
  text-decoration: none;
  flex-shrink: 0;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-emblem {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #1b3a6b, #2952a3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.logo-text strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #1b3a6b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.logo-text span {
  font-size: 0.78rem;
  color: #f0a500;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.main-nav-home {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}

.nav-item {
  color: #1b3a6b;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0 1.1rem;
  height: 72px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  transition: color 0.18s, border-color 0.18s;
  white-space: nowrap;
}

.nav-item:hover {
  color: #f0a500;
  border-bottom-color: #f0a500;
}

.nav-item.active {
  color: #1b3a6b;
  border-bottom-color: #1b3a6b;
}

.search-btn {
  background: #1b3a6b;
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s;
}

.search-btn:hover {
  background: #f0a500;
}

/* ===== HERO SLIDER ===== */
.hero-slider {
  position: relative;
  overflow: hidden;
  height: 460px;
  background: #000;
}

.slider-track {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  direction: ltr;
}

.slide {
  width: calc(100% / 3);
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}

.slide {
  background-color: #222;
  background-size: cover;
  background-position: center;
}

/* Overlay sombre sur les images du slider */
.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 20, 50, 0.35) 0%,
    rgba(10, 20, 50, 0.25) 50%,
    rgba(10, 20, 50, 0.75) 100%
  );
}

.slide-caption {
  position: relative;
  z-index: 1;
  width: 100%;
  background: linear-gradient(transparent, rgba(10,20,50,0.85));
  padding: 2.5rem 3rem 1.5rem;
  color: #fff;
}

.slide-caption p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  max-width: 650px;
  line-height: 1.55;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  width: 44px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.18s;
  padding: 0;
  line-height: 1;
}

.slider-btn:hover {
  background: rgba(255,255,255,0.3);
}

.slider-prev { left: 0; }
.slider-next { right: 0; }

.slider-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s;
}

.dot.active {
  background: #f0a500;
}

/* ===== NEWS SECTION ===== */
.news-section {
  background: #fff;
  padding: 2.5rem 0;
  border-bottom: 1px solid #eee;
}

.news-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.section-title-gold {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1b3a6b;
  margin: 0 0 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid #f0a500;
  display: inline-block;
}

/* À la une */
.une-article {
  cursor: pointer;
}

.une-img {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.img-placeholder {
  width: 100%;
  border-radius: 4px;
}

.img-ph-1 {
  height: 220px;
  background: linear-gradient(135deg, #1b3a6b 0%, #2952a3 50%, #0d7a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.img-ph-1::after {
  content: '🌍';
  font-size: 5rem;
  opacity: 0.3;
}

.une-date {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f0a500;
  margin: 0 0 0.4rem;
}

.une-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1b3a6b;
  margin: 0;
  line-height: 1.45;
}

/* Actualités */
.actu-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.actu-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.actu-img {
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.img-ph-2 {
  height: 70px;
  background: linear-gradient(135deg, #f0a500, #e08800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.img-ph-2::after { content: '📋'; opacity: 0.5; }

.img-ph-3 {
  height: 70px;
  background: linear-gradient(135deg, #1b3a6b, #2952a3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.img-ph-3::after { content: '💻'; opacity: 0.5; }

.actu-body {}

.actu-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f0a500;
  margin: 0 0 0.25rem;
}

.actu-text {
  font-size: 0.875rem;
  color: #1b3a6b;
  font-weight: 600;
  margin: 0;
  line-height: 1.45;
}

.btn-gold {
  display: inline-block;
  background: #f0a500;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.7rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.18s, transform 0.18s;
  border: none;
  cursor: pointer;
}

.btn-gold:hover {
  background: #d4900a;
  transform: translateY(-1px);
}

/* ===== SERVICES SECTION ===== */
.services-section {
  background: #f7f8fb;
  padding: 3rem 0;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.section-title-center {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #1b3a6b;
  margin: 0 0 1.5rem;
}

.services-tabs {
  display: inline-flex;
  border: 2px solid #1b3a6b;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.65rem 2rem;
  background: transparent;
  color: #1b3a6b;
  border: none;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  letter-spacing: 0.02em;
}

.tab-btn.active {
  background: #1b3a6b;
  color: #fff;
}

.tab-btn:hover:not(.active) {
  background: #e8ecf5;
}

.services-carousel-wrapper {
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.services-cards {
  display: flex;
  gap: 1.25rem;
  flex: 1;
  overflow: hidden;
}

.svc-card {
  flex: 1;
  min-width: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.22s, box-shadow 0.22s;
}

.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.svc-img {
  height: 160px;
  background: #e8ecf5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.img-ph-svc1 { background: linear-gradient(135deg, #e8f5ff, #c3ddf0); }
.img-ph-svc1::after { content: '🔍'; }
.img-ph-svc2 { background: linear-gradient(135deg, #eaf0fb, #c3cee0); }
.img-ph-svc2::after { content: '💼'; }
.img-ph-svc3 { background: linear-gradient(135deg, #fff5e6, #f0d5a0); }
.img-ph-svc3::after { content: '📣'; }
.img-ph-svc4 { background: linear-gradient(135deg, #e8f5ee, #b3d9c0); }
.img-ph-svc4::after { content: '📝'; }
.img-ph-svc5 { background: linear-gradient(135deg, #f0e8f5, #d0b3d9); }
.img-ph-svc5::after { content: '📚'; }
.img-ph-svc6 { background: linear-gradient(135deg, #f5f0e8, #d9c8b3); }
.img-ph-svc6::after { content: '📊'; }

.img-ph-svc1::after, .img-ph-svc2::after, .img-ph-svc3::after,
.img-ph-svc4::after, .img-ph-svc5::after, .img-ph-svc6::after {
  font-size: 3rem;
}

.svc-label {
  background: #1b3a6b;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
}

.svc-prev, .svc-next {
  position: static;
  transform: none;
  background: #f0a500;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  flex-shrink: 0;
  align-self: center;
}

.svc-prev:hover, .svc-next:hover {
  background: #d4900a;
}

/* ===== MÉTIERS ===== */
.metiers-section {
  background: #fff;
  padding: 3rem 0;
}

.metiers-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.metier-card {
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s, box-shadow 0.22s;
}

.metier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.metier-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.metier-img {
  background-size: cover;
  background-position: center;
  background-color: #1b3a6b;
  position: relative;
}

.metier-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
}

.metier-card h3 {
  background: #fff;
  color: #1b3a6b;
  margin: 0;
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.04em;
  border-top: 3px solid #f0a500;
}

/* ===== GALERIE PHOTOS ===== */
.gallery-section {
  background: #f7f8fb;
  padding: 3rem 0 3.5rem;
  border-top: 1px solid #eee;
}

.gallery-header {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-subtitle {
  color: #555;
  font-size: 0.95rem;
  margin: 0.4rem auto 0;
  max-width: 520px;
}

.gallery-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 0.75rem;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(10,20,50,0.82));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 1.5rem 0.85rem 0.65rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover figcaption {
  opacity: 1;
}

/* Image large (prend 2 colonnes) */
.gallery-item.gallery-wide {
  grid-column: span 2;
  height: 260px;
}

/* Image haute (prend 2 lignes) */
.gallery-item.gallery-tall {
  grid-row: span 2;
  height: 100%;
}

/* Images normales */
.gallery-item:not(.gallery-wide):not(.gallery-tall) {
  height: 200px;
}

/* Bannière événement */
.event-banner {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.event-banner img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.event-banner-info {
  padding: 1.5rem 1.5rem 1.5rem 0;
}

.event-banner-info h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1b3a6b;
  margin: 0 0 0.75rem;
  line-height: 1.35;
  direction: rtl;
}

.event-banner-info p {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

.event-meta {
  font-weight: 700;
  color: #f0a500 !important;
  font-size: 0.85rem !important;
}

@media (max-width: 700px) {
  .event-banner {
    grid-template-columns: 1fr;
  }
  .event-banner img {
    height: 200px;
  }
  .event-banner-info {
    padding: 1rem;
  }
}

/* ===== BURGER — page d'accueil (fond blanc) ===== */
.main-header .burger-btn,
.main-header-inner .burger-btn {
  color: #1b3a6b;
}
@media (max-width: 860px) {
  .main-nav-home { display: none; }
}

/* ===== MODAL DE RECHERCHE ===== */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,20,50,0.65);
  z-index: 500;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 0;
}
.search-modal.open { display: flex; }

.search-modal-box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
  overflow: hidden;
}
.search-modal-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #e8ecf5;
}
.search-modal-top input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  color: #1b3a6b;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.search-modal-top input::placeholder { color: #94a3b8; }
.search-modal-close {
  background: #f1f5f9;
  border: none;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.search-modal-close:hover { background: #e2e8f0; color: #475569; }

.search-results-list {
  padding: 0.5rem 0;
  max-height: 340px;
  overflow-y: auto;
}
.search-hint {
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
  padding: 1.5rem;
  margin: 0;
}
.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.search-result-item:hover { background: #f0f4ff; }
.search-result-icon {
  width: 36px;
  height: 36px;
  background: #f0f4ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.search-result-body h4 {
  margin: 0 0 0.15rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1b3a6b;
}
.search-result-body p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

/* ===== PANNEAU DOMAINE (slide-in droite) ===== */
.domain-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,20,50,0.45);
  z-index: 600;
}
.domain-panel-overlay.open { display: block; }

.domain-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 500px;
  background: #fff;
  z-index: 601;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.18);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
}
.domain-panel.open { transform: translateX(0); }

.domain-panel-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.4rem 1.4rem 1.1rem;
  border-bottom: 1px solid #e8ecf5;
  flex-shrink: 0;
}
.domain-panel-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.domain-panel-header-text { flex: 1; min-width: 0; }
.domain-panel-header-text h2 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #1b3a6b;
  line-height: 1.3;
}
.domain-panel-header-text p {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}
.domain-panel-close {
  background: #f1f5f9;
  border: none;
  border-radius: 6px;
  width: 32px; height: 32px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #475569;
  transition: background 0.15s, color 0.15s;
}
.domain-panel-close:hover { background: #e2e8f0; color: #1b3a6b; }

.domain-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.dp-doc {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.dp-doc:last-child { border-bottom: none; }
.dp-doc:hover { background: #f8faff; }
.dp-doc:hover .dp-doc-title { color: #c9a84c; }
.dp-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 3px;
}
.dp-badge.pdf { background: #fee2e2; color: #dc2626; }
.dp-badge.doc { background: #dbeafe; color: #1d4ed8; }
.dp-badge.xls { background: #dcfce7; color: #15803d; }
.dp-doc-body { flex: 1; min-width: 0; }
.dp-doc-title {
  font-size: 0.865rem;
  font-weight: 600;
  color: #1b3a6b;
  line-height: 1.35;
  margin: 0 0 0.2rem;
  transition: color 0.15s;
}
.dp-doc-desc {
  font-size: 0.775rem;
  color: #64748b;
  margin: 0 0 0.3rem;
  line-height: 1.4;
}
.dp-doc-meta { display: flex; align-items: center; gap: 0.5rem; }
.dp-doc-kind {
  font-size: 0.68rem; font-weight: 700;
  padding: 1px 6px; border-radius: 3px;
  background: #f1f5f9; color: #475569;
}
.dp-doc-date { font-size: 0.68rem; color: #94a3b8; }

.domain-panel-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid #e8ecf5;
  text-align: center;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .domain-panel { max-width: 100%; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .news-section-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .metiers-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .main-nav-home {
    display: none;
  }

  .main-header-inner {
    justify-content: space-between;
  }

  .topbar-links a:not(:first-child) {
    display: none;
  }

  .hero-slider {
    height: 280px;
  }

  .slide-caption {
    padding: 1.5rem 1rem 1rem;
  }
}

@media (max-width: 600px) {
  .services-cards {
    flex-direction: column;
  }
}

/* ===================================================
   ARABE / RTL — PAGE D'ACCUEIL
   =================================================== */

/* ── Topbar ── */
[dir="rtl"] .topbar-inner     { flex-direction: row-reverse; }
[dir="rtl"] .topbar-right     { flex-direction: row-reverse; }
[dir="rtl"] .topbar-links     { flex-direction: row-reverse; }
[dir="rtl"] .topbar-links a   {
  border-right: 1px solid rgba(255,255,255,0.3);
  border-left: none;
}
[dir="rtl"] .topbar-links a:first-child { border-right: none; }
[dir="rtl"] .topbar-links a:last-child  {
  border-left: 1px solid rgba(255,255,255,0.3);
}
[dir="rtl"] .topbar-lang {
  border-left: none;
  border-right: 1px solid rgba(255,255,255,0.3);
}

/* ── Header principal ── */
[dir="rtl"] .main-header-inner { flex-direction: row-reverse; }
[dir="rtl"] .main-nav-home     { flex-direction: row-reverse; }
[dir="rtl"] .logo-box          { flex-direction: row-reverse; }
[dir="rtl"] .logo-text         { text-align: right; }

/* ── Slider : boutons inversés en RTL ── */
[dir="rtl"] .slider-prev { left: auto;  right: 0; }
[dir="rtl"] .slider-next { right: auto; left: 0;  }

/* Texte du slider aligné à droite en arabe */
[dir="rtl"] .slide-caption          { text-align: right; }
[dir="rtl"] .slide-caption p        { margin-right: 0; margin-left: auto; max-width: 650px; }

/* ── Section À la une / Actualités ── */
[dir="rtl"] .a-la-une               { text-align: right; }
[dir="rtl"] .actualites-col         { text-align: right; }
[dir="rtl"] .section-title-gold     { border-bottom: 3px solid #f0a500; }

/* ── Titres de sections ── */
[dir="rtl"] .section-title-center   { text-align: center; }

/* ── Services tabs ── */
[dir="rtl"] .services-tabs          { flex-direction: row-reverse; }

/* ── Labels services ── */
[dir="rtl"] .svc-label              { text-align: center; }

/* ── Métiers ── */
[dir="rtl"] .metier-card h3         { text-align: center; }

/* ── Galerie ── */
[dir="rtl"] .gallery-header         { text-align: right; }
[dir="rtl"] .event-banner-info      { text-align: right; }
[dir="rtl"] .event-banner           { flex-direction: row-reverse; }
[dir="rtl"] figcaption              { text-align: right; }

/* ── Footer ── */
[dir="rtl"] .footer-inner           { flex-direction: row-reverse; }

/* ── Slider RTL (conservé pour rétro-compat.) ── */
[dir="rtl"] .slider-prev { left: auto;  right: 0; }
[dir="rtl"] .slider-next { right: auto; left: 0;  }

/* ===================================================
   HERO PLATEFORME
   =================================================== */
.hero-platform {
  background: linear-gradient(135deg, #0f2547 0%, #1b3a6b 60%, #1e4080 100%);
  padding: 4.5rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-platform::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(240,165,0,.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-platform-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-platform-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(240,165,0,.15);
  border: 1px solid rgba(240,165,0,.35);
  color: #f0c040;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.4rem;
  letter-spacing: .04em;
  justify-content: center;
}

.hero-platform-title {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.22;
  margin: 0 0 1rem;
  letter-spacing: -.02em;
}

.hero-platform-desc {
  color: rgba(255,255,255,.75);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 620px;
  margin: 0 auto 2rem;
}

/* Barre de recherche du héro */
.hero-platform-search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  padding: .35rem .35rem .35rem 1.1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  gap: .7rem;
  max-width: 620px;
  margin: 0 auto 2rem;
}

.hero-platform-search svg { flex-shrink: 0; }

.hero-platform-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: .97rem;
  color: #1e293b;
  background: transparent;
  min-width: 0;
  font-family: inherit;
}

.hero-platform-search input::placeholder { color: #94a3b8; }

.hero-platform-search button {
  flex-shrink: 0;
  background: #f0a500;
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: .65rem 1.5rem;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s;
  white-space: nowrap;
}

.hero-platform-search button:hover { background: #d48f00; }

/* Stats rapides */
.hero-platform-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255,255,255,.85);
}

.hp-stat strong {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f0c040;
  line-height: 1;
}

.hp-stat span {
  font-size: .78rem;
  margin-top: .25rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .75;
}

/* ===================================================
   TICKER ACTUALITÉS (menu défilant)
   =================================================== */
.news-ticker-bar {
  background: #1b3a6b;
  display: flex;
  align-items: center;
  height: 42px;
  overflow: hidden;
  user-select: none;
}

.ticker-label {
  flex-shrink: 0;
  background: #f0a500;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 0 1.1rem;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.ticker-overflow {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 9s linear infinite;
  will-change: transform;
}

.ticker-track span {
  color: rgba(255,255,255,.88);
  font-size: .82rem;
  padding: 0 2.5rem;
  flex-shrink: 0;
}

.ticker-track span::before {
  content: '▸ ';
  color: #f0a500;
  margin-right: .3rem;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.news-ticker-bar:hover .ticker-track { animation-play-state: paused; }

/* ===================================================
   DOMAINES PRINCIPAUX
   =================================================== */
.domains-section {
  padding: 4rem 1.5rem;
  background: #f8fafc;
}

.domains-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.domains-header-left { display: flex; flex-direction: column; gap: .3rem; }

.domains-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: #64748b;
  text-transform: uppercase;
}

.domains-header h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #1b3a6b;
  margin: 0;
}

.domains-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.domain-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}

.domain-card:hover {
  box-shadow: 0 8px 24px rgba(27,58,107,.12);
  transform: translateY(-3px);
  border-color: #c7d7f0;
}

.domain-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.domain-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
}

.domain-card p {
  font-size: .8rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* Centrage des 2 dernières cartes dans la grille 4 col */
.domain-card.domains-last-row:nth-child(13) { grid-column: 2; }
.domain-card.domains-last-row:nth-child(14) { grid-column: 3; }

/* ===================================================
   RESPONSIVE — NOUVELLES SECTIONS
   =================================================== */
@media (max-width: 1100px) {
  .domains-grid { grid-template-columns: repeat(3, 1fr); }
  .domain-card.domains-last-row:nth-child(13) { grid-column: auto; }
  .domain-card.domains-last-row:nth-child(14) { grid-column: auto; }
}

@media (max-width: 680px) {
  .hero-platform { padding: 3rem 1.25rem 2.5rem; }
  .hero-platform-stats { gap: 1.5rem; }
  .hp-stat strong { font-size: 1.2rem; }
  .hero-platform-search { border-radius: 14px; }
  .domains-grid { grid-template-columns: repeat(2, 1fr); }
  .domains-header { flex-direction: column; align-items: flex-start; }
  .domains-header .btn-gold { align-self: flex-start; }
}

@media (max-width: 400px) {
  .domains-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .domain-card { padding: 1.1rem 1rem; }
}

/* ===================================================
   RTL — NOUVELLES SECTIONS
   =================================================== */
[dir="rtl"] .hero-platform-inner { direction: rtl; }
[dir="rtl"] .hero-platform-badge { letter-spacing: 0; }
[dir="rtl"] .hero-platform-search { flex-direction: row-reverse; }
[dir="rtl"] .hero-platform-search input { text-align: right; }
[dir="rtl"] .hp-stat { align-items: center; }

[dir="rtl"] .news-ticker-bar { flex-direction: row-reverse; }
[dir="rtl"] .ticker-track { animation-direction: reverse; }

[dir="rtl"] .domains-header { flex-direction: row-reverse; }
[dir="rtl"] .domains-header-left { align-items: flex-end; }
[dir="rtl"] .domains-grid { direction: rtl; }
[dir="rtl"] .domain-card { text-align: right; }
[dir="rtl"] .footer-nav             { flex-direction: row-reverse; }
