/* ============================================================
   XERIS Sécurité Privée — Design System
   Charte : Rouge #CC0000 / Noir #0A0A0A / Gris #666 / Fond #F5F5F5
   Typo : Lexend (titres) + Source Sans 3 (corps)
   ============================================================ */

/* Fonts loaded via <link> in HTML for performance */
:root {
  --black: #0A0A0A;
  --red: #CC0000;
  --red-hover: #A30000;
  --red-dark: #8B0000;
  --red-light: #FF4444;
  --gray: #666666;
  --gray-light: #999999;
  --gray-lighter: #E0E0E0;
  --bg: #F5F5F5;
  --bg-alt: #EEEEEE;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --text-light: #666666;
  --border: #E0E0E0;

  --font-display: 'Lexend', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;

  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width:100%; height:auto; display:block; }
a { color:inherit; text-decoration:none; }

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ========== UTILITIES ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); border:0;
}

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}
.site-header.scrolled {
  background: rgba(10,10,10,0.98);
  box-shadow: 0 1px 20px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}
.logo .x-mark {
  color: var(--red);
  font-weight: 800;
  font-size: 32px;
}
.logo .tagline {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-left: 4px;
  position: relative;
  top: 2px;
}
.logo .tagline::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: var(--red);
  margin-bottom: 2px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}
.nav-list a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
  position: relative;
  padding: 8px 0;
}
.nav-list a:hover,
.nav-list a.active {
  color: var(--white);
}
.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width var(--transition);
}
.nav-list a:hover::after,
.nav-list a.active::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: white !important;
  padding: 10px 20px !important;
  border-radius: var(--radius);
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: background var(--transition), transform var(--transition) !important;
}
.nav-cta:hover {
  background: var(--red-hover) !important;
  transform: translateY(-1px);
}
.nav-cta::after { display:none !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity:0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--black);
  z-index: 999;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--white);
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--red); }
.mobile-menu .nav-cta { font-size: 16px !important; padding: 14px 32px !important; }

/* ========== SECTIONS ========== */
.section {
  padding: 100px 0;
}
.section-dark {
  background: var(--black);
  color: var(--white);
}
.section-gray {
  background: var(--bg);
}
.section-red {
  background: var(--red);
  color: var(--white);
}

.section-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  color: inherit;
}
.section-dark .section-title { color: var(--white); }

.section-subtitle {
  font-size: 17px;
  color: var(--gray);
  max-width: 600px;
  line-height: 1.6;
}
.section-dark .section-subtitle { color: rgba(255,255,255,0.6); }

/* ========== HERO ========== */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -15%;
  width: 700px; height: 700px;
  border: 1px solid rgba(204,0,0,0.08);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%; left: -10%;
  width: 400px; height: 400px;
  border: 1px solid rgba(204,0,0,0.05);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}
.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero-title span {
  color: var(--red);
}
.hero-text {
  font-size: 18px;
  color: rgba(255,255,255,0.65);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--red);
  color: white;
}
.btn-primary:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(204,0,0,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.25);
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
}
.btn-white {
  background: white;
  color: var(--black);
}
.btn-white:hover {
  background: #e5e5e5;
  transform: translateY(-2px);
}

/* ========== STATS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-card {
  text-align: center;
  padding: 32px 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.stat-number {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--red);
  display: block;
  line-height: 1;
}
.stat-label {
  font-size: 14px;
  color: var(--gray);
  margin-top: 8px;
}

/* ========== SERVICE CARDS ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before {
  transform: scaleX(1);
}
.service-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(204,0,0,0.06);
  border-radius: var(--radius);
  margin-bottom: 24px;
  color: var(--red);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--black);
}
.service-card p {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 20px;
}
.service-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}
.service-link:hover { gap: 12px; }

/* ========== TESTIMONIALS ========== */
.testimonials-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
  scrollbar-width: none;
}
.testimonials-track::-webkit-scrollbar { display:none; }

.testimonial-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.testimonial-nav button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  font-size: 18px;
}
.testimonial-nav button:hover {
  background: var(--red);
  border-color: var(--red);
}

.testimonial-card {
  min-width: 380px;
  max-width: 420px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  scroll-snap-align: start;
  flex-shrink: 0;
}
.testimonial-card .quote {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.85);
  font-style: italic;
}
.testimonial-card .author {
  font-weight: 600;
  color: var(--white);
}
.testimonial-card .role {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* ========== CONTACT FORM ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-info h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}
.contact-info p {
  color: var(--gray);
  margin-bottom: 8px;
}
.contact-info .info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.contact-info .info-icon {
  color: var(--red);
  flex-shrink: 0;
  margin-top: 2px;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* ========== FOOTER ========== */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.6);
  padding: 60px 0 30px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.6; margin-top: 12px; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
  font-size: 14px;
}
.footer-col a:hover { color: var(--red); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.35); }
.footer-bottom a:hover { color: var(--red); }

/* ========== PAGE HERO (interior) ========== */
.page-hero {
  min-height: 50dvh;
  display: flex;
  align-items: center;
  background: var(--black);
  color: var(--white);
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  bottom: -5%; right: -10%;
  width: 400px; height: 400px;
  border: 1px solid rgba(204,0,0,0.06);
  border-radius: 50%;
}
.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}
.page-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 16px;
}
.page-hero-content h1 span { color: var(--red); }
.page-hero-content p {
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  max-width: 500px;
}

/* ========== FEATURE LIST ========== */
.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature-item .fi-icon {
  width: 48px; height: 48px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(204,0,0,0.08);
  border-radius: var(--radius);
  color: var(--red);
}
.feature-item h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.feature-item p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.6;
}

/* ========== PROCESS STEPS ========== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.process-step {
  position: relative;
  text-align: center;
  padding: 32px 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.process-step::before {
  counter-increment: step;
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--red);
  color: white;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin: 0 auto 16px;
}
.process-step h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.process-step p {
  font-size: 13px;
  color: var(--gray);
}

/* ========== FAQ ========== */
.faq-list { display:flex; flex-direction:column; gap:8px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.faq-question {
  width: 100%;
  padding: 18px 24px;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--red); }
.faq-question .faq-icon {
  font-size: 20px;
  transition: transform var(--transition);
  color: var(--red);
}
.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 18px;
}
.faq-answer p {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.6;
}

/* ========== CTA BANNER ========== */
.cta-banner {
  text-align: center;
  padding: 80px 0;
}
.cta-banner .section-title { color: var(--white); }
.cta-banner .section-subtitle { color: rgba(255,255,255,0.7); max-width: 500px; margin: 0 auto 32px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-list { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-list { display: none; }
  .hamburger { display: flex; }

  .hero-title { font-size: 36px; }
  .hero-text { font-size: 16px; }
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 20px 12px; }
  .stat-number { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .section { padding: 60px 0; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .testimonial-card { min-width: 280px; }
  .process-steps { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .header-inner { height: 60px; }
  .logo { font-size: 22px; }
  .logo .x-mark { font-size: 26px; }
}
