/* -----------------------------------------------------------
   style.css — Tailwind-friendly (léger & ciblé)
   - Slider (fondu + contenu)
   - Swiper pagination (couleurs thème)
   - RTL/LTR helpers (tel, emails, icônes)
   - Menu langue (centre + transition)
   - A11y & reduced-motion
------------------------------------------------------------ */

/* Évite les scrollbars horizontales dues aux effets */
html,
body {
  overflow-x: hidden;
}

:root {
  color-scheme: light;
} /* force UI navigateur (formulaires, scrollbars) en clair */

html {
  color-scheme: light;
  forced-color-adjust: none;
  background-color: #ffffff;
}
body {
  background-color: #ffffff;
  color: #111111;
}

/* =================== */
/*       HERO SLIDER   */
/* =================== */
.slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate; /* z-index safety */
}

/* Slides superposées + fondu */
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s cubic-bezier(0.2, 0.65, 0.3, 1);
  will-change: opacity;
}
.slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Fond plein cadre si utilisé via data-cover */
.slide[data-cover] {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Contenu animé (léger slide-up) */
.slide .content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.65, 0.3, 1) 0.4s,
    transform 0.6s cubic-bezier(0.2, 0.65, 0.3, 1) 0.4s;
}
.slide.active .content {
  opacity: 1;
  transform: translateY(0);
}

/* Overlay (couleur gérée en Tailwind, ici transition uniquement) */
.slide .overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.2, 0.65, 0.3, 1);
}
.slide.active .overlay {
  opacity: 0.5;
}

/* Utilitaires de fondu */
.fade-transition {
  transition: opacity 0.2s cubic-bezier(0.2, 0.65, 0.3, 1);
  opacity: 1;
}
.fade-out {
  opacity: 0;
}

/* =================== */
/*   SWIPER PAGINATION */
/* =================== */
/* Inactif: gris clair (tailwind gray-300) */

/* Place la pagination sous le slider, avec de l’air */
.projects-swiper .swiper-pagination {
  position: static !important; /* sort du positionnement absolu */
  margin-top: 1rem; /* espace sous les cartes */
}

/* Un peu plus d’espace sur mobile si tu veux */
@media (max-width: 640px) {
  .projects-swiper .swiper-pagination {
    margin-top: 1.25rem;
  }
}
@media (max-width: 402px) {
  .hide-below-402 {
    display: none;
  }
}

.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #000000;
  opacity: 1;
  margin: 0 8px !important;
  border-radius: 999px;
  outline: none;
  transition: transform 0.2s cubic-bezier(0.2, 0.65, 0.3, 1),
    background-color 0.2s cubic-bezier(0.2, 0.65, 0.3, 1);
}
/* Actif: jaune primaire (config Tailwind #FFC300) */
.swiper-pagination-bullet-active {
  background: #ffab76;
  transform: scale(1.15);
}

nav a.active {
  @apply text-primary;
}

nav a.active::after {
  width: 100% !important;
}

/* cache la petite flèche générée par Swiper */
.swiper-button-prev::after,
.swiper-button-next::after {
  display: none !important; /* ou content: none; selon ton setup */
}

/* Focus clavier visible */
.swiper-pagination-bullet:focus-visible {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #111827; /* anneau blanc + gris très foncé */
}
/* Décalage pagination si besoin */
.swiper-pagination {
  bottom: -20px !important;
}

/* propre et suffisant */
.projects-swiper {
  --swiper-navigation-color: #000; /* flèches noires */
}

/* =================== */
/*   HERO CONTROLS     */
/* =================== */
/* Empêche la sélection du texte sur les contrôles */
#prev,
#next,
.dot,
button,
.swiper-button-next,
.swiper-button-prev {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

/* Dot du hero */
.dot {
  width: 12px;
  height: 12px;
  background-color: #d1d5db; /* inactif */
  border-radius: 999px;
  transition: transform 0.2s cubic-bezier(0.2, 0.65, 0.3, 1),
    background-color 0.2s;
}
.dot.active {
  background-color: #ffc300; /* actif bien visible */
  transform: scale(1.2);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

#language-button[aria-expanded="true"] {
  background-color: #111111;
  color: #ffc300;
  box-shadow: 0 0 0 1px rgba(255, 195, 0, 0.3) inset;
}

/* Inversion visuelle des chevrons en RTL (icônes FontAwesome par ex.) */
[dir="rtl"] #prev i,
[dir="rtl"] #next i {
  transform: scaleX(-1);
}
.ltr-fragment {
  direction: ltr;
  unicode-bidi: isolate; /* isole la lecture LTR */
  white-space: nowrap; /* évite la coupure du numéro */
  display: inline-block; /* garde l’ensemble homogène */
}

/* =================== */
/*   LANG SWITCH MENU  */
/* =================== */
/* Le conteneur global (optionnel si tu l'as) suit la visibilité du header */
#navbar.nav-visible #language-button {
  opacity: 1;
  pointer-events: auto;
}

/* Menu centré, invisible par défaut (géré via .open en JS) */
#language-menu {
  opacity: 0;
  transform: translate(-50%, 0) scale(0.95);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
#language-menu.open {
  opacity: 1 !important;
  transform: translate(-50%, 0) scale(1) !important;
  pointer-events: auto !important;
}

/* =================== */
/*   RTL / LTR helpers */
/* =================== */
/* Empêche l’inversion des chiffres, +, @ en RTL (ex: numéros de tel, emails) */
.ltr-fragment {
  direction: ltr;
  unicode-bidi: isolate;
}
/* Mélanges Bidi auto si nécessaire */
.bidi-auto {
  unicode-bidi: plaintext;
}

/* Lignes contact icône + texte avec inversion logique en RTL */
.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
[dir="rtl"] .contact-line {
  flex-direction: row-reverse;
}

/* Réseaux sociaux: spacing stable + ordre inversé en RTL */
.socials {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
[dir="rtl"] .socials {
  flex-direction: row-reverse;
}

/* Colonnes footer en alignement logique (start => droite en RTL) */
.footer-col {
  text-align: start;
}
.footer-links a {
  display: inline-block;
  padding-block: 0.25rem;
}

/* =================== */
/*    ACCESSIBILITÉ    */
/* =================== */
@media (prefers-reduced-motion: reduce) {
  .slide,
  .slide .content,
  .slide .overlay,
  .fade-transition,
  .swiper-pagination-bullet,
  #language-menu {
    transition: none !important;
  }
}

/* =================== */
/*     MOBILE TWEAKS   */
/* =================== */
@media (max-width: 640px) {
  .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 6px !important;
  }
  .slide .content {
    transform: translateY(14px);
  }
}

.clients-track {
  margin-right: 4rem; /* équivalent à Tailwind mr-16 */
}
.clients-track {
  align-items: center; /* centre verticalement les logos */
  padding-top: 1rem; /* espace haut */
  padding-bottom: 1rem; /* espace bas */
}
