:root {
  --cim-signature: #e22d40;
  --cim-signature-dark: #bd2033;
  --cim-ink: #20262b;
  --cim-ink-soft: #3d474e;
  --cim-surface: #f5f7f8;
  --cim-line: rgba(32, 38, 43, 0.13);
  --cim-premium-shadow: 0 18px 48px rgba(21, 31, 38, 0.12);
}

html {
  scroll-padding-top: 92px;
}

body {
  overflow-x: hidden;
  background: #fff;
  color: var(--cim-ink-soft);
}

#root {
  isolation: isolate;
}

#root h1,
#root h2,
#root h3,
#root h4 {
  letter-spacing: 0 !important;
  text-wrap: balance;
}

#root p,
#root li {
  text-wrap: pretty;
}

#root header,
#root .fixed.top-0 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(1.2);
}

#root main > section {
  position: relative;
}

#root main > section:first-child {
  overflow: hidden;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

#root main > section:not(:first-child) {
  border-top-color: var(--cim-line) !important;
}

#root [class*="rounded-3xl"] {
  border-radius: 12px !important;
}

#root [class*="rounded-2xl"] {
  border-radius: 10px !important;
}

#root [class*="rounded-xl"] {
  border-radius: 8px !important;
}

#root [class*="shadow-card"],
#root [class*="shadow-primary"],
#root [class*="shadow-secondary"],
#root [class*="shadow-accent"] {
  box-shadow: var(--cim-premium-shadow) !important;
}

#root [class*="border-neutral-light"],
#root [class*="border-slate-200"] {
  border-color: var(--cim-line) !important;
}

#root [class*="bg-\[\#F8FAFC\]"] {
  background-color: var(--cim-surface) !important;
}

#root button,
#root a,
#root input,
#root select,
#root textarea {
  transition-duration: 180ms !important;
}

#root button:not(:disabled):hover,
#root a[class*="shadow"]:hover {
  transform: translateY(-1px);
}

#root button:focus-visible,
#root a:focus-visible,
#root input:focus-visible,
#root select:focus-visible,
#root textarea:focus-visible {
  outline: 3px solid rgba(226, 45, 64, 0.28) !important;
  outline-offset: 3px !important;
}

#root img {
  max-width: 100%;
}

#root img[alt*="CIM"],
#root img[alt*="El Amane"],
#root img[alt*="الأمان"] {
  object-fit: contain;
}

#root .bg-primary,
#root [class*="bg-primary "] {
  background-color: var(--cim-signature) !important;
}

#root .hover\:bg-primary-dark:hover,
#root [class*="hover:bg-primary-dark"]:hover {
  background-color: var(--cim-signature-dark) !important;
}

#root .text-primary {
  color: var(--cim-signature) !important;
}

#root form input,
#root form select,
#root form textarea {
  min-height: 44px;
  background: rgba(255, 255, 255, 0.98);
}

#root form textarea {
  min-height: 84px;
}

@media (min-width: 1024px) {
  #root main > section:not(:first-child) {
    scroll-margin-top: 88px;
  }

  #root [class*="max-w-7xl"],
  #root [class*="max-w-6xl"] {
    width: min(100% - 48px, 1180px);
  }
}

@media (max-width: 782px) {
  html {
    scroll-padding-top: 72px;
  }

  #root h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.08 !important;
  }

  #root main > section {
    overflow-x: clip;
  }

  #root button,
  #root a {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #root *,
  #root *::before,
  #root *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
.cim-contact-cta {
  min-height: 64px;
}

.cim-conventions-grid::after {
  content: "";
  min-height: 320px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff var(--cim-conventions-image, url("img/conventions-partenaires.jpg")) center / contain no-repeat;
  box-shadow: 0 12px 28px rgba(44, 62, 80, 0.09);
}

@media (min-width: 640px) {
  .cim-conventions-grid::after {
    grid-column: 2 / -1;
    min-height: 560px;
  }
}
