/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette Divuba.be adaptée en version claire */
  --navy:       #0a1628;
  --navy-mid:   #0f2040;
  --navy-light: #162a4a;
  --blue:       #2563eb;
  --blue-light: #3b82f6;
  --cyan:       #38bdf8;
  --cyan-dim:   rgba(56, 189, 248, 0.12);
  --red:        #ef4444;

  /* Version claire */
  --color-primary:      #0a1628;
  --color-primary-mid:  #0f2040;
  --color-accent:       #2563eb;
  --color-accent-light: #3b82f6;
  --color-cyan:         #38bdf8;
  --color-text:         #0a1628;
  --color-text-muted:   #475569;
  --color-bg:           #ffffff;
  --color-bg-alt:       #f0f7ff;
  --color-bg-card:      #ffffff;
  --color-border:       #e2e8f0;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(10, 22, 40, 0.06);
  --shadow-lg: 0 16px 48px rgba(10, 22, 40, 0.10);
  --max-width: 1120px;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.9);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
}

.btn-lg {
  padding: 0.95rem 1.9rem;
  font-size: 1rem;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: box-shadow 0.25s ease;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--color-primary);
}

.logo img {
  border-radius: 8px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a:not(.btn) {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.nav a:not(.btn):hover {
  color: var(--color-accent);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 101;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  min-height: calc(82vh - var(--header-h));
  display: flex;
  align-items: center;
  background: linear-gradient(145deg, #0a1628 0%, #0f2040 45%, #162a4a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(56, 189, 248, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.18) 0%, transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  padding: 4.5rem 1.5rem;
}

.hero-eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-cyan);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.9rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 1.3rem;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 540px;
  color: #cbd5e1;
  margin-bottom: 2.4rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== Services ===== */
.services {
  padding: 5.5rem 0;
  background: var(--color-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.45rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(15, 32, 64, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.service-card:hover .service-card-img {
  transform: scale(1.025);
}

.service-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  transition: transform 0.3s ease;
}

.service-card-body {
  padding: 1.6rem 1.7rem 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan-dim);
  color: var(--color-accent);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.18rem;
  font-weight: 650;
  margin-bottom: 0.75rem;
  line-height: 1.35;
  color: var(--color-primary);
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.96rem;
  margin-bottom: 1.3rem;
  flex: 1;
}

.service-link {
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.service-link:hover {
  color: var(--color-cyan);
}

/* ===== About ===== */
.about {
  padding: 5.5rem 0;
  background: var(--color-bg-alt);
}

.about-inner {
  max-width: 720px;
  text-align: center;
}

.about h2 {
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.about p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.about-tagline {
  font-size: 1.22rem !important;
  color: var(--color-primary) !important;
  margin-bottom: 2rem !important;
}

.about-tagline strong {
  color: var(--color-accent);
}

/* ===== Contact ===== */
.contact {
  padding: 5.5rem 0;
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 550;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1.05rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.72);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.input-error {
  min-height: 1.15rem;
  margin-top: 0.4rem;
  color: var(--red);
  font-size: 0.8rem;
  line-height: 1.4;
}

.form-success {
  margin-top: 1.25rem;
  padding: 1rem 1.2rem;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 9px;
  font-weight: 550;
  text-align: center;
  border: 1px solid #a7f3d0;
}

/* ===== Footer ===== */
.footer {
  background: var(--navy);
  color: #94a3b8;
  padding: 2.2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 650;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.footer-brand img {
  border-radius: 6px;
background: transparent;
  filter: none;
}

.footer-copy {
  font-size: 0.9rem;
}

.footer-links a {
  color: #94a3b8;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-cyan);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(10, 22, 40, 0.12);
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav a:not(.btn) {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    color: var(--color-primary);
    font-weight: 600;
  }

  .nav a:not(.btn):hover,
  .nav a:not(.btn):focus-visible {
    background: rgba(37, 99, 235, 0.06);
    color: var(--color-accent);
  }

  .nav .btn {
    width: 100%;
    margin-top: 0.2rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    min-height: calc(72vh - var(--header-h));
  }

  .hero-content {
    padding: 3.2rem 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .services, .about, .contact {
    padding: 4rem 0;
  }

  .service-card-img {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.15rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

/* Append this block at the end of css/styles.css */

.form-error {
  margin-top: 1.25rem;
  padding: 1rem 1.2rem;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 9px;
  font-weight: 550;
  text-align: center;
  border: 1px solid #fecaca;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.form-consent input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  accent-color: var(--color-accent);
}

.form-consent label {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-consent a {
  color: var(--color-accent);
  text-decoration: underline;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
}

.footer-legal-links a {
  color: #94a3b8;
}

.footer-legal-links a:hover {
  color: var(--color-cyan);
}

.legal-page {
  padding: 4rem 0 5rem;
  background: var(--color-bg);
}

.legal-wrap {
  max-width: 760px;
}

.legal-kicker {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.legal-page h1 {
  font-size: 2.2rem;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.legal-updated {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.7rem;
  color: var(--color-primary);
}

.legal-page p,
.legal-page li {
  color: var(--color-text-muted);
}

.legal-page ul {
  padding-left: 1.2rem;
  margin: 0.6rem 0 1rem;
}

.legal-page a {
  color: var(--color-accent);
}
