/* ==========================================================================
   FOOTER GLOBAL -- Matek-IT shared footer.
   CAPPS only. Kills common.css .section-shaped .shape (#020034) full-bleed layer.

   Layout (desktop):
     [ Col 1: Logo + description ] [ Col 2: Navigation ]
     [ Col 3: Nos Offres           ] [ Col 4: Contact    ]
     ------------------------------------------------------------------------
     [ © 2026 Matek-IT ]                        [ Legal / Privacy links ]

   Scope: every rule is scoped under `#footer_div` so nothing leaks onto
          the rest of the page. No HTML changes required — selectors
          match the legacy DOM.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. ROOT — Must win over common.css .shape (z-index:-1, #020034) + legacy white text
   -------------------------------------------------------------------------- */
html body #footer_div,
html body #footer_div.section,
html body #footer_div.section-shaped,
body #footer_div,
div#footer_div,
/* Semantic / BEM fallbacks (same surface as #footer_div) */
html body:not(.no-capps-footer) footer.site-footer,
html body:not(.no-capps-footer) footer#footer,
html body:not(.no-capps-footer) .page-footer,
html body:not(.no-capps-footer) .site-footer#footer,
html body .matek-page footer[role="contentinfo"] {
  position: relative !important;
  isolation: isolate !important;
  /* Exact base from spec */
  background: linear-gradient(135deg, rgba(126, 200, 227, 0.15), rgba(58, 155, 220, 0.1)), #cfe8f6 !important;
  color: #4f6b85 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-top: 1px solid rgba(15, 42, 68, 0.1) !important;
  box-shadow: none !important;
}

/* Parents must not re-paint a dark band behind the footer */
body .matek-page footer,
.matek-page .page-footer-wrapper {
  background: inherit !important;
}

/* generic .section adds 4rem — footer uses inner padding only */
html body #footer_div.section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* common.css: .section-shaped .shape-style-1.shape-default { background #020034 } — remove layer */
html body #footer_div > .shape,
html body #footer_div .shape,
html body #footer_div .shape.shape-style-1,
html body #footer_div .shape.shape-style-1.shape-default,
html body #footer_div .shape-style-1.shape-default {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  background: none !important;
  background-color: transparent !important;
}

/* Bootstrap / legacy: contact strip used .text-white for dark footer */
html body #footer_div .text-white,
html body #footer_div .portages-agences-text.text-white {
  color: #2D4A63 !important;
}

html body #footer_div h1,
html body #footer_div h2,
html body #footer_div h3,
html body #footer_div h4,
html body #footer_div h5,
html body #footer_div h6,
html body #footer_div .footer-title,
html body #footer_div strong,
html body .footer strong {
  color: #081C2E !important;
}

/* Links: brand primary (readable on #CFE8F6) — not body grey */
html body #footer_div a,
html body .footer a {
  color: #1F6FA5 !important;
  font-weight: 500 !important;
  transition: color 0.2s ease, text-decoration 0.2s ease !important;
}

html body #footer_div a:hover,
html body .footer a:hover {
  color: #081C2E !important;
  text-decoration: underline !important;
}

/* Default copy — beat legacy footer.css (white) + stray utilities */
html body #footer_div p,
html body #footer_div span {
  color: #2D4A63 !important;
}

/* In-link copy: more specific than bare `p`/`span` (primary + hover) */
html body #footer_div a p:not(.portages_footer_bloc_14),
html body #footer_div a span {
  color: inherit !important;
}

html body #footer_div i,
html body #footer_div svg,
html body #footer_div .bx,
html body .footer i,
html body .footer svg {
  color: #1f6fa5 !important;
  opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   1. FOOTER SURFACE — pseudo accents (palette)
   -------------------------------------------------------------------------- */
/* Top anchor: only allowed 135° brand gradient (accent → primary) */
html body #footer_div::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 0 auto 0 !important;
  height: 2px !important;
  display: block !important;
  z-index: 2 !important;
  pointer-events: none !important;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%) !important;
  opacity: 1 !important;
}

/* Floor line — text-primary at 10% (structure, not “grey”) */
html body #footer_div::after {
  content: "" !important;
  position: absolute !important;
  inset: auto 0 0 0 !important;
  height: 1px !important;
  background: color-mix(in srgb, var(--text-primary-color) 10%, transparent) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

html body #footer_div > * {
  position: relative !important;
  z-index: 1 !important;
}

/* --------------------------------------------------------------------------
   2. SHARED CONTAINER — 1200px / 0 20px, aligned with header + pages.
   -------------------------------------------------------------------------- */
html body #footer_div .container.portages_footer_bloc,
html body #footer_div div.container.px-2.pb-1.portages_footer_bloc {
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 72px 24px 20px !important;
  background: transparent !important;
}

