/* ==================================================
   Universal Fab — Premium Pages CSS
   Splash screen, project sections, devis pages
   ================================================== */

/* ─── SPLASH SCREEN ─── */
#ufab-splash {
  position: fixed; inset: 0; z-index: 99999;
  background: #0a0a0a;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1);
}
#ufab-splash .splash-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #3D8BFF;
  animation: splashPulse 1.2s ease-in-out infinite;
  margin-bottom: 24px;
}
#ufab-splash .splash-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 28px; font-weight: 800;
  color: #fff; letter-spacing: 6px;
  text-transform: uppercase;
  opacity: 0; transform: translateY(20px);
  animation: splashFadeUp 0.8s 0.3s forwards;
}
#ufab-splash .splash-sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px; color: rgba(255,255,255,0.4);
  letter-spacing: 3px; text-transform: uppercase;
  margin-top: 12px;
  opacity: 0; transform: translateY(10px);
  animation: splashFadeUp 0.6s 0.8s forwards;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.4; }
}
@keyframes splashFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── PROJECT SHOWCASE (Landing page) ─── */
.ufab-projects {
  background: #0a0a0a; padding: 120px 5% 80px;
  position: relative; overflow: hidden;
}
.ufab-projects::before {
  content: ''; position: absolute; top: 0; left: 50%;
  width: 1px; height: 100px; background: linear-gradient(to bottom, transparent, #3D8BFF);
}
.ufab-projects__header {
  text-align: center; margin-bottom: 80px;
}
.ufab-projects__label {
  font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
  color: #3D8BFF; font-weight: 700; margin-bottom: 16px;
}
.ufab-projects__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 48px); font-weight: 800;
  color: #fff; line-height: 1.2;
}
.ufab-projects__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px; max-width: 1200px; margin: 0 auto;
}
.project-card {
  position: relative; border-radius: 20px; overflow: hidden;
  background: #111; aspect-ratio: 4/3;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1), box-shadow 0.5s;
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 60px rgba(61,139,255,0.15);
}
.project-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(.4,0,.2,1), filter 0.5s;
}
.project-card:hover img {
  transform: scale(1.08);
  filter: brightness(0.7);
}
.project-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 32px;
  transition: background 0.4s;
}
.project-card:hover .project-card__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 60%);
}
.project-card__number {
  font-size: 64px; font-weight: 900; color: rgba(61,139,255,0.15);
  position: absolute; top: 20px; right: 24px;
  font-family: 'Inter', system-ui, sans-serif;
}
.project-card__tag {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: #3D8BFF; font-weight: 700; margin-bottom: 8px;
}
.project-card__name {
  font-size: 22px; font-weight: 700; color: #fff;
  margin-bottom: 8px; font-family: 'Inter', system-ui, sans-serif;
}
.project-card__desc {
  font-size: 13px; color: rgba(255,255,255,0.6);
  line-height: 1.6; max-width: 360px;
}
.project-card__arrow {
  position: absolute; top: 24px; left: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateX(-10px);
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
  color: #fff; font-size: 18px;
}
.project-card:hover .project-card__arrow {
  opacity: 1; transform: translateX(0);
}

/* ─── ENGAGEMENT SECTION (Landing page) ─── */
.ufab-engagement {
  background: #0a0a0a; padding: 80px 5% 100px;
  text-align: center;
}
.ufab-engagement__text {
  max-width: 720px; margin: 0 auto 40px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.8; color: rgba(255,255,255,0.7);
  font-weight: 400;
}
.ufab-engagement__text strong {
  color: #3D8BFF; font-weight: 700;
}
.ufab-engagement__cta {
  display: inline-flex; align-items: center; gap: 12px;
  background: #3D8BFF; color: #fff;
  padding: 16px 36px; border-radius: 60px;
  text-decoration: none; font-weight: 700;
  font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
  border: none; cursor: pointer;
}
.ufab-engagement__cta:hover {
  background: #5BA0FF;
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(61,139,255,0.3);
}
.ufab-engagement__cta svg {
  transition: transform 0.3s;
}
.ufab-engagement__cta:hover svg {
  transform: translateX(4px);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .ufab-projects { padding: 80px 4% 60px; }
  .ufab-projects__grid { grid-template-columns: 1fr; gap: 24px; }
  .project-card { aspect-ratio: 3/2; }
  .ufab-engagement { padding: 60px 5% 80px; }
}

/* ─── DEVIS PAGES OVERRIDES ─── */
/* Clean headers for devis pages (replaces inline styles) */
.ufab-nav-btn {
  display: inline-flex !important; align-items: center; justify-content: center;
  padding: 10px 22px; border-radius: 50px;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
}
.ufab-btn-blue { background: #3D8BFF; color: #fff; border: none; }
.ufab-btn-blue:hover { background: #5BA0FF; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(61,139,255,0.3); }
.ufab-btn-dark { background: #222; color: #fff; border: 1px solid #333; }
.ufab-btn-dark:hover { background: #333; }
.ufab-btn-light { background: #f1f1f1; color: #111; border: 1px solid #ddd; }
.ufab-btn-light:hover { background: #e5e5e5; }

/* Devis page animations */
.rx-config { animation: fadeSlideUp 0.6s ease-out; }
.rx-table-group { animation: fadeSlideUp 0.6s ease-out backwards; }
.rx-table-group:nth-child(2) { animation-delay: 0.1s; }
.rx-table-group:nth-child(3) { animation-delay: 0.2s; }
.rx-table-group:nth-child(4) { animation-delay: 0.3s; }
.rx-table-group:nth-child(5) { animation-delay: 0.4s; }
.rx-table-group:nth-child(6) { animation-delay: 0.5s; }
.rx-table-group:nth-child(7) { animation-delay: 0.6s; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
