/* ===== ECUDEAL – Custom Styles ===== */

* { box-sizing: border-box; }

body { font-family: 'Inter', sans-serif; }

/* Navbar scroll effect */
#navbar {
  background: transparent;
}
#navbar.scrolled {
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Counter animation */
.counter { will-change: contents; }

/* Service card hover */
.service-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.service-card:hover { transform: translateY(-2px); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #080808; }
::-webkit-scrollbar-thumb { background: #222222; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* Form focus styles */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Upload drag zone */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

/* Progress bar animation */
@keyframes progress {
  from { width: 0%; }
}
.progress-bar { animation: progress 2s ease-out forwards; }

/* Badge pulse */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

/* Fade in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* Modal overlay animations */
@keyframes fadeInModal {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUpModal {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Selection color */
::selection { background: rgba(59, 130, 246, 0.3); color: white; }

/* ── Boutons CTA — gradient bleu ─────────────────────────── */
.bg-brand-500 {
  background: linear-gradient(160deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%) !important;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
.bg-brand-500:hover,
.hover\:bg-brand-600:hover {
  background: linear-gradient(160deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%) !important;
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

/* ── Liens & accents texte ────────────────────────────────── */
.text-brand-400 {
  color: #93c5fd !important;
}
.hover\:text-brand-300:hover {
  color: #bfdbfe !important;
}

/* ── Logo icon gradient ───────────────────────────────────── */
.from-brand-400 { --tw-gradient-from: #60a5fa !important; }
.to-brand-600   { --tw-gradient-to:   #2563eb !important; }

/* ── Autofill ─────────────────────────────────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #1c1c1e inset !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  border-color: rgba(255,255,255,0.1) !important;
  transition: background-color 9999s ease-in-out 0s;
}
#section-upload input:-webkit-autofill,
#section-upload input:-webkit-autofill:hover,
#section-upload input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #f9fafb inset !important;
  -webkit-text-fill-color: #111827 !important;
  caret-color: #111827;
  border-color: #d1d5db !important;
}

/* ── Wizard opt-card ─────────────────────────────────────── */
.opt-card {
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  cursor: pointer;
}
/* État SÉLECTIONNÉ — très visible : fond bleu marqué + bordure + ring + pastille ✓ */
.opt-card.selected {
  border-color: #3b82f6 !important;
  background-color: rgba(59,130,246,0.18) !important;
  box-shadow: 0 0 0 2px #3b82f6, 0 4px 14px rgba(59,130,246,0.35);
}
.opt-card.selected:hover {
  background-color: rgba(59,130,246,0.22) !important;
}
/* Icône plus lumineuse quand sélectionné */
.opt-card.selected > span:first-child {
  background-color: rgba(59,130,246,0.35) !important;
}
/* Nom en blanc franc quand sélectionné */
.opt-card.selected > span:nth-child(2) {
  color: #ffffff !important;
}
/* Pastille ✓ dans le coin supérieur droit */
.opt-card.selected::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: #3b82f6;
  color: #ffffff;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 900;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px #1a253a;
  z-index: 5;
}

/* ── Invalid avant soumission ─────────────────────────────── */
input:invalid {
  box-shadow: none !important;
  outline: none !important;
}
input:not(:placeholder-shown):invalid {
  border-color: rgba(96,165,250,0.5) !important;
}

/* ── Hero reveal ─────────────────────────────────────────── */
/* NOTE: filter:blur retiré — il casse -webkit-background-clip:text sur Chrome */
.hero-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(26px);
  animation: hero-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Titre hero : aurora — animation sur color (pas de background-clip) ── */
.text-chrome {
  color: #93c5fd;
  animation: aurora-flow 4s ease-in-out infinite;
}

@keyframes aurora-flow {
  0%, 100% { color: #bfdbfe; }   /* blue-200  */
  30%       { color: #60a5fa; }  /* blue-400  */
  60%       { color: #93c5fd; }  /* blue-300  */
}

/* ── Grain / noise texture ──────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Glass card ─────────────────────────────────────────── */
.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.07);
}
.glass-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(59,130,246,0.25);
}

/* ── CTA bouton principal — glow bleu pulsant ───────────── */
.btn-glow {
  position: relative;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  box-shadow: 0 0 0 0 rgba(59,130,246,0.5);
  animation: btn-pulse 3s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(59,130,246,0.5);
  animation: none;
}
@keyframes btn-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(59,130,246,0); }
}

/* ── Stats hero — ligne séparateur brillant ─────────────── */
.stat-sep {
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.12), transparent);
}

/* ── Ambient blob animé ─────────────────────────────────── */
@keyframes blob-drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(30px,-20px) scale(1.05); }
  66%     { transform: translate(-20px,15px) scale(0.97); }
}
.blob-animate { animation: blob-drift 12s ease-in-out infinite; }
.blob-animate-slow { animation: blob-drift 18s ease-in-out infinite reverse; }

/* ── Service cards premium ──────────────────────────────── */
.service-card-premium {
  background: linear-gradient(135deg, rgba(30,41,59,0.8) 0%, rgba(15,23,42,0.9) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}
.service-card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.service-card-premium:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(59,130,246,0.1);
}
.service-card-premium:hover::before { opacity: 1; }

/* ── Prestige card — effet bleu premium ─────────────────── */
.prestige-glow {
  position: relative;
}
.prestige-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #3b82f6, #60a5fa, #3b82f6, #2563eb);
  background-size: 300% 300%;
  animation: blue-shift 4s ease infinite;
  z-index: -1;
  opacity: 0.5;
}
@keyframes blue-shift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* ── Scroll reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Badge section premium ──────────────────────────────── */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: #93c5fd;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
}

