/* ================================================================== */
/*  AIXOR LAYOUT — header, footer & sticky CTA pour intervention-minute */
/*  Injecté sur toutes les pages, masque l'ancien Elementor             */
/* ================================================================== */

:root {
  --im-red: #d92926;
  --im-red-h: #b81e1c;
  --im-navy: #0a1f44;
  --im-orange: #ff5736;
  --im-bg: #ffffff;
  --im-soft: #f5f6fa;
  --im-text: #1a1f36;
  --im-muted: #6b7280;
  --im-border: rgba(10, 31, 68, 0.08);
  --im-shadow: 0 4px 24px rgba(10, 31, 68, 0.06);
}

/* MASQUE l'ancien menu/footer Elementor (avec !important) */
[data-elementor-type="header"],
[data-elementor-type="footer"],
.elementor-location-header,
.elementor-location-footer,
header.elementor-element,
footer.elementor-element,
.site-header,
.site-footer,
#masthead,
#colophon {
  display: none !important;
}

/* Évite tout double scroll/padding du body */
body.im-loaded { margin: 0; padding-bottom: 80px; }

/* ============== HEADER ============== */
.im-header {
  position: sticky; top: 0; z-index: 9999;
  background: var(--im-bg);
  border-bottom: 1px solid var(--im-border);
  box-shadow: var(--im-shadow);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.im-header-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 24px; gap: 16px;
}
.im-logo {
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.im-logo img {
  height: 72px;
  width: auto;
  max-width: 240px;
  display: block;
  object-fit: contain;
}
@media (max-width: 600px) {
  .im-logo img { height: 52px; max-width: 180px; }
}

.im-nav {
  display: flex; align-items: center; gap: 4px;
}
.im-nav > a, .im-dropdown > a.im-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  color: var(--im-navy);
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.im-nav > a:hover, .im-dropdown:hover > a.im-dropdown-trigger {
  background: var(--im-soft);
  color: var(--im-red);
}
.im-nav > a.is-active { color: var(--im-red); }

/* Simulateur — visuellement distinct (violet, couleur d'origine de l'outil) */
.im-nav > a.im-nav-simulateur {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff !important;
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.32);
  white-space: nowrap;
}
.im-nav > a.im-nav-simulateur:hover {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.42);
}

.im-dropdown { position: relative; }
.im-dropdown > a.im-dropdown-trigger::after {
  content: "▾"; font-size: 10px; margin-left: 4px; opacity: 0.6;
}
.im-dropdown-all {
  font-weight: 700 !important;
  color: var(--im-red) !important;
  border-bottom: 1px solid var(--im-border);
  margin-bottom: 4px;
  padding-bottom: 12px !important;
}
/* Pont invisible pour éviter que le menu disparaisse en passant la souris */
.im-dropdown::after {
  content: "";
  position: absolute;
  top: 100%; left: 0; right: 0;
  height: 14px;
  background: transparent;
}
.im-dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0;
  background: var(--im-bg);
  min-width: 280px;
  border: 1px solid var(--im-border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(10, 31, 68, 0.14);
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: all 0.18s ease;
  pointer-events: none;
}
.im-dropdown:hover .im-dropdown-menu,
.im-dropdown:focus-within .im-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
  pointer-events: auto;
}
.im-dropdown-menu a {
  display: block; padding: 10px 14px;
  color: var(--im-navy);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s;
}
.im-dropdown-menu a:hover {
  background: var(--im-soft);
  color: var(--im-red);
}

.im-header .im-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 18px !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  background: var(--im-red) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  text-align: center !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 20px rgba(217, 41, 38, 0.32) !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
  letter-spacing: normal !important;
}
.im-header .im-cta:hover {
  background: var(--im-red-h) !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(217, 41, 38, 0.42) !important;
}

.im-burger {
  display: none;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer;
  color: var(--im-navy);
}
.im-burger svg { width: 24px; height: 24px; }