@media (max-width: 768px) {
  html body #footer_div .container.portages_footer_bloc,
  html body #footer_div div.container.px-2.pb-1.portages_footer_bloc {
    padding: 56px 20px 16px !important;
  }
}

/* --------------------------------------------------------------------------
   3. TOP COLUMNS ROW
      Real CSS grid (resets Bootstrap col-* soup).
   -------------------------------------------------------------------------- */
html body #footer_div .container.portages_footer_bloc > .row.mb-8.mt-8,
html body #footer_div .container.portages_footer_bloc > .row:first-of-type {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 48px 40px !important;
  margin: 0 0 0 !important;
  padding: 0 0 32px !important;
  width: 100% !important;
  align-items: start !important;
  border-bottom: 1px solid color-mix(in srgb, var(--text-primary-color) 10%, transparent) !important;
}

/* Reset every Bootstrap col-* so the grid above is respected.
   NOTE: we deliberately EXCLUDE `.portages_footer_bloc_24` (the "Télécharger
   l'appli" column). Legacy `footer.css` hides it with `display: none` because
   its Google Play / App Store links have `href=""` (non-functional). Keep it
   hidden so we don't ship two gigantic unclickable store badges. */
html body #footer_div .container.portages_footer_bloc > .row > div[class*="col-"]:not(.portages_footer_bloc_24),
html body #footer_div .portages_footer_bloc_8,
html body #footer_div div.col-3.portages_footer_bloc_8,
html body #footer_div div.col-2.portages_footer_bloc_8 {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  display: block !important;
}

/* Explicit re-hide for the app-store column (defensive; beats any earlier
   rule in the cascade that might have exposed it). */
html body #footer_div .portages_footer_bloc_24,
html body #footer_div div.col-2.portages_footer_bloc_24,
html body #footer_div .container.portages_footer_bloc > .row > div.portages_footer_bloc_24 {
  display: none !important;
}

/* --------------------------------------------------------------------------
   4. COLUMN TITLES — primary-darker + primary accent bar
   -------------------------------------------------------------------------- */
html body #footer_div p.portages_footer_bloc_20,
html body #footer_div p.portages_footer_bloc_20.text-sun,
html body #footer_div p.text-sun.portages_footer_bloc_20 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  /* Explicit CAPPS (beats site.css .text-sun) */
  color: #081C2E !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  opacity: 1 !important;
  position: relative !important;
}

/* Tiny accent bar under each title */
html body #footer_div p.portages_footer_bloc_20::after,
html body #footer_div p.portages_footer_bloc_20.text-sun::after,
html body #footer_div p.text-sun.portages_footer_bloc_20::after {
  content: "" !important;
  display: block !important;
  width: 28px !important;
  height: 2px !important;
  margin-top: 10px !important;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%) !important;
  border-radius: 2px !important;
}

/* --------------------------------------------------------------------------
   5. LINKS — normal weight, color change on hover (no transforms).
   -------------------------------------------------------------------------- */
html body #footer_div .container.portages_footer_bloc a {
  text-decoration: none !important;
  color: #1f6fa5 !important;
  transition: color 0.2s ease, text-decoration 0.2s ease !important;
}

html body #footer_div p.portages_footer_bloc_14,
html body #footer_div p.portages_footer_bloc_14.mt-4 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, sans-serif !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  color: #4f6b85 !important;
  margin: 0 !important;
  padding: 6px 0 !important;
  display: block !important;
  transition: color 0.2s ease !important;
}

html body #footer_div a p.portages_footer_bloc_14,
html body #footer_div .container.portages_footer_bloc a p.portages_footer_bloc_14 {
  color: #1f6fa5 !important;
}

html body #footer_div a:hover p.portages_footer_bloc_14,
html body #footer_div p.portages_footer_bloc_14:hover {
  color: #0f2a44 !important;
  transform: none !important;
}

html body #footer_div .container.portages_footer_bloc a:hover p.portages_footer_bloc_14 {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-color: rgba(15, 42, 68, 0.35) !important;
}

/* --------------------------------------------------------------------------
   6. EXTRANET BUTTON — restrained outline style
   -------------------------------------------------------------------------- */
html body #footer_div .portages_footer_bloc_1 {
  margin-top: 20px !important;
}

html body #footer_div p.portages_common_bloc_145,
html body #footer_div p.portages_common_bloc_145.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: color-mix(in srgb, var(--accent-lighter-color) 70%, var(--primary-lighter-color) 30%) !important;
  border: 1px solid color-mix(in srgb, var(--primary-darker-color) 35%, transparent) !important;
  color: var(--primary-darker-color) !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, sans-serif !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 9px 18px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text-primary-darker-color) 6%, transparent) !important;
  transition: background 0.25s ease, border-color 0.25s ease,
              color 0.25s ease, box-shadow 0.25s ease !important;
}

