/* Ouest Info Services — styles complémentaires à Tailwind */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Empêche les sections d'être masquées sous le header fixe lors d'un clic d'ancrage */
section[id] {
  scroll-margin-top: 5.5rem;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
}

/* ---------- Accessibilité ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #EA580C;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
  z-index: 100;
  font-weight: 600;
  font-size: 0.875rem;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid #EA580C;
  outline-offset: 2px;
}

/* ---------- Header shadow on scroll ---------- */
#site-header {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
#site-header.scrolled {
  box-shadow: 0 4px 24px -8px rgba(15, 23, 42, 0.12);
}

/* ---------- Scroll progress bar ---------- */
#scroll-progress {
  width: 0%;
  transition: width 0.1s linear;
}

/* ---------- Back to top button ---------- */
.back-to-top {
  transition: opacity 0.35s ease, transform 0.35s ease, background-color 0.2s ease;
}
.back-to-top.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* ---------- Navigation ---------- */
.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover,
.nav-link.active {
  color: #EA580C;
}
.nav-link::before {
  content: "";
  position: absolute;
  inset: -8px -12px;
  background: #FFF7ED;
  border-radius: 999px;
  transform: scale(0.85);
  opacity: 0;
  z-index: -1;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.nav-link.active::before {
  opacity: 1;
  transform: scale(1);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #EA580C;
  transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link-mobile {
  padding: 0.75rem 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1E293B;
  border-bottom: 1px solid #F1F5F9;
}
.nav-link-mobile:last-of-type {
  border-bottom: none;
}

/* ---------- Mobile menu (animated collapse) ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
#mobile-menu.menu-open {
  max-height: 32rem;
  opacity: 1;
}
#icon-menu-open,
#icon-menu-close {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Service cards ---------- */
.service-card {
  background: #fff;
  border: 1px solid #F1F5F9;
  border-radius: 1.25rem;
  padding: 2rem 1.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(234, 88, 12, 0.18);
  border-color: #FFEDD5;
}
.service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: #FFF7ED;
  color: #EA580C;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, color 0.3s ease;
}
.service-icon i {
  width: 1.5rem;
  height: 1.5rem;
}
.service-card:hover .service-icon {
  transform: scale(1.12) rotate(-8deg);
  background: #EA580C;
  color: #fff;
}
.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}
.service-card p {
  font-size: 0.9rem;
  color: #64748B;
  line-height: 1.5;
}

/* ---------- Partner badges ---------- */
.badge-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.badge-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -16px rgba(15, 23, 42, 0.15);
}
.badge-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #FEF2F2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, color 0.3s ease;
}
.badge-icon i {
  width: 1.6rem;
  height: 1.6rem;
}
.badge-card:hover .badge-icon {
  transform: scale(1.12) rotate(8deg);
  background: #DC2626;
  color: #fff;
}
.badge-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #1E293B;
  font-size: 1.05rem;
}
.badge-label {
  font-size: 0.8rem;
  color: #94A3B8;
  margin-top: 0.15rem;
}

/* ---------- Forms ---------- */
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  color: #1E293B;
  background: #F8FAFC;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: #EA580C;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}
.form-input.field-error {
  border-color: #DC2626;
  background: #FEF2F2;
}
.form-error {
  font-size: 0.78rem;
  color: #DC2626;
  margin-top: 0.35rem;
}

/* ---------- Footer links ---------- */
.footer-link {
  color: #94A3B8;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: #fff;
}

/* ---------- Scroll reveal ---------- */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
  will-change: transform, opacity;
}
.reveal {
  transform: translateY(28px);
}
.reveal-left {
  transform: translateX(-40px);
}
.reveal-right {
  transform: translateX(40px);
}
.reveal-scale {
  transform: translateY(18px) scale(0.92);
}

.reveal.is-visible {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-left.is-visible {
  animation: slideInLeft 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-right.is-visible {
  animation: slideInRight 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-scale.is-visible {
  animation: popIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  to { opacity: 1; transform: translateX(0); }
}
@keyframes popIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stagger : décale l'apparition des enfants directs d'une grille */
.stagger > *:nth-child(1) { animation-delay: 0ms !important; }
.stagger > *:nth-child(2) { animation-delay: 90ms !important; }
.stagger > *:nth-child(3) { animation-delay: 180ms !important; }
.stagger > *:nth-child(4) { animation-delay: 270ms !important; }
.stagger > *:nth-child(5) { animation-delay: 360ms !important; }
.stagger > *:nth-child(6) { animation-delay: 450ms !important; }
.stagger > *:nth-child(7) { animation-delay: 540ms !important; }
.stagger > *:nth-child(8) { animation-delay: 630ms !important; }

/* ---------- Décorations flottantes (hero) ---------- */
.animate-blob {
  animation: blobMove 9s ease-in-out infinite;
}
.animate-blob-delay {
  animation: blobMove 11s ease-in-out infinite;
  animation-delay: -4s;
}
@keyframes blobMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(18px, -24px) scale(1.08); }
  66% { transform: translate(-14px, 14px) scale(0.94); }
}

.animate-float {
  animation: floatY 4.5s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- CTA glow ---------- */
.btn-glow {
  position: relative;
  animation: glowPulse 2.6s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 8px 20px -6px rgba(234, 88, 12, 0.45); }
  50% { box-shadow: 0 10px 32px -4px rgba(234, 88, 12, 0.7); }
}

/* ---------- Sweep lumineux au survol des boutons ---------- */
.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 48%, rgba(255, 255, 255, 0.45) 52%, transparent 70%);
  transform: translateX(-120%);
  z-index: 1;
  pointer-events: none;
}
.btn-shine:hover::after {
  animation: shineSweep 0.85s ease forwards;
}
@keyframes shineSweep {
  to { transform: translateX(120%); }
}

/* ---------- Texte en dégradé animé ---------- */
.text-gradient-animate {
  background: linear-gradient(90deg, #EA580C, #DC2626, #F97316, #EA580C);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientPan 6s linear infinite;
}
@keyframes gradientPan {
  to { background-position: 300% center; }
}

/* ---------- Indicateur "scroll cue" en bas du hero ---------- */
.scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1.5px solid rgba(234, 88, 12, 0.35);
  color: #EA580C;
  transition: border-color 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}
.scroll-cue:hover {
  border-color: #EA580C;
  background: #FFF7ED;
  transform: translateY(2px);
}

/* ---------- Bulle de notification (ping) ---------- */
.ping-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  display: flex;
  height: 0.8rem;
  width: 0.8rem;
}
.ping-badge .ping-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #DC2626;
  opacity: 0.75;
  animation: pingRing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.ping-badge .ping-dot {
  position: relative;
  display: inline-flex;
  border-radius: 999px;
  height: 0.8rem;
  width: 0.8rem;
  background: #DC2626;
  border: 2px solid #fff;
}
@keyframes pingRing {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* ---------- Inclinaison 3D de la carte hero ---------- */
#hero-showcase {
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- Icônes de la carte "supervision proactive" ---------- */
.icon-pop {
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
  .animate-blob,
  .animate-blob-delay,
  .animate-float,
  .btn-glow,
  .icon-pop,
  .text-gradient-animate,
  .ping-badge .ping-ring,
  .animate-bounce,
  .animate-ping {
    animation: none !important;
  }
  .btn-shine::after {
    display: none;
  }
  #hero-showcase {
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Scrollbar (optionnel, esthétique) ---------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #F8FAFC;
}
::-webkit-scrollbar-thumb {
  background: #FDBA74;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #EA580C;
}
