/* ============================================
   ACE Domotique — Feuille de style principale
   Style : Moderne & Dynamique
   ============================================ */

:root {
  --rouge:      #e63946;
  --rouge-dark: #c1121f;
  --navy:       #1d3557;
  --navy-light: #457b9d;
  --bg:         #ffffff;
  --bg-alt:     #f8f9fa;
  --text:       #2b2b2b;
  --text-light: #6c757d;
  --border:     #dee2e6;
  --radius:     8px;
  --shadow:     0 4px 20px rgba(0,0,0,0.08);
  --transition: 0.25s ease;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* === TYPOGRAPHIE === */
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { margin-bottom: 1rem; }

/* === NAVIGATION === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 2px solid var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 130px;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--navy);
}
.navbar__logo span { color: var(--rouge); }
.navbar__logo svg { width: 32px; height: 32px; }
.navbar__logo img { height: 90px; width: auto; display: block; }
.footer__brand .navbar__logo img { height: 70px; filter: brightness(0) invert(1); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.navbar__links a {
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition);
}
.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--navy-light);
  transition: width var(--transition);
}
.navbar__links a:hover,
.navbar__links a.active { color: var(--navy-light); }
.navbar__links a:hover::after,
.navbar__links a.active::after { width: 100%; }

.navbar__cta {
  background: var(--rouge);
  color: #fff !important;
  padding: 0.55rem 1.25rem;
  border-radius: 50px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.navbar__cta:hover { background: var(--rouge-dark) !important; transform: translateY(-1px); }
.navbar__cta::after { display: none !important; }

/* Hamburger */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.navbar__toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0d1f38 60%, #1a1a2e 100%);
  color: #fff;
  padding: 6rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(230,57,70,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(230,57,70,0.15);
  border: 1px solid rgba(230,57,70,0.4);
  color: #ff8a94;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 span { color: var(--rouge); }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin-bottom: 2rem; max-width: 520px; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__icon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 380px;
}
.hero__icon-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  backdrop-filter: blur(4px);
  transition: transform var(--transition), border-color var(--transition);
}
.hero__icon-card:hover { transform: translateY(-4px); border-color: var(--rouge); }
.hero__icon-card svg { width: 40px; height: 40px; margin: 0 auto 0.75rem; }
.hero__icon-card p { font-size: 0.82rem; color: rgba(255,255,255,0.75); margin: 0; }

/* === BOUTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--rouge);
  color: #fff;
  border-color: var(--rouge);
}
.btn--primary:hover { background: var(--rouge-dark); border-color: var(--rouge-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(230,57,70,0.35); }
.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn--outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn--outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--outline-dark:hover { background: var(--navy); color: #fff; }

/* === SECTIONS === */
.section { padding: 5rem 1.5rem; }
.section--alt { background: var(--bg-alt); }
.section__header { text-align: center; margin-bottom: 3rem; }
.section__header h2 { margin-bottom: 0.75rem; color: var(--navy); }
.section__header p { color: var(--text-light); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }
.section__inner { max-width: 1200px; margin: 0 auto; }

/* Ligne décorative sous les titres */
.section__header h2::after {
  content: '';
  display: block;
  width: 50px; height: 4px;
  background: var(--rouge);
  border-radius: 2px;
  margin: 0.6rem auto 0;
}

/* === CARDS SERVICES === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
}
.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--navy);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-5px); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-card__icon {
  width: 64px; height: 64px;
  background: rgba(29,53,87,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.service-card__icon svg { width: 30px; height: 30px; stroke: var(--navy); }
.contact-detail__icon svg { stroke: var(--navy); }
.service-card h3 { color: var(--navy); margin-bottom: 0.75rem; }
.service-card p { color: var(--text-light); font-size: 0.95rem; margin: 0; }

/* === ZONE INTERVENTION === */
.zone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.zone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.zone-tag {
  background: rgba(29,53,87,0.08);
  color: var(--navy);
  border: 1px solid rgba(29,53,87,0.25);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
}
.zone-map {
  background: linear-gradient(135deg, var(--bg-alt), #e9ecef);
  border-radius: 16px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text-light);
  text-align: center;
  padding: 1.5rem;
}
.zone-map svg { width: 48px; height: 48px; opacity: 0.4; }
.zone-map small { font-size: 0.8rem; }

