@import url('utilities.css');
:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-accent: 'Outfit', sans-serif;
  
  /* Brand Colors - Based on Nesefort Logo */
  --primary: #0046ad;
  --primary-dark: #002d72;
  --secondary: #ea1d24;
  --secondary-dark: #be1219;
  --accent: #ffcc00;
  
  /* Surface Colors */
  --bg-light: #ffffff;
  --bg-gray: #f8f9fa;
  --bg-dark: #0a0e14;
  --surface: rgba(255, 255, 255, 0.8);
  --glass: rgba(255, 255, 255, 0.6);
  
  /* Text */
  --text-main: #1a1a1a;
  --text-muted: #334155; /* Assombri pour meilleure lecture (bleu foncé) */
  --white: #ffffff;
  
  /* Effects */
  --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --blur: blur(20px);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Effet de profondeur 2026 */
  --glass-effect: rgba(255, 255, 255, 0.05);
  --border-glow: linear-gradient(135deg, var(--primary), var(--secondary));
  
  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --speed: 0.3s;
}

/* Dark Mode 2026 Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: #0a0e14;
    --bg-gray: #151b23;
    --bg-dark: #010409;
    --surface: rgba(21, 27, 35, 0.8);
    --glass: rgba(21, 27, 35, 0.6);
    --text-main: #f0f6fc;
    --text-muted: #94a3b8;
    --white: #0d1117;
    --glass-effect: rgba(255, 255, 255, 0.03);
  }

  /* --- Cards en dark mode --- */
  .card-premium, .price-card, .form-box {
    background: var(--white);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  /* --- Header scrolled --- */
  .header.scrolled {
    background: rgba(13, 17, 23, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  .navbar { background: rgba(13, 17, 23, 0.95); }

  /* --- Menu hamburger : fond sombre → texte BLANC --- */
  .nav-links.open {
    background: rgba(21, 27, 35, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  .nav-links.open .nav-link {
    color: #f0f6fc !important;
    font-weight: 800 !important;
  }

  /* --- Backgrounds inline blancs → fond sombre --- */
  .u-bg-white, .u-bg-white {
    background: var(--bg-light) !important;
  }

  /* --- SECTIONS SOMBRES (bg-dark) : restaurer texte clair ---
       Problème : --white devient #0d1117 → invisible sur fond noir */
  .u-bg-bg-dark,
  .u-bg-0a0e14,
  .u-bg-00102a {
    color: rgba(240, 246, 252, 0.92) !important;
  }
  .u-bg-bg-dark li,
  .u-bg-bg-dark p {
    color: rgba(240, 246, 252, 0.78) !important;
  }
  /* Titres dans sections sombres */
  .u-bg-bg-dark h2,
  .u-bg-bg-dark h3 {
    color: #f0f6fc !important;
  }

  /* --- OFFRE CARDS (projet-cocody-djibi) ---
       background: white hardcodé → texte clair invisible */
  .offre-card {
    background: #1a2235 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }
  .offre-card h3 {
    color: var(--primary) !important;
  }
  .offre-card.premium h3 {
    color: var(--accent) !important;
  }
  .offre-card p,
  .offre-card li span {
    color: rgba(240, 246, 252, 0.75) !important;
  }
  /* Prix et chiffres */
  .offre-card .u-fs-2-5rem {
    color: rgba(240, 246, 252, 0.9) !important;
  }
  /* Ligne acompte (bold primary) */
  .offre-card li.u-c-primary span,
  .offre-card li.u-fw-700 span {
    color: var(--primary) !important;
  }
  /* Bouton fond sombre dans card */
  .offre-card .u-bg-bg-dark,
  .offre-card .u-bg-0a0e14 {
    background: rgba(255,255,255,0.1) !important;
    color: #f0f6fc !important;
    border-color: rgba(255,255,255,0.2) !important;
  }

  /* --- FORMULAIRE DEVIS en dark mode --- */
  .form-box {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    background: #1f2937 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f0f6fc !important;
  }
  .form-group label { color: #f0f6fc !important; }
  .form-group select option { background: #1f2937; color: #f0f6fc; }
  .conditional-section { background: #1f2937 !important; }
  .progress-wrapper { background: #374151 !important; }
  .step-dot {
    background: #374151 !important;
    color: rgba(240, 246, 252, 0.7) !important;
  }
  .step-dot.active {
    background: var(--primary) !important;
    color: white !important;
  }
  .step-dot.completed {
    background: #27ae60 !important;
    color: white !important;
  }

  /* --- Sidebar info page devis --- */
  .sidebar-info h1 { color: #f0f6fc !important; }
  .sidebar-info p   { color: rgba(240, 246, 252, 0.7) !important; }
  .sidebar-info h4  { color: #f0f6fc !important; }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.5;
}

img, video {
  max-width: 100%;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-accent);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Base Components */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  text-decoration: none;
  border: none;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  border-radius: 14px;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 70, 173, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(234, 29, 36, 0.3);
}

.btn-glass {
  background: var(--glass);
  backdrop-filter: var(--blur);
  color: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Layout Utilities */
.section {
  padding: 100px 0;
}

.plaquette {
  background: var(--bg-gray);
}

.plaquette-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.plaquette-content {
  padding: 3rem;
}

.plaquette-img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}

@media (max-width: 1024px) {
  .plaquette-card { grid-template-columns: 1fr; }
  .plaquette-content { padding: 2rem; }
  .plaquette-img { min-height: 360px; }
}

.grid {
  display: grid;
  gap: 2rem;
}

/* Immobilier: galerie d'images stable (évite les décalages cassés) */
.immo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.immo-gallery-img {
  width: 100%;
  height: 350px;
  border-radius: var(--radius-lg);
  display: block;
  object-fit: cover;
  object-position: center;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.06);
  background: #0a0e14;
}

/* Décalage “design” seulement sur grands écrans */
@media (min-width: 1025px) {
  .immo-gallery-img--offset {
    transform: translateY(2rem);
  }
}

@media (max-width: 1024px) {
  .immo-gallery { grid-template-columns: repeat(2, 1fr); }
  .immo-gallery-img { height: 320px; }
  .immo-gallery-img--offset { transform: none; }
}

@media (max-width: 768px) {
  .immo-gallery { grid-template-columns: 1fr; }
  .immo-gallery-img { height: 260px; }
}

/* Navbar Premium */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all var(--speed) var(--ease);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: var(--blur);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-container > nav {
  flex: 0 1 auto;
  display: flex;
  justify-content: flex-start;
  min-width: 0;
}

/* Ajustement exclusif page d'accueil */
.home-page .nav-container > nav {
  margin-left: 0.7rem;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.logo {
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}

.logo-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

.logo-text .logo-fort,
.logo-text .logo-nese {
  line-height: 1;
}

.logo-text .logo-nese { margin-right: 2px; }
.logo-text .logo-fort { margin-left: 2px; }

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo-img { height: 40px; }
}

.logo-nese { color: var(--primary); }
.logo-fort { color: var(--secondary); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  justify-content: flex-start;
  min-width: 0;
}

/* Évite la confusion "Contact" vs boutons */
.nav-links {
  padding-right: 1.25rem;
}

/* Footer: aligne icône + texte sans débordement */
.footer-contact {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
}

.footer-contact-ico {
  width: 1.4rem;
  flex: 0 0 1.4rem;
  line-height: 1.2;
}

.footer-contact-item a,
.footer-contact-item span {
  min-width: 0;
  overflow-wrap: normal;
}

/* Empêche le retour à la ligne sur téléphone / email (desktop) */
.footer-contact-item a {
  white-space: nowrap;
}

@media (max-width: 420px) {
  .footer-contact-item a { white-space: normal; }
}

/* Bouton WhatsApp flottant global */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.82rem;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  gap: 0;
  animation: whatsappPulse 2.4s ease-in-out infinite;
  text-align: center;
  line-height: 1;
  font-size: 0.92rem;
  min-width: 108px;
  white-space: nowrap;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
}

.whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  font-size: 0.9rem;
  line-height: 1;
}

.whatsapp-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }
  50% { box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45); }
}

.wa-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
}

.wa-inline-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  flex: 0 0 16px;
}

.icon-credit {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
}

.icon-credit a {
  color: inherit;
  text-decoration: underline;
}

/* Sur header sombre, séparateur plus doux */
.header:not(.scrolled) .nav-actions {
  border-left-color: rgba(255, 255, 255, 0.18);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  color: var(--text-main);
  cursor: pointer;
}

.header.scrolled .nav-toggle {
  border-color: rgba(0, 0, 0, 0.08);
}

.nav-toggle:focus-visible {
  outline: 3px solid rgba(0, 70, 173, 0.35);
  outline-offset: 3px;
}

.nav-link {
  text-decoration: none;
  font-weight: 700;
  color: var(--text-main);
  transition: color var(--speed) var(--ease);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--speed) var(--ease);
}

.nav-link:hover::after { width: 100%; }

/* Navbar sur fond sombre (hero) : liens visibles en blanc */
.header:not(.scrolled) .nav-link {
  color: #ffffff;
}

.header:not(.scrolled) .nav-link::after {
  background: rgba(255, 255, 255, 0.9);
}

.header:not(.scrolled) .nav-toggle {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

/* Hero Dynamic 2026 */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 70% 30%, rgba(0, 70, 173, 0.15), transparent 60%);
}