/* Responsive header */
@media (max-width: 1024px) {
  /* Force la disparition du CTA en barre principale (override !important du desktop) */
  .im-header > .im-header-inner > .im-cta,
  .im-header .im-cta { display: none !important; }
  .im-nav { display: none !important; }
  .im-burger { display: inline-flex !important; align-items: center; justify-content: center; }

  .im-header.is-open .im-nav {
    display: flex !important; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--im-bg);
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--im-border);
    box-shadow: var(--im-shadow);
    gap: 4px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .im-header.is-open .im-nav > a,
  .im-header.is-open .im-dropdown > a.im-dropdown-trigger {
    width: 100%; text-align: left; padding: 14px 14px !important;
    display: flex !important; align-items: center; justify-content: space-between;
  }

  /* Mobile : sous-menu Services FERMÉ par défaut */
  .im-header.is-open .im-dropdown-menu {
    display: none !important;
    position: static; box-shadow: none; border: none;
    padding: 4px 0 8px 16px;
    min-width: auto;
    opacity: 1; visibility: visible; transform: none;
    pointer-events: auto;
  }
  /* Quand le dropdown est ouvert (toggle JS) */
  .im-header.is-open .im-dropdown.is-open .im-dropdown-menu {
    display: block !important;
  }
  .im-header.is-open .im-dropdown.is-open > a.im-dropdown-trigger::after {
    transform: rotate(180deg);
  }
  .im-header.is-open .im-dropdown > a.im-dropdown-trigger::after {
    transition: transform .2s;
  }

  /* CTA EN BAS du menu mobile (révélé via .is-open du header) */
  .im-header.is-open .im-nav-cta-mobile {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    gap: 8px;
    align-self: stretch;
    background: var(--im-red);
    color: #fff !important;
    padding: 14px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    margin: 12px 0 0;
    box-shadow: 0 6px 16px rgba(217, 41, 38, 0.3);
  }

  /* Évite le débordement du logo sur les très petits écrans */
  .im-header-inner { padding: 10px 16px; gap: 10px; }
}
/* Le CTA mobile n'apparaît qu'en mobile */
.im-nav-cta-mobile { display: none; }

/* ============== FOOTER ============== */
.im-footer {
  background: var(--im-navy);
  color: rgba(255,255,255,0.85);
  margin-top: 80px;
  padding: 64px 24px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.im-footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 56px;
}
.im-footer-brand {
  display: flex; flex-direction: column; gap: 12px;
}
.im-footer-logo {
  display: inline-block;
  text-decoration: none;
  background: #fff;
  padding: 4px 8px;
  border-radius: 10px;
  align-self: flex-start;
}
.im-footer-logo img {
  height: 70px;
  width: auto;
  max-width: 200px;
  display: block;
}
.im-footer-brand p {
  margin: 0;
  color: rgba(255,255,255,0.6);
  font-size: 14px; line-height: 1.6;
}
.im-footer-brand .contact-info {
  margin-top: 12px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px;
}
.im-footer-brand .contact-info a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.2s;
}
.im-footer-brand .contact-info a:hover { color: var(--im-orange); }

.im-footer h3 {
  margin: 0 0 18px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--im-orange);
}
.im-footer ul { list-style: none; padding: 0; margin: 0; }
.im-footer li { margin-bottom: 11px; }
.im-footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.im-footer a:hover { color: #fff; }

.im-footer-bottom {
  max-width: 1280px; margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap; gap: 12px;
}
.im-footer-bottom a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}
.im-footer-bottom a:hover { color: var(--im-orange); }

@media (max-width: 900px) {
  .im-footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 600px) {
  .im-footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .im-footer { margin-top: 40px; padding: 48px 20px 20px; }
}

/* ============== STICKY CTA BAR ============== */
.im-cta-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
  background: linear-gradient(135deg, var(--im-red) 0%, #e63a2b 100%);
  color: #fff;
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 -8px 24px rgba(10, 31, 68, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: im-slide-up 0.5s ease-out 0.6s both;
}
.im-cta-bar-text {
  font-size: 13px; font-weight: 500;
  opacity: 0.92;
  display: none;
}
@media (min-width: 600px) {
  .im-cta-bar-text { display: inline; }
}
.im-cta-call {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff;
  color: var(--im-red);
  padding: 10px 22px;
  font-size: 15px; font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: all 0.2s;
}
.im-cta-call:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  color: var(--im-red-h);
}
.im-cta-call svg {
  width: 16px; height: 16px;
  animation: im-ring 1.4s ease-in-out infinite;
}

/* ============== CONTACT FORM ============== */
/* Sur les pages contact, on masque l'ancien contenu Elementor (entre header et footer) */
body.im-contact-page > *:not(.im-header):not(.im-footer):not(.im-contact-section):not(.im-cta-bar):not(script):not(style):not(noscript) {
  display: none !important;
}
body.im-contact-page { padding-bottom: 0; }

