/* ============================================================
   FACILITIX — main.css
   Styles globaux, variables, typographie, composants réutilisables
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;1,9..40,400&family=Space+Mono:wght@400;700&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  --primary:       #0066CC;
  --primary-dark:  #004A99;
  --primary-light: #E8F2FF;
  --accent:        #FF6B35;
  --accent-dark:   #E05A25;
  --success:       #27AE60;
  --warning:       #F59E0B;
  --danger:        #E74C3C;
  --text:          #1A2332;
  --text-muted:    #64748B;
  --bg:            #F4F7FB;
  --white:         #FFFFFF;
  --border:        #CBD5E1;
  --shadow:        0 8px 32px rgba(0,102,204,0.12);
  --shadow-lg:     0 16px 48px rgba(0,102,204,0.18);
  --shadow-orange: 0 8px 24px rgba(255,107,53,0.35);
  --radius:        12px;
  --radius-lg:     20px;
  --radius-sm:     8px;
  --nav-h:         68px;
  --font-head:     'Poppins', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --font-mono:     'Space Mono', monospace;
  --transition:    0.22s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; }
input, select, textarea { font-family: var(--font-body); }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
p  { line-height: 1.7; }

.mono { font-family: var(--font-mono); }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .container { padding: 0 16px; }
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-menu a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.nav-menu a:hover { background: var(--primary-light); color: var(--primary); }
.nav-wa {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: #25D366;
  transition: background var(--transition);
}
.nav-wa:hover { background: #e8fdf1; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-mobile {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  width: 100%;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 16px;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text);
}
.nav-mobile a:hover { background: var(--primary-light); }

@media (max-width: 820px) {
  .nav-menu, .nav-wa { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #FF8C5A);
  color: white;
  box-shadow: var(--shadow-orange);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255,107,53,0.45);
}
.btn-secondary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}
.btn-secondary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-white {
  background: white;
  color: var(--primary);
  font-weight: 700;
}
.btn-white:hover { background: var(--primary-light); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-lg { padding: 18px 36px; font-size: 1.1rem; }
.btn-full { width: 100%; }
.btn-wa {
  background: #25D366;
  color: white;
  box-shadow: 0 6px 20px rgba(37,211,102,0.35);
}
.btn-wa:hover { background: #1da851; transform: translateY(-2px); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-accent  { background: rgba(255,107,53,0.12); color: var(--accent-dark); }
.badge-success { background: rgba(39,174,96,0.12); color: var(--success); }
.badge-white   { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.35); }

/* ── Section headings ─────────────────────────────────────── */
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .badge { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { font-size: 1.1rem; color: var(--text-muted); max-width: 580px; margin: 0 auto; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-warning { background: #FEF3C7; border-left: 4px solid var(--warning); color: #92400E; }
.alert-info    { background: var(--primary-light); border-left: 4px solid var(--primary); color: var(--primary-dark); }
.alert-success { background: rgba(39,174,96,0.1); border-left: 4px solid var(--success); color: #155724; }
.alert-danger  { background: rgba(231,76,60,0.08); border-left: 4px solid var(--danger); color: #7B1D1D; }

/* ── Form elements ────────────────────────────────────────── */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}
.field label .req { color: var(--accent); margin-left: 2px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text);
  background: #FAFBFD;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}
.field input.error,
.field select.error { border-color: var(--danger); background: #FFF5F5; }
.field .hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.field .err-msg { font-size: 0.8rem; color: var(--danger); margin-top: 4px; display: none; }
.field .err-msg.show { display: block; }
.field textarea { min-height: 90px; resize: vertical; }

/* Radio / Checkbox pill groups */
.radio-pills, .check-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radio-pills label,
.check-pills label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  background: #FAFBFD;
}
.radio-pills label:hover,
.check-pills label:hover { border-color: var(--primary); background: var(--primary-light); }
.radio-pills label:has(input:checked),
.check-pills label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.radio-pills input,
.check-pills input { width: auto; accent-color: var(--primary); }

/* ── Progress bar ─────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Step pills */
.step-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px 0;
}
.step-pill {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #E2E8F0;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  transition: all var(--transition);
}
.step-pill.active { background: var(--primary); color: white; }
.step-pill.done   { background: var(--success); color: white; }

/* ── WhatsApp float ───────────────────────────────────────── */
.float-wa {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  z-index: 9999;
  animation: pulse-wa 2.5s infinite;
}
@keyframes pulse-wa {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
  50%       { transform: scale(1.06); box-shadow: 0 6px 28px rgba(37,211,102,0.65); }
}

/* ── Scroll animations ────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: #0A1628;
  color: rgba(255,255,255,0.85);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
}
.footer-brand p { font-size: 0.9rem; opacity: 0.7; }
.footer-col h4 { color: white; font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; letter-spacing: 0.5px; text-transform: uppercase; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 0.88rem; opacity: 0.7; transition: opacity var(--transition); }
.footer-col a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── Accordion (FAQ) ──────────────────────────────────────── */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.accordion-head {
  width: 100%;
  background: white;
  padding: 18px 24px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background var(--transition);
}
.accordion-head:hover { background: var(--primary-light); }
.accordion-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform var(--transition);
  flex-shrink: 0;
  line-height: 1;
}
.accordion-head[aria-expanded="true"] .accordion-icon { transform: rotate(45deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
  background: white;
}
.accordion-body.open { max-height: 400px; }
.accordion-body-inner { padding: 0 24px 20px; color: var(--text-muted); line-height: 1.8; }

/* ── Utility ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-white  { color: white; }
.text-accent { color: var(--accent); }
.text-primary{ color: var(--primary); }
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.gap-4 { gap: 16px; }
.gap-2 { gap: 8px; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