.hero-bg-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative;
  z-index: 10;
  color: var(--white);
  max-width: 800px;
}

.hero-title {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards var(--ease);
}

.hero-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s 0.2s forwards var(--ease);
}

/* Animations */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cards Premium */
.card-premium {
  position: relative;
  overflow: hidden;
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow var(--speed) var(--ease), border var(--speed) var(--ease);
}

.card-premium:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border: 1px solid transparent;
  border-image: var(--border-glow) 1;
}

/* Glass Card */
.card-glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: var(--white);
}

/* Pricing Section */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.price-card {
  padding: 3rem 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  position: relative;
}

.price-card.popular {
  border: 2px solid var(--primary);
  transform: scale(1.05);
  z-index: 10;
}

.price-tag {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 1.5rem 0;
  color: var(--primary);
}

.price-currency {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1280px) {
  .nav-links { gap: 1.3rem; }
  .nav-link { font-size: 0.95rem; }
  .nav-actions { gap: 0.45rem; padding-left: 0.7rem; }
  .nav-actions .btn-sm { padding: 0.45rem 0.7rem; font-size: 0.77rem; }
}

@media (max-width: 1100px) {
  .nav-links { gap: 0.9rem; }
  .nav-link { font-size: 0.88rem; }
  .logo { font-size: 1.25rem; }
  .logo-img { height: 42px; }
  .nav-actions .btn-sm { padding: 0.42rem 0.58rem; font-size: 0.72rem; }
}