.im-contact-section {
  position: relative;
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 41, 38, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(10, 31, 68, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, var(--im-soft) 0%, var(--im-bg) 60%);
  padding: 64px 24px 80px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 70vh;
  overflow: hidden;
}
.im-contact-section::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(217, 41, 38, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.im-contact-section::after {
  content: "";
  position: absolute;
  bottom: -80px; left: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(10, 31, 68, 0.06), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.im-contact-wrap { position: relative; z-index: 1; }
.im-contact-wrap {
  max-width: 720px; margin: 0 auto;
}
.im-contact-header { text-align: center; margin-bottom: 40px; }
.im-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--im-red);
  padding: 6px 14px;
  background: rgba(217, 41, 38, 0.08);
  border-radius: 999px;
  margin-bottom: 14px;
}
.im-contact-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--im-navy);
  line-height: 1.15;
  margin: 0 0 14px;
}
.im-contact-header p {
  font-size: 17px;
  color: var(--im-muted);
  line-height: 1.6;
  margin: 0;
}
.im-contact-header strong { color: var(--im-navy); }

.im-form {
  background: var(--im-bg);
  border: 1px solid var(--im-border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 8px 40px rgba(10, 31, 68, 0.08);
}
.im-honey { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }

.im-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 18px;
}
.im-form-field { margin-bottom: 18px; display: flex; flex-direction: column; }
.im-form-row .im-form-field { margin-bottom: 0; }

.im-form-field label {
  font-size: 13px; font-weight: 600;
  color: var(--im-navy);
  margin-bottom: 6px;
}
.im-form-field label span { color: var(--im-red); }
.im-form-field input,
.im-form-field select,
.im-form-field textarea {
  width: 100%;
  border: 1.5px solid var(--im-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--im-text);
  background: var(--im-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.im-form-field input:focus,
.im-form-field select:focus,
.im-form-field textarea:focus {
  outline: none;
  border-color: var(--im-red);
  box-shadow: 0 0 0 3px rgba(217, 41, 38, 0.12);
}
.im-form-field textarea { resize: vertical; min-height: 120px; }
.im-form-field input[type="file"] {
  padding: 10px 12px;
  background: var(--im-soft);
  border-style: dashed;
}
.im-form-field small {
  margin-top: 6px;
  font-size: 12px;
  color: var(--im-muted);
}

.im-form-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: var(--im-red);
  color: #fff;
  padding: 14px 24px;
  font-size: 16px; font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 8px 22px rgba(217, 41, 38, 0.32);
  transition: all 0.2s;
  font-family: inherit;
}
.im-form-submit:hover {
  background: var(--im-red-h);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(217, 41, 38, 0.42);
}
.im-form-submit:disabled {
  background: var(--im-muted);
  cursor: wait; transform: none; box-shadow: none;
}
.im-form-submit svg { width: 18px; height: 18px; }

.im-form-privacy {
  font-size: 12px;
  color: var(--im-muted);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
}
.im-form-success {
  background: #ecfdf5;
  color: #047857;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  margin-top: 16px;
  text-align: center;
}
.im-form-error {
  background: #fef2f2;
  color: #b91c1c;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  margin-top: 16px;
  text-align: center;
}

/* ============== MODAL REMERCIEMENT ============== */
.im-thanks-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: im-thanks-fade 0.25s ease-out;
}
.im-thanks-modal[hidden] { display: none; }
.im-thanks-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}
.im-thanks-card {
  position: relative;
  background: #fff;
  max-width: 460px;
  width: 100%;
  border-radius: 20px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  animation: im-thanks-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.im-thanks-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
}
.im-thanks-close:hover { color: #1e293b; }
.im-thanks-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: im-thanks-check-pop 0.5s ease-out 0.15s both;
}
.im-thanks-check svg { width: 38px; height: 38px; }
.im-thanks-card h3 {
  font-size: 22px;
  margin: 0 0 12px;
  color: #0f172a;
  font-weight: 700;
}
.im-thanks-text {
  color: #475569;
  margin: 0 0 16px;
  line-height: 1.55;
}
.im-thanks-spam {
  background: #fef9c3;
  color: #713f12;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 24px;
  text-align: left;
}
.im-thanks-spam strong { color: #422006; }
.im-thanks-ok {
  background: #dc2626;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}
.im-thanks-ok:hover { background: #b91c1c; }

@keyframes im-thanks-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes im-thanks-pop {
  0% { opacity: 0; transform: scale(0.85) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes im-thanks-check-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

body.im-thanks-open { overflow: hidden; }

@media (max-width: 600px) {
  .im-form-row { grid-template-columns: 1fr; gap: 0; }
  .im-form-row .im-form-field { margin-bottom: 18px; }
  .im-form { padding: 22px; }
  .im-contact-section { padding: 32px 16px 80px; }
  .im-thanks-card { padding: 32px 22px 24px; }
  .im-thanks-card h3 { font-size: 19px; }
}

/* ============== ANIMATIONS ============== */
@keyframes im-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}
@keyframes im-ring {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-15deg); }
  20%, 40% { transform: rotate(15deg); }
  50% { transform: rotate(0); }
}
@keyframes im-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
