/* ============================================================================
   NAVBAR MOBILE/TABLETTE — composant premium partagé par toutes les pages.
   Source de vérité : marquage et comportement validés sur Sites-Web.dc.html.
   Desktop (>1120px) strictement inchangé par ce fichier : il ne cible que
   .ea-mobile-* et les deux overrides ponctuels d'en-tête/wrap ci-dessous.
   Toute évolution future du menu mobile se fait UNIQUEMENT ici.
   ============================================================================ */
.ea-mobile-nav,
.ea-mobile-menu-layer {
  display:none;
}
/* Static (non-DC) consumers keep this element permanently in the DOM and
   toggle the `hidden` attribute instead of mounting/unmounting it; this
   must win over the `display:flex` the open state sets below. */
.ea-mobile-menu-layer[hidden] {
  display:none !important;
}
@keyframes ea-mobile-backdrop-in { from { opacity:0; } to { opacity:1; } }
@keyframes ea-mobile-backdrop-out { from { opacity:1; } to { opacity:0; } }
@keyframes ea-mobile-panel-in { from { opacity:.98; transform:translate3d(100%,0,0); } to { opacity:1; transform:translate3d(0,0,0); } }
@keyframes ea-mobile-panel-out { from { opacity:1; transform:translate3d(0,0,0); } to { opacity:.98; transform:translate3d(100%,0,0); } }
@keyframes ea-mobile-head-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
@keyframes ea-mobile-entry-in { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }
@keyframes ea-mobile-cta-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:1120px) {
  .ea-site-header { padding:18px 18px 0 !important; }
  #offres-mega-wrap { width:100% !important; max-width:100% !important; }
  #offres-mega-wrap > .ea-desktop-nav { display:none !important; }
  .ea-mobile-nav {
    width:100%; min-width:0; min-height:58px; box-sizing:border-box;
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    padding:7px 8px 7px 10px; border-radius:22px; background:#0B1B3F;
    box-shadow:0 12px 28px rgba(11,27,63,.14);
  }
  .ea-mobile-brand {
    min-width:0; min-height:44px; display:inline-flex; align-items:center; gap:9px;
    padding:3px 5px; border-radius:14px; color:#fff; font-family:'Sora',sans-serif;
    font-size:15px; font-weight:700; letter-spacing:-.2px; white-space:nowrap;
    transition:background-color 180ms cubic-bezier(.23,1,.32,1),transform 150ms cubic-bezier(.23,1,.32,1);
  }
  .ea-mobile-brand img { width:36px; height:36px; display:block; object-fit:contain; border-radius:11px; background:#fff; }
  .ea-mobile-menu-trigger,
  .ea-mobile-menu-close {
    min-width:48px; min-height:48px; box-sizing:border-box; display:inline-flex; align-items:center;
    justify-content:center; gap:8px; margin:0; border:1px solid rgba(255,255,255,.14);
    border-radius:16px; background:rgba(255,255,255,.08); color:#fff;
    font:600 14px/1 'Plus Jakarta Sans',system-ui,sans-serif; cursor:pointer;
    transition:background-color 180ms cubic-bezier(.23,1,.32,1),border-color 180ms ease,transform 150ms cubic-bezier(.23,1,.32,1);
  }
  .ea-mobile-menu-trigger { flex:0 0 auto; padding:0 14px; }
  .ea-mobile-menu-trigger svg, .ea-mobile-menu-close svg { width:19px; height:19px; flex:none; }
  .ea-mobile-menu-trigger:active, .ea-mobile-menu-close:active, .ea-mobile-brand:active,
  .ea-mobile-nav-link:active, .ea-mobile-accordion-trigger:active, .ea-mobile-subnav-link:active { transform:scale(.97); }
  .ea-mobile-menu-trigger:focus-visible, .ea-mobile-menu-close:focus-visible, .ea-mobile-brand:focus-visible {
    outline:2px solid #fff; outline-offset:3px;
  }
  .ea-mobile-menu-layer { position:fixed; inset:0; z-index:200; display:flex; justify-content:flex-end; min-width:0; height:100dvh; isolation:isolate; }
  .ea-mobile-menu-backdrop {
    position:absolute; inset:0; z-index:-1; background:rgba(5,18,45,.34);
    -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  }
  .ea-mobile-menu-layer.is-open .ea-mobile-menu-backdrop { animation:ea-mobile-backdrop-in 200ms ease both; }
  .ea-mobile-menu-layer.is-closing .ea-mobile-menu-backdrop { animation:ea-mobile-backdrop-out 300ms ease both; }
  .ea-mobile-menu-panel {
    width:min(400px,calc(100% - 18px)); min-width:0; height:100dvh; max-height:100dvh; box-sizing:border-box;
    display:flex; flex-direction:column; overflow:hidden; border-left:1px solid #E1E8F3;
    border-radius:28px 0 0 28px; background:#F8FAFD; color:#0B1B3F;
    box-shadow:-20px 0 54px rgba(11,27,63,.16);
  }
  .ea-mobile-menu-layer.is-open .ea-mobile-menu-panel { animation:ea-mobile-panel-in 430ms cubic-bezier(.22,1,.36,1) both; }
  .ea-mobile-menu-layer.is-closing .ea-mobile-menu-panel { animation:ea-mobile-panel-out 300ms cubic-bezier(.22,1,.36,1) both; }
  .ea-mobile-menu-head {
    flex:none; display:flex; align-items:center; justify-content:space-between; gap:16px;
    padding:calc(19px + env(safe-area-inset-top,0px)) 20px 19px; border-bottom:1px solid #E7ECF6; background:#fff;
  }
  .ea-mobile-menu-layer.is-open .ea-mobile-menu-head { animation:ea-mobile-head-in 300ms cubic-bezier(.22,1,.36,1) 80ms both; }
  .ea-mobile-panel-brand { min-width:0; display:flex; align-items:center; gap:10px; color:#0B1B3F; font-family:'Sora',sans-serif; font-size:16px; font-weight:700; }
  .ea-mobile-panel-brand img { width:40px; height:40px; display:block; object-fit:contain; border:1px solid #E7ECF5; border-radius:12px; background:#fff; }
  .ea-mobile-menu-close {
    flex:0 0 44px; width:44px; height:44px; min-width:44px; min-height:44px; padding:0; display:inline-flex; align-items:center; justify-content:center;
    border:0; border-radius:50%; background:#EAF1FE; color:#0B1B3F; cursor:pointer;
    transition:background-color 180ms cubic-bezier(.23,1,.32,1),transform 150ms cubic-bezier(.23,1,.32,1);
  }
  .ea-mobile-menu-close:active { transform:scale(.94); }
  .ea-mobile-menu-close:focus-visible, .ea-mobile-nav-link:focus-visible,
  .ea-mobile-accordion-trigger:focus-visible, .ea-mobile-subnav-link:focus-visible,
  .ea-mobile-menu-cta-button:focus-visible, .ea-mobile-menu-cta-phone:focus-visible { outline:2px solid #1D6BF2; outline-offset:3px; }
  .ea-mobile-menu-scroll {
    flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain;
    display:flex; flex-direction:column;
    padding:22px 20px calc(20px + env(safe-area-inset-bottom,0px)); scrollbar-gutter:stable;
  }
  .ea-mobile-menu-nav { display:flex; flex-direction:column; gap:4px; }
  .ea-mobile-menu-layer.is-open .ea-mobile-nav-link,
  .ea-mobile-menu-layer.is-open .ea-mobile-accordion {
    animation:ea-mobile-entry-in 320ms cubic-bezier(.22,1,.36,1) both;
    animation-delay:calc(120ms + var(--i,0) * 40ms);
  }
  .ea-mobile-nav-link {
    width:100%; min-height:52px; box-sizing:border-box; display:flex; align-items:center; justify-content:space-between;
    gap:10px; padding:13px 10px; border-radius:14px; background:transparent;
    color:#0B1B3F; text-decoration:none; font:600 16px/1.3 'Plus Jakarta Sans',system-ui,sans-serif; cursor:pointer;
    transition:background-color 180ms cubic-bezier(.22,1,.36,1),transform 150ms cubic-bezier(.22,1,.36,1),box-shadow 180ms ease;
  }
  .ea-mobile-nav-link:active { transform:scale(.98); }
  .ea-mobile-nav-link + .ea-mobile-nav-link { border-top:1px solid #E8EDF5; }
  .ea-mobile-nav-link.is-current {
    background:#EEF5FF; box-shadow:inset 3px 0 0 0 #1D6BF2; padding-left:14px;
  }
  .ea-mobile-nav-link.is-current .ea-mobile-nav-icon { color:#1D6BF2; }
  .ea-mobile-nav-left { display:flex; align-items:center; gap:12px; min-width:0; flex:1 1 auto; }
  .ea-mobile-nav-icon {
    flex:none; width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center;
    border-radius:50%; color:inherit;
  }
  .ea-mobile-nav-icon svg { width:18px; height:18px; flex:none; }
  .ea-mobile-accordion { margin:10px 0; border:1px solid #E4EAF4; border-radius:16px; background:#fff; overflow:hidden; box-shadow:0 3px 10px rgba(11,27,63,.035); }
  .ea-mobile-nav-arrow { flex:none; color:#B9C6DF; transition:transform 180ms cubic-bezier(.22,1,.36,1),color 180ms ease; }
  .ea-mobile-accordion-trigger {
    width:100%; min-height:54px; box-sizing:border-box; display:flex; align-items:center; justify-content:space-between;
    gap:12px; margin:0; padding:13px 15px; border:0; background:transparent;
    color:#0B1B3F; text-align:left; font:650 16px/1.3 'Plus Jakarta Sans',system-ui,sans-serif; cursor:pointer;
    transition:color 180ms ease;
  }
  .ea-mobile-chevron {
    flex:none; display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px;
    border-radius:50%; background:#F0F4FC; color:#5E7398;
    transition:background-color 180ms ease,color 180ms ease;
  }
  .ea-mobile-chevron svg { width:14px; height:14px; transition:transform 280ms cubic-bezier(.22,1,.36,1); }
  .ea-mobile-accordion-trigger[aria-expanded="true"] { color:#1553CC; }
  .ea-mobile-accordion-trigger[aria-expanded="true"] .ea-mobile-chevron { background:#DCEAFF; color:#1D6BF2; }
  .ea-mobile-accordion-trigger[aria-expanded="true"] .ea-mobile-chevron svg { transform:rotate(180deg); }
  .ea-mobile-accordion-panel { display:grid; grid-template-rows:0fr; opacity:0; transition:grid-template-rows 300ms cubic-bezier(.22,1,.36,1),opacity 250ms ease; }
  .ea-mobile-accordion-panel.is-open { grid-template-rows:1fr; opacity:1; }
  .ea-mobile-accordion-inner { min-height:0; overflow:hidden; transform:translateY(-4px); transition:transform 300ms cubic-bezier(.22,1,.36,1); }
  .ea-mobile-accordion-panel.is-open .ea-mobile-accordion-inner { transform:translateY(0); }
  .ea-mobile-subnav { display:grid; gap:1px; margin:0 8px 10px; padding:8px 0 0; border-top:1px solid #EEF2F8; }
  .ea-mobile-subnav-link {
    position:relative; min-height:44px; box-sizing:border-box; display:flex; align-items:center;
    padding:9px 12px 9px 20px; border-radius:10px; color:#4A5A78; font-size:14px; line-height:1.35; font-weight:500;
    transition:background-color 180ms ease,color 180ms ease;
  }
  .ea-mobile-subnav-link::before { content:''; position:absolute; left:6px; top:50%; width:4px; height:4px; border-radius:50%; background:#C3CEE2; transform:translateY(-50%); transition:background-color 180ms ease; }
  .ea-mobile-subnav-link.is-active { color:#1553CC; font-weight:700; background:#F2F7FF; }
  .ea-mobile-subnav-link.is-active::before { background:#1D6BF2; width:5px; height:5px; }
  .ea-mobile-menu-cta { margin-top:auto; padding-top:26px; }
  .ea-mobile-menu-layer.is-open .ea-mobile-menu-cta { animation:ea-mobile-cta-in 320ms cubic-bezier(.22,1,.36,1) 340ms both; }
  .ea-mobile-menu-cta-tagline { margin:0 0 14px; text-align:center; color:#5B6B8C; font-size:13px; line-height:1.5; }
  .ea-mobile-menu-cta-button {
    display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:52px; box-sizing:border-box;
    border-radius:15px; background:#1D6BF2; color:#fff; text-decoration:none;
    font:700 16px/1 'Plus Jakarta Sans',system-ui,sans-serif;
    box-shadow:0 10px 22px rgba(29,107,242,.24);
    transition:transform 180ms cubic-bezier(.22,1,.36,1),box-shadow 180ms ease,background-color 180ms ease;
  }
  .ea-mobile-menu-cta-button:active { transform:translateY(-1px) scale(.99); box-shadow:0 12px 26px rgba(29,107,242,.32); }
  .ea-mobile-menu-cta-phone {
    display:flex; align-items:center; justify-content:center; min-height:44px; margin-top:12px;
    color:#0B1B3F; font-size:14.5px; font-weight:600; text-decoration:none;
  }
  @media (hover:hover) and (pointer:fine) {
    .ea-mobile-menu-trigger:hover, .ea-mobile-brand:hover { background:rgba(255,255,255,.14); }
    .ea-mobile-menu-close:hover { background:#DCEAFF; }
    .ea-mobile-nav-link:hover { background:#F0F4FC; }
    .ea-mobile-nav-link:hover .ea-mobile-nav-arrow { color:#1D6BF2; transform:translateX(2px); }
    .ea-mobile-accordion-trigger:hover { background:#FAFBFE; }
    .ea-mobile-subnav-link:hover { background:#F2F7FF; color:#1553CC; }
    .ea-mobile-menu-cta-button:hover { background:#1553CC; }
    .ea-mobile-menu-cta-phone:hover { color:#1D6BF2; }
  }
}
@media (max-width:380px) {
  .ea-site-header { padding-inline:12px !important; }
  .ea-mobile-nav { gap:8px; }
  .ea-mobile-brand span { font-size:14px; }
  .ea-mobile-menu-trigger { padding-inline:12px; }
  .ea-mobile-menu-panel { width:calc(100% - 10px); }
}
/* Self-sufficient reduced-motion guard: some host pages scope their own
   reduced-motion rule narrowly rather than a blanket `* {}`, so this
   component must not depend on the host page providing one. */
@media (prefers-reduced-motion:reduce) {
  .ea-mobile-menu-backdrop, .ea-mobile-menu-panel, .ea-mobile-menu-head,
  .ea-mobile-nav-link, .ea-mobile-accordion, .ea-mobile-menu-cta { animation:none !important; }
  .ea-mobile-accordion-panel, .ea-mobile-accordion-inner, .ea-mobile-chevron svg,
  .ea-mobile-nav-arrow, .ea-mobile-menu-close, .ea-mobile-nav-link, .ea-mobile-accordion-trigger,
  .ea-mobile-subnav-link, .ea-mobile-menu-cta-button, .ea-mobile-brand { transition:none !important; }
}

/* PHASE E — Bouton "Menu" flottant (téléphone uniquement, <=767px). N'ouvre
   jamais un second panneau : il relaie un clic vers #ea-mobile-menu-trigger,
   qui reste l'unique déclencheur réel du menu existant. Tablette (768–1120px)
   et desktop (>1120px) non concernés par cette phase. */
.ea-mobile-floating-trigger { display:none; }
@media (max-width:767px) {
  .ea-mobile-floating-trigger {
    display:inline-flex; align-items:center; gap:7px;
    position:fixed; top:calc(14px + env(safe-area-inset-top,0px)); right:calc(14px + env(safe-area-inset-right,0px));
    z-index:150; min-height:48px; padding:0 18px; border:0; border-radius:999px;
    background:#0B1B3F; color:#fff; font:600 14.5px/1 'Plus Jakarta Sans',system-ui,sans-serif;
    box-shadow:0 14px 30px rgba(11,27,63,.26),0 2px 6px rgba(11,27,63,.15);
    opacity:0; transform:translateY(-10px); pointer-events:none; cursor:pointer;
    transition:opacity 200ms ease,transform 200ms cubic-bezier(.23,1,.32,1);
  }
  .ea-mobile-floating-trigger svg { width:17px; height:17px; flex:none; }
  .ea-mobile-floating-trigger.is-visible { opacity:1; transform:translateY(0); pointer-events:auto; }
  .ea-mobile-floating-trigger.is-visible:active { transform:translateY(0) scale(.96); }
  .ea-mobile-floating-trigger:focus-visible { outline:2px solid #fff; outline-offset:3px; }
}
@media (prefers-reduced-motion:reduce) {
  .ea-mobile-floating-trigger { transition:opacity 160ms ease; transform:none !important; }
  .ea-mobile-floating-trigger.is-visible:active { transform:none !important; }
}