@media (max-width: 1024px) {
  .hero-title { font-size: 4rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 1.25rem; }
  .nav-actions { padding-left: 0.75rem; gap: 0.5rem; }
  .btn-sm { padding: 0.45rem 0.75rem; font-size: 0.8rem; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 2rem !important; }

  /* Corrige les grilles inline qui restent en 2 colonnes */
  .grid.u-grid-cols-1fr-1fr,
  .grid.u-grid-cols-1-15fr-0-85fr,
  .grid.u-grid-cols-2fr-1fr,
  .grid.u-grid-cols-1fr-1-5fr,
  .container.u-grid-cols-1fr-1fr {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .hero-title { font-size: 3rem; }
  .hero-description { font-size: 1rem; }
  .section { padding: 72px 0; }
  .header { padding: 0.9rem 0; }
  .nav-container { gap: 0.65rem; }
  .logo { min-width: 0; max-width: 72vw; }
  .logo-text { font-size: 0.9rem; }
  .nav-actions {
    border-left: none;
    padding-left: 0;
    gap: 0.45rem;
  }
  .nav-actions .btn-sm {
    padding: 0.42rem 0.62rem;
    font-size: 0.73rem;
  }
  .nav-actions .btn-secondary {
    display: none;
  }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: calc(100% + 12px);
    right: 2rem;
    left: 2rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--blur);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open .nav-link {
    color: #000000 !important;
    font-weight: 800 !important;
  }
  .header.scrolled .nav-links.open {
    background: rgba(255, 255, 255, 0.95);
  }
  .container { padding: 0 1rem; }
  .hero-btns { flex-direction: column !important; align-items: stretch; }
  .hero-btns .btn { width: 100%; }
  .plaquette-content { padding: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .card-premium, .card-glass, .price-card, .form-box {
    padding: 1.2rem !important;
  }
}

@media (max-width: 390px) {
  .hero-title { font-size: 2.2rem; }
  .logo-text { font-size: 0.84rem; }
  .logo-img { height: 34px !important; }
  .btn-sm { padding: 0.4rem 0.65rem; font-size: 0.74rem; }
  .nav-actions { padding-left: 0.5rem; gap: 0.4rem; }
  .whatsapp-float { right: 12px; bottom: 12px; padding: 0.56rem 0.72rem; font-size: 0.82rem; min-width: 90px; }
}

@media (max-width: 360px) {
  .hero-title { font-size: 2rem; }
  .logo-text { font-size: 0.76rem; }
  .nav-links.open { left: 1rem; right: 1rem; }
}

/* QA Responsive Finale (mobile-first) */
@media (max-width: 768px) {
  .nav-actions .btn-glass { display: none !important; }
  /* Evite les debordements horizontaux residuels */
  html, body { overflow-x: hidden; }

  /* Reserve de l'espace pour le bouton WhatsApp flottant */
  body { padding-bottom: 84px; }

  /* Grilles inline frequentes -> 1 colonne */
  .u-grid-cols-rep-3-1fr,
  .u-grid-cols-rep-4-1fr,
  .u-grid-cols-1fr-1fr,
  .u-grid-cols-2fr-1fr,
  .u-grid-cols-1-15fr-0-85fr,
  .u-grid-cols-1fr-1-5fr,
  .u-grid-cols-1fr-2fr {
    grid-template-columns: 1fr !important;
  }

  .u-gap-4rem { gap: 1.25rem !important; }
  .u-gap-3rem { gap: 1rem !important; }

  /* Titres inline volumineux -> tailles coherentes mobile */
  .u-fs-4rem { font-size: 2.2rem !important; }
  .u-fs-3-5rem { font-size: 2rem !important; }
  .u-fs-3rem { font-size: 1.85rem !important; }
  .u-fs-2-5rem { font-size: 1.6rem !important; }

  /* Cartes / blocs avec gros paddings inline */
  .u-p-3rem { padding: 1.25rem !important; }
  .u-p-2-5rem { padding: 1.1rem !important; }

  /* Images inline: toujours adaptatives */
  img { max-width: 100%; height: auto; }
}

@media (max-width: 390px) {
  body { padding-bottom: 92px; }
  .whatsapp-float { max-width: calc(100vw - 24px); }
}

@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .logo-img { height: 32px !important; }
  .logo-text { font-size: 0.8rem; }
  .nav-actions .btn-sm {
    padding: 0.36rem 0.54rem;
    font-size: 0.68rem;
  }
  .footer-contact-item {
    align-items: center;
  }
}

