:where([class^="ri-"])::before { content: "\f3c2"; }

:root {
  --primary: #1E5AF5;
  --secondary: #0F172A;
  --accent: #FF7A00;
}

* { scroll-behavior: smooth; }

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

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

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #fff;
  color: var(--secondary);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */
#mainHeader {
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease;
}
#mainHeader.scrolled {
  box-shadow: 0 4px 20px rgba(15, 23, 42, .08);
}
#mainHeader nav a.active-link {
  color: var(--primary);
}

/* ---------- Hero ---------- */
.badge-pill {
  backdrop-filter: blur(6px);
}
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -15px) scale(1.05); }
  66% { transform: translate(-15px, 15px) scale(0.97); }
}
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  opacity: .5;
  animation: blob-float 12s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- Hero scrolling background (visuels produit générés, pas de photos de personnes) ---------- */
.hero-scroll-bg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  transform: rotate(-3deg) scale(1.15);
  opacity: .5;
}
.hero-scroll-row {
  display: flex;
  gap: 14px;
  width: max-content;
  will-change: transform;
}
.hero-scroll-row img {
  height: 190px;
  width: auto;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .1);
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .hero-scroll-row img {
    height: 260px;
  }
}
.hero-scroll-row-1 {
  animation: hero-scroll-left 55s linear infinite;
}
.hero-scroll-row-2 {
  animation: hero-scroll-right 55s linear infinite;
}
@keyframes hero-scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes hero-scroll-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
.hero-scroll-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff 0%, #fff 32%, rgba(255,255,255,.88) 50%, rgba(255,255,255,.55) 68%, rgba(255,255,255,.25) 100%),
              linear-gradient(0deg, #fff 0%, rgba(255,255,255,0) 18%, rgba(255,255,255,0) 82%, #fff 100%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-row-1,
  .hero-scroll-row-2 {
    animation-play-state: paused;
  }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ---------- Cards ---------- */
.service-card {
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  border: 1px solid transparent;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 35px rgba(15, 23, 42, .1);
  border-color: rgba(30,90,245,.25);
}
.service-icon {
  transition: transform .3s ease, background .3s ease;
}
.service-card:hover .service-icon {
  transform: scale(1.1) rotate(-6deg);
  background: var(--primary);
}
.service-card:hover .service-icon i { color: #fff !important; }

.project-card {
  transition: transform .3s ease, box-shadow .3s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px rgba(15, 23, 42, .1);
}
.project-thumb {
  background: linear-gradient(135deg, rgba(30,90,245,.12), rgba(255,122,0,.12));
}

.process-step {
  position: relative;
}
.process-step .step-num {
  transition: transform .3s ease;
}
.process-step:hover .step-num {
  transform: scale(1.1);
}

/* ---------- Pricing ---------- */
.pricing-card {
  transition: transform .3s ease, box-shadow .3s ease;
}
.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 40px rgba(15, 23, 42, .12);
}
.pricing-card.popular {
  transform: scale(1.03);
}
.pricing-card.popular:hover {
  transform: scale(1.03) translateY(-8px);
}

/* ---------- Trust / testimonial placeholder ---------- */
.trust-card {
  transition: transform .3s ease, box-shadow .3s ease;
}
.trust-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px rgba(15, 23, 42, .08);
}
.testimonial-placeholder {
  border: 2px dashed #cbd5e1;
}

/* ---------- Stats ---------- */
.stat-item .stat-number {
  font-variant-numeric: tabular-nums;
}

/* ---------- FAQ ---------- */
details.faq-item summary {
  list-style: none;
  cursor: pointer;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item .faq-icon {
  transition: transform .3s ease;
}
details.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}
details.faq-item[open] .faq-answer {
  animation: faq-open .3s ease;
}
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Forms ---------- */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 90, 245, .12);
}
.custom-checkbox {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  user-select: none;
}
.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 4px;
}
.custom-checkbox:hover input ~ .checkmark {
  border-color: var(--primary);
}
.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}
.custom-checkbox .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12) !important;
}
.field-error-msg {
  color: #ef4444;
  font-size: .8rem;
  margin-top: 4px;
}

#formFeedback {
  display: none;
}
#formFeedback.show {
  display: flex;
}

/* ---------- Floating action buttons ---------- */
#whatsappFloat {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 40;
  background-color: #25D366;
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 20px rgba(37, 211, 102, .45);
  transition: transform .2s ease;
}
#whatsappFloat:hover { transform: scale(1.08); }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
  100% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
}
#whatsappFloat::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: pulse-ring 2.2s ease-out infinite;
}

#backToTop {
  position: fixed;
  bottom: 24px;
  right: 92px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
}
#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- Tech marquee ---------- */
.marquee-track {
  animation: marquee 22s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Focus visibility (a11y) ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