/* ── Logo ECUDEAL — alternance bleu / blanc ─────────────── */
@keyframes logo-ecu {
  0%,  40% { color: #60a5fa; }   /* bleu  */
  50%, 90% { color: #ffffff; }   /* blanc */
  100%     { color: #60a5fa; }
}
@keyframes logo-deal {
  0%,  40% { color: #ffffff; }   /* blanc */
  50%, 90% { color: #60a5fa; }   /* bleu  */
  100%     { color: #ffffff; }
}
.logo-ecu  { animation: logo-ecu  4s ease-in-out infinite; }
.logo-deal { animation: logo-deal 4s ease-in-out infinite; }

/* ── Accessibilité ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Mobile responsive fixes ──────────────────────────────────── */

/* Wizard steps — masque les labels texte sur xs pour éviter le débordement */
@media (max-width: 639px) {
  .wizard-step-indicator span { display: none; }
}

/* Wizard cards — padding réduit sur xs */
@media (max-width: 639px) {
  #wstep-1,
  #wstep-2 > div,
  #wstep-3 > div { padding: 1rem !important; }
}

/* Tables — conteneur scrollable horizontal */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Opt-cards — compacter sur xs */
@media (max-width: 639px) {
  .opt-card { padding: 0.75rem; }
  .opt-card .w-10 { width: 2rem; height: 2rem; flex-shrink: 0; }
}

/* Topbar — réduire le gap sur très petits écrans */
@media (max-width: 399px) {
  header .ml-auto { gap: 0.5rem; }
}

/* ── Dashboard — commandes : stacker le badge sous le texte sur xs ── */
@media (max-width: 479px) {
  /* Order rows dans la liste de commandes */
  #section-orders .flex.items-center.gap-4 {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  #section-orders .flex.items-center.gap-4 .w-12 {
    display: none; /* masque l'icône statut sur très petit écran */
  }
  #section-orders .flex.items-center.gap-4 .flex-shrink-0 {
    margin-left: auto;
  }
  /* Progress bar — 100% width sur xs */
  #section-orders .w-48 { width: 100%; }
}

/* ── Dashboard main — évite le dépassement horizontal ── */
#section-dashboard .grid {
  min-width: 0;
}

/* ── Support section — form labels réduire tracking sur xs ── */
@media (max-width: 479px) {
  #section-support label {
    letter-spacing: 0.05em;
  }
  /* Tickets list — stack reply input + button */
  #tickets-list .flex.flex-wrap.gap-2 {
    flex-direction: column;
  }
}

/* ── Upload wizard étape 2 — options scrollables si trop longues ── */
@media (max-width: 639px) {
  #wstep-2 .grid.sm\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Sidebar credits bloc — compact sur mobile ── */
@media (max-width: 1023px) {
  #sidebar .grid.grid-cols-2 button {
    padding: 0.4rem 0.25rem;
  }
}

/* ════════════════════════════════════════════════════════════
   Effets « magie » page d'accueil
   ════════════════════════════════════════════════════════════ */

/* Titre chromé : reflet brillant qui balaie (clip-text gradient) */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-chrome {
    background: linear-gradient(100deg,
      #3b82f6 0%, #60a5fa 30%, #93c5fd 42%, #ffffff 50%, #93c5fd 58%, #60a5fa 70%, #3b82f6 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: chrome-shine 8s linear infinite;
  }
}
@keyframes chrome-shine {
  0%   { background-position: 250% 0; }
  100% { background-position: -50% 0; }
}

/* Cartes 3D : reflet lumineux qui suit le curseur */
.service-card { position: relative; transform-style: preserve-3d; will-change: transform; }
.service-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.service-card:hover::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .text-chrome { animation: none; }
  .service-card::after { display: none; }
}