/* Micro-interaction (sans JS) */
.price-card.popular {
  animation: popularPulse 3s ease-in-out infinite;
}

@keyframes popularPulse {
  0%, 100% { transform: scale(1.05); }
  50% { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .price-card.popular { animation: none; }
}

/* Animations de Révélation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s var(--ease);
}

.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Bento Grid 2026 */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 280px);
  gap: 1.5rem;
  margin-top: 3rem;
}

.bento-item {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  position: relative;
  transition: var(--transition);
}

.bento-content {
  position: relative;
  z-index: 2;
}

.btp-main { 
  grid-column: span 2; 
  grid-row: span 2; 
  background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.9)), url('assets/integral-stadium-render.png'); 
  color: white;
}

.immo-square { 
  grid-column: span 1; 
  background: var(--primary); 
  color: white; 
  justify-content: center; 
  align-items: center; 
  text-align: center;
}

.digital-square { 
  grid-column: span 1; 
  background: var(--secondary); 
  color: white; 
  justify-content: center; 
  align-items: center; 
  text-align: center;
}

.foncier-wide { 
  grid-column: span 2; 
  background: var(--bg-dark); 
  color: white; 
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
}

@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
  .btp-main, .foncier-wide { grid-column: span 2; height: 350px; }
}

@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr; }
  .btp-main, .foncier-wide, .immo-square, .digital-square { grid-column: span 1; height: 300px; }
}