html body #footer_div p.portages_common_bloc_145:hover,
html body #footer_div p.portages_common_bloc_145.btn:hover {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%) !important;
  border-color: var(--primary-darker-color) !important;
  color: var(--accent-lighter-color) !important;
  transform: none !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 40%, transparent) !important;
}

/* --------------------------------------------------------------------------
   7. CONTACT CARD (section.portages_footer_bloc_9)
      Renders as the "Contact" column — logo + phone + email + address.
   -------------------------------------------------------------------------- */
html body #footer_div section.portages_footer_bloc_9 {
  margin: 0 0 0 !important;
  padding: 32px 0 0 !important;
  background: transparent !important;
  border: none !important; /* was legacy "card" strip (footer.css) */
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* No boxed “card” around logo / contact — whole footer is the surface */
html body #footer_div .logo-container,
html body #footer_div .portages_footer_bloc_9 .logo-container {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

html body #footer_div section.portages_footer_bloc_9 > .row {
  margin: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  align-items: center !important;
}

html body #footer_div section.portages_footer_bloc_9 .col-6.portages_footer_bloc_10 {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  padding: 0 !important;
  margin: 0 !important;
}

html body #footer_div section.portages_footer_bloc_9 .portages-agences-text {
  text-align: left !important;
  color: #4f6b85 !important;
}

html body #footer_div section.portages_footer_bloc_9 .flex {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px 32px !important;
  align-items: center !important;
}

/* Main MATEK logo: white asset on light blue — recolor to readable navy primary */
html body #footer_div img.portages_footer_bloc_23,
html body #footer_div .logo img,
html body .footer img.portages_footer_bloc_23 {
  height: auto !important;
  width: 180px !important;
  max-width: 100% !important;
  margin-bottom: 24px !important;
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  opacity: 1 !important;
  filter: brightness(0) saturate(100%) invert(12%) sepia(34%) saturate(800%)
    hue-rotate(180deg) !important;
}

html body #footer_div span.portages_footer_bloc_22 {
  display: none !important; /* The logo image already includes MATEK IT in the screenshot */
}

html body #footer_div .portages_footer_bloc_17,
html body #footer_div .portages_footer_bloc_16 {
  color: #4f6b85 !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

html body #footer_div .portages_footer_bloc_17 span,
html body #footer_div .portages_footer_bloc_16 span {
  color: #4f6b85 !important;
}

html body #footer_div .portages_footer_bloc_17 a,
html body #footer_div .portages_footer_bloc_16 a {
  color: #1f6fa5 !important;
  text-decoration: none !important;
  transition: color 0.2s ease, text-decoration 0.2s ease !important;
}

html body #footer_div .portages_footer_bloc_17 a:hover,
html body #footer_div .portages_footer_bloc_16 a:hover {
  color: #1f6fa5 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

/* Contact row PNGs (phone/mail/pin): tint toward primary for contrast on #CFE8F6 */
html body #footer_div img.portages_footer_bloc_6,
html body #footer_div img.portages_footer_bloc_7 {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
  opacity: 1 !important;
  filter: brightness(0) saturate(100%) invert(40%) sepia(100%) saturate(2000%)
    hue-rotate(175deg) brightness(0.9) contrast(1.05) !important;
}

/* --------------------------------------------------------------------------
   8. BOTTOM BAR — © left, legal links right.
   -------------------------------------------------------------------------- */
html body #footer_div .container.portages_footer_bloc > .row.items-center.mt-4,
html body #footer_div .footer-bottom {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px 24px !important;
  margin: 28px 0 0 !important;
  padding: 16px 18px !important;
  border: 1px solid rgba(15, 42, 68, 0.1) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(15, 42, 68, 0.05) !important;
  border-radius: 12px !important;
  color: #4f6b85 !important;
}

html body #footer_div .col-4.portages_footer_bloc_2 {
  color: #4f6b85 !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, sans-serif !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  flex: 0 1 auto !important;
}

html body #footer_div .col-4.portages_footer_bloc_2 p {
  color: inherit !important;
}

html body #footer_div .col-8.portages_footer_bloc_13 {
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  flex: 0 1 auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 24px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

html body #footer_div .portages_footer_bloc_13 a {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, sans-serif !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #1f6fa5 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-decoration: none !important;
  transition: color 0.2s ease, text-decoration 0.2s ease !important;
}

html body #footer_div .footer-bottom a {
  color: #1f6fa5 !important;
  text-decoration: none !important;
  transition: color 0.2s ease, text-decoration 0.2s ease !important;
}

html body #footer_div .portages_footer_bloc_13 a:hover {
  color: #0f2a44 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-color: rgba(15, 42, 68, 0.35) !important;
}

/* Legacy empty block */
html body #footer_div .portages_footer_bloc_12 {
  display: none !important;
}

/* --------------------------------------------------------------------------
   9. RESPECT prefers-reduced-motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html body #footer_div,
  html body #footer_div *,
  html body #footer_div *::before,
  html body #footer_div *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