/* === CHIFFRES === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item { padding: 1.5rem; }
.stat-item strong {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-item span { color: var(--text-light); font-size: 0.95rem; }

/* === RÉALISATIONS CARDS === */
.realisations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}
.realisation-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition);
}
.realisation-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.realisation-card__img {
  height: 200px;
  background: linear-gradient(135deg, var(--navy), #0d1f38);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.realisation-card__img svg { width: 60px; height: 60px; opacity: 0.3; }
.realisation-card__tag {
  position: absolute;
  top: 1rem; left: 1rem;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}
.realisation-card__body { padding: 1.5rem; }
.realisation-card__body h3 { color: var(--navy); margin-bottom: 0.5rem; }
.realisation-card__body p { color: var(--text-light); font-size: 0.92rem; margin: 0; }
.realisation-card__meta {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-light);
}
.realisation-card__meta span { display: flex; align-items: center; gap: 0.35rem; }

/* === FORMULAIRE CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}
.contact-info h2 { color: var(--navy); margin-bottom: 1rem; }
.contact-info p { color: var(--text-light); }
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
}
.contact-detail__icon {
  width: 46px; height: 46px;
  background: rgba(29,53,87,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-detail__icon svg { width: 22px; height: 22px; }
.contact-detail__text strong { display: block; color: var(--navy); font-weight: 600; }
.contact-detail__text span { color: var(--text-light); font-size: 0.92rem; }

.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(29,53,87,0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-submit { width: 100%; justify-content: center; border-radius: var(--radius); font-size: 1rem; padding: 0.9rem; }

/* === CTA SECTION === */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, #0d1f38 100%);
  color: #fff;
  text-align: center;
  padding: 4.5rem 1.5rem;
}
.cta-section h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-section h2::after { background: var(--rouge); }
.cta-section p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 2rem; font-size: 1.05rem; }
.cta-section .btn--outline { border-color: rgba(255,255,255,0.6); }

/* === FOOTER === */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 3rem 1.5rem 1.5rem;
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand .navbar__logo { color: #fff; margin-bottom: 1rem; }
.footer__brand p { font-size: 0.9rem; line-height: 1.7; }
.footer__col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer__col li { margin-bottom: 0.5rem; }
.footer__col a { font-size: 0.9rem; transition: color var(--transition); }
.footer__col a:hover { color: var(--rouge); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer__bottom a:hover { color: var(--rouge); }

/* === PAGE HEADER (sous-pages) === */
.page-header {
  background: linear-gradient(135deg, var(--navy), #0d1f38);
  color: #fff;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}
.page-header__breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1rem;
}
.page-header__breadcrumb a { color: rgba(255,255,255,0.7); transition: color var(--transition); }
.page-header__breadcrumb a:hover { color: var(--rouge); }
.page-header h1 { margin-bottom: 0.75rem; }
.page-header p { color: rgba(255,255,255,0.75); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* === DÉTAIL SERVICE (services.html) === */
.service-detail { padding: 4rem 1.5rem; }
.service-detail:nth-child(even) { background: var(--bg-alt); }
.service-detail__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.service-detail__inner.reverse { direction: rtl; }
.service-detail__inner.reverse > * { direction: ltr; }
.service-detail__visual {
  background: linear-gradient(135deg, var(--navy), #0d1f38);
  border-radius: 16px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-detail__visual svg { width: 100px; height: 100px; opacity: 0.25; }
.service-detail__content h2 { color: var(--navy); margin-bottom: 1rem; }
.service-detail__content h2::after { margin: 0.6rem 0 0; }
.service-detail__content p { color: var(--text-light); }
.feature-list { margin-top: 1.25rem; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.feature-list li::before {
  content: '✓';
  color: var(--rouge);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero__inner,
  .zone-grid,
  .contact-grid,
  .service-detail__inner,
  .footer__top { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .footer__top { gap: 2rem; }
}

@media (max-width: 768px) {
  .navbar__links {
    display: none;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 2px solid var(--rouge);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  .navbar__links.open { display: flex; }
  .navbar__toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .service-detail__inner.reverse { direction: ltr; }
}

@media (max-width: 480px) {
  .hero { padding: 4rem 1rem 3rem; }
  .section { padding: 3.5rem 1rem; }
  .contact-grid { gap: 2rem; }
}