/* Hero CTA buttons */
.hero-btns {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-btns .btn { width: 100%; }
}

/* Footer sous-pages : grille responsive */
.footer-sub .container.u-grid-cols-2fr-1fr-1fr {
  display: grid !important;
}

@media (max-width: 1024px) {
  .footer-sub .container.u-grid-cols-2fr-1fr-1fr {
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
  }
}

@media (max-width: 768px) {
  .footer-sub .container.u-grid-cols-2fr-1fr-1fr {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

/* Grilles 2 colonnes en section services/méthode : forcer 1 col sur mobile */
@media (max-width: 768px) {
  .grid.u-grid-cols-1fr-1fr,
  .grid.u-grid-cols-1fr-1-5fr,
  .grid.u-grid-cols-1-15fr-0-85fr,
  .grid.u-grid-cols-1-1fr-0-9fr {
    grid-template-columns: 1fr !important;
  }
}

/* Section projets - grille 2 colonnes inline index.html */
@media (max-width: 768px) {
  .container.grid-2.u-grid-cols-1fr-1fr {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   RESPONSIVE TABLETTE (768px – 1024px)
   ============================================================ */
@media (max-width: 1024px) and (min-width: 769px) {
  .hero-title { font-size: 3.5rem; }
  .hero-description { font-size: 1.1rem; }

  /* Grilles 3 colonnes → 2 colonnes */
  .u-grid-cols-rep-3-1fr,
  .u-grid-cols-1fr-1fr-1fr {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Footer 3 colonnes → 2 colonnes */
  .u-grid-cols-2fr-1-5fr-0-8fr,
  .u-grid-cols-2fr-1fr-1fr,
  .u-grid-cols-2fr-1-5fr-1fr {
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
  }

  /* Cards pricing côte à côte */
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Bento grid */
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .btp-main { grid-column: span 2; height: 320px; }
  .foncier-wide { grid-column: span 2; }
  .immo-square, .digital-square { grid-column: span 1; }

  /* Simulateur revenus */
  .card-premium.u-max-w-600px {
    max-width: 100% !important;
  }
}

/* ============================================================
   RESPONSIVE MOBILE (< 768px) — RENFORCÉ
   ============================================================ */
@media (max-width: 768px) {

  /* --- Hero --- */
  .hero { min-height: 90vh; }
  .hero-content { max-width: 100%; padding: 0 1rem; }
  .hero-title { font-size: 2.6rem; line-height: 1.1; }
  .hero-description { font-size: 1rem; }

  /* --- Section padding --- */
  .section { padding: 64px 0; }

  /* --- Toutes les grilles → 1 colonne --- */
  .u-grid-cols-rep-3-1fr,
  .u-grid-cols-rep-4-1fr,
  .u-grid-cols-rep-2-1fr,
  .u-grid-cols-1fr-1fr,
  .u-grid-cols-1fr-1fr-1fr,
  .u-grid-cols-2fr-1fr,
  .u-grid-cols-1-5fr-1fr,
  .u-grid-cols-1-15fr-0-85fr,
  .u-grid-cols-1-1fr-0-9fr,
  .u-grid-cols-1fr-1-5fr,
  .u-grid-cols-2fr-1-5fr-0-8fr,
  .u-grid-cols-2fr-1fr-1fr,
  .u-grid-cols-2fr-1-5fr-1fr {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* --- Cards & boxes --- */
  .card-premium { padding: 1.5rem !important; }
  .price-card   { padding: 2rem 1.25rem !important; }
  .price-card.popular { transform: none; }
  .pricing-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .plaquette-card { grid-template-columns: 1fr; }
  .plaquette-content { padding: 1.5rem !important; }
  .plaquette-img { min-height: 260px; }

  /* --- Galerie images --- */
  .gallery-grid,
  .immo-gallery {
    grid-template-columns: 1fr !important;
  }
  .gallery-img { height: 220px !important; }
  .immo-gallery-img { height: 220px; }

  /* --- Bento Grid --- */
  .bento-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
  .btp-main, .foncier-wide,
  .immo-square, .digital-square {
    grid-column: span 1 !important;
    height: 250px !important;
  }

  /* --- Footer principal (index.html) --- */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* --- Offre cards (projet-cocody-djibi) --- */
  .offre-card { padding: 2rem 1.25rem !important; }
  .offre-card.premium { transform: none !important; }

  /* --- Grille galerie Djibi --- */
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }

  /* --- Hero foncier --- */
  .hero-foncier { padding: 120px 0 70px !important; }
  .hero-foncier h1 { font-size: 2rem !important; }

  /* --- Textes inline volumineux --- */
  .u-fs-5rem { font-size: 2.6rem !important; }
  .u-fs-4rem { font-size: 2.2rem !important; }
  .u-fs-3-5rem { font-size: 2rem !important; }
  .u-fs-3rem { font-size: 1.75rem !important; }
  .u-fs-2-5rem { font-size: 1.5rem !important; }

  /* --- Gaps inline larges → réduits --- */
  .u-gap-4rem { gap: 1.5rem !important; }
  .u-gap-3rem { gap: 1rem !important; }

  /* --- Paddings inline larges → réduits --- */
  .u-p-3rem { padding: 1.25rem !important; }
  .u-p-2-5rem { padding: 1rem !important; }

  /* --- Boutons CTA en colonne --- */
  .hero-btns, .u-d-flex.u-gap-1rem {
    flex-wrap: wrap;
  }

  /* --- ACD badge Djibi --- */
  .acd-badge { font-size: 0.85rem; }

  /* --- Simulateur slider --- */
  #price-range { height: 10px; }
  #rent-result { font-size: 1.75rem !important; }

  /* --- Evite débordements --- */
  html, body { overflow-x: hidden; max-width: 100vw; }
  img, video { max-width: 100%; height: auto; }

  /* Padding bas pour WhatsApp flottant */
  body { padding-bottom: 80px; }
}

/* ============================================================
   MOBILE TRÈS PETIT (< 480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .container { padding: 0 0.875rem; }
  .section { padding: 52px 0; }
  .btn { padding: 0.875rem 1.25rem; font-size: 0.9rem; }
  .btn-sm { padding: 0.5rem 0.75rem; font-size: 0.78rem; }
  .price-tag { font-size: 1.8rem !important; }
  .step-dot { width: 26px; height: 26px; font-size: 0.72rem; }

  /* Formulaire : champs nom + tel en 1 colonne */
  .form-row-2 {
    grid-template-columns: 1fr !important;
  }

  /* Boutons formulaire en colonne */
  .btn-group {
    flex-direction: column;
  }
  .btn-group .btn {
    width: 100% !important;
    flex: unset !important;
  }
}
