/* ═══════════════════════════════════════════════════════════════
   ELYRIA HEADER v8 — Polish Premium
   Direction : Apple · Linear · Framer
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. CONTAINER ─────────────────────────────────────────────── */
.elyria-header {
  position         : sticky;
  top              : 0;
  z-index          : 1000;
  padding          : 20px 24px 0;   /* plus d'air au-dessus = effet flottant */
}

/* ── 2. PILL GLASS ────────────────────────────────────────────── */
.elyria-header__inner {
  position               : relative;
  display                : flex;
  align-items            : center;
  justify-content        : space-between;
  gap                    : 12px;
  max-width              : 1200px;
  margin                 : 0 auto;
  min-height             : 62px;
  padding                : 0 10px 0 22px;
  border-radius          : 24px;           /* plus arrondi = moins "barre" */

  /* Glass ultra-léger */
  background             : rgba(255, 255, 255, 0.80);
  border                 : 1px solid rgba(0, 0, 0, 0.055);
  backdrop-filter        : blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);

  box-shadow             :
    inset 0 1px 0 rgba(255,255,255,0.96),
    0  2px 24px rgba(0,0,0,0.055),
    0  1px  3px rgba(0,0,0,0.038);

  isolation              : isolate;   /* empêche mix-blend des enfants de fuiter hors du pill */
  z-index                : 1000;       /* reste au-dessus de l'overlay mobile (z-index:999 dans le contexte du header) — toggle toujours cliquable */

  transition             :
    background   0.45s ease,
    border-color 0.45s ease,
    box-shadow   0.45s ease,
    min-height   0.36s cubic-bezier(0.22,1,0.36,1);
}

/* Ligne lumineuse top */
.elyria-header__inner::after {
  content        : '';
  position       : absolute;
  top            : 0;
  left           : 10%;
  right          : 10%;
  height         : 1px;
  background     : linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.96) 40%,
    rgba(255,255,255,0.70) 60%,
    transparent
  );
  border-radius  : 999px;
  pointer-events : none;
}

/* Scrollé → plus opaque, légèrement plus compact */
.elyria-header.is-scrolled .elyria-header__inner {
  background    : rgba(255,255,255,0.97);
  border-color  : rgba(0,0,0,0.08);
  min-height    : 56px;
  box-shadow    :
    inset 0 1px 0 rgba(255,255,255,0.96),
    0  6px 40px rgba(0,0,0,0.10),
    0  1px  6px rgba(0,0,0,0.05);
}

/* ── 3. LOGO ──────────────────────────────────────────────────── */
.elyria-brand {
  display        : inline-flex;
  align-items    : center;
  text-decoration: none;
  flex-shrink    : 0;
  transition     : opacity 0.25s ease, transform 0.30s cubic-bezier(0.22,1,0.36,1);
}
.elyria-brand:hover  { opacity: 0.82; transform: scale(1.04); }
.elyria-brand:active { transform: scale(0.97); }

.elyria-header .elyria-brand-img {
  display        : block   !important;
  height         : 52px;
  width          : auto;
  max-width      : 180px;
  object-fit     : contain;
  object-position: left center;
  opacity        : 1       !important;
  visibility     : visible !important;
}

/* Scrollé → légèrement plus compact */
.elyria-header.is-scrolled .elyria-brand-img {
  height : 44px;
}

/* Fallback masqué par défaut — JS l'affiche uniquement si l'image échoue */
.elyria-header .elyria-brand-fallback {
  display    : none            !important;
}
.elyria-brand-mark {
  width       : 36px;
  height      : 36px;
  display     : grid;
  place-items : center;
  border-radius: 10px;
  background  : linear-gradient(140deg, #1a1a2e 0%, #334155 100%);
  color       : #fff;
  font-weight : 900;
  font-size   : 16px;
  font-family : "Cabinet Grotesk", sans-serif;
  letter-spacing: -0.04em;
  flex-shrink : 0;
}
.elyria-brand-name {
  font-size     : 15px;
  font-weight   : 700;
  color         : #111;
  letter-spacing: -0.03em;
}

/* Sécurité : aucun CSS externe (styles.css accueil) ne peut écraser ça */
.elyria-header .elyria-brand {
  min-width : max-content;
  overflow  : visible;
  opacity   : 1            !important;
  visibility: visible      !important;
}

/* ── 4. NAV ───────────────────────────────────────────────────── */
.elyria-nav {
  display      : flex;
  align-items  : center;
  gap          : 2px;
  background   : none;
  border       : none;
  padding      : 0;
  border-radius: 0;
  list-style   : none;
  margin       : 0;
}

/* Item dropdown — stretch = remplit la hauteur de la pill */
.elyria-nav-item {
  position  : relative;
  align-self: stretch;
  display   : flex;
  align-items: center;
}

/*
  Bridge hover invisible — comble le gap de 12px entre la pill
  et le dropdown pour éviter tout flicker au passage de la souris.
*/
.elyria-nav-item::before {
  content        : '';
  position       : absolute;
  top            : 100%;
  left           : -10px;
  right          : -10px;
  height         : 18px;       /* > 12px gap */
  background     : transparent;
  pointer-events : auto;
  z-index        : 99;
}

.elyria-nav-link {
  display       : inline-flex;
  align-items   : center;
  gap           : 5px;
  padding       : 8px 13px;
  color         : #4a5060;
  font-size     : 13.5px;
  font-weight   : 500;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space   : nowrap;
  border-radius : 9px;
  position      : relative;
  z-index       : 1;
  transition    : color 0.20s ease, background 0.20s ease;
  user-select   : none;
}
.elyria-nav-link:hover,
.elyria-nav-item.is-dd-open .elyria-nav-link {
  color      : #111;
  background : rgba(0,0,0,0.045);
}
.elyria-nav-link.is-active {
  color      : #111;
  font-weight: 600;
}
/* Petit trait actif — sobre, pas bleu électrique */
.elyria-nav-link.is-active::after {
  content      : '';
  position     : absolute;
  bottom       : 5px;
  left         : 50%;
  transform    : translateX(-50%);
  width        : 14px;
  height       : 1.5px;
  border-radius: 999px;
  background   : #0F172A;
}

/* Chevron — tourne seulement via classe JS */
.elyria-nav-caret {
  color     : rgba(0,0,0,0.28);
  flex-shrink: 0;
  transition: transform 0.26s cubic-bezier(0.22,1,0.36,1);
}
.elyria-nav-item.is-dd-open .elyria-nav-caret {
  transform: rotate(180deg);
}

/* ── 5. DROPDOWN CARD ─────────────────────────────────────────── */
.elyria-dd {
  position      : absolute;
  top           : calc(100% + 12px);
  left          : 50%;
  transform     : translateX(-50%) translateY(-8px);
  min-width     : 264px;
  z-index       : 100;

  background    : #fff;
  border        : 1px solid rgba(0,0,0,0.075);
  border-radius : 18px;
  box-shadow    :
    0  4px 60px rgba(0,0,0,0.13),
    0  1px  2px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,1);

  opacity       : 0;
  visibility    : hidden;
  pointer-events: none;
  transition    :
    opacity    0.20s cubic-bezier(0.22,1,0.36,1),
    visibility 0.20s ease,
    transform  0.20s cubic-bezier(0.22,1,0.36,1);
}

/* Ouverture gérée uniquement via JS (.is-dd-open) — zéro conflit CSS hover */
.elyria-nav-item.is-dd-open .elyria-dd {
  opacity       : 1;
  visibility    : visible;
  transform     : translateX(-50%) translateY(0);
  pointer-events: all;
}

/* Pointe de connexion */
.elyria-dd-tip {
  position : absolute;
  top      : -6px;
  left     : 50%;
  transform: translateX(-50%);
  width    : 14px;
  height   : 7px;
  overflow : hidden;
}
.elyria-dd-tip::before {
  content      : '';
  position     : absolute;
  top          : 2px;
  left         : 50%;
  transform    : translateX(-50%) rotate(45deg);
  width        : 10px;
  height       : 10px;
  background   : #fff;
  border       : 1px solid rgba(0,0,0,0.075);
  border-radius: 2px;
}

.elyria-dd-body { padding: 8px; }

.elyria-dd-row {
  display       : flex;
  align-items   : center;
  gap           : 12px;
  padding       : 9px 10px;
  border-radius : 11px;
  text-decoration: none;
  transition    :
    background 0.16s ease,
    transform  0.20s cubic-bezier(0.22,1,0.36,1);
}
.elyria-dd-row:hover {
  background: rgba(0,0,0,0.04);
  transform : translateX(3px);     /* micro glide premium */
}

.elyria-dd-ico {
  width        : 34px;
  height       : 34px;
  border-radius: 9px;
  display      : grid;
  place-items  : center;
  flex-shrink  : 0;
  transition   : transform 0.20s cubic-bezier(0.22,1,0.36,1);
}
.elyria-dd-row:hover .elyria-dd-ico { transform: scale(1.08); }

.elyria-dd-ico.c-blue   { background: rgba(37,99,235,0.10);  color: #2563EB; }
.elyria-dd-ico.c-purple { background: rgba(109,40,217,0.10); color: #7C3AED; }
.elyria-dd-ico.c-green  { background: rgba(16,185,129,0.10); color: #059669; }
.elyria-dd-ico.c-orange { background: rgba(245,158,11,0.10); color: #D97706; }
.elyria-dd-ico.c-pink   { background: rgba(236,72,153,0.10); color: #DB2777; }

.elyria-dd-txt           { display: flex; flex-direction: column; gap: 2px; }
.elyria-dd-txt b         { display: block; font-size: 13px; font-weight: 600; color: #111; line-height: 1.2; }
.elyria-dd-txt small     { display: block; font-size: 11.5px; color: #6b7280; line-height: 1.3; font-weight: 400; }

/* ── 6. CTA BUTTONS ───────────────────────────────────────────── */
.elyria-header-actions {
  display    : inline-flex;
  align-items: center;
  gap        : 8px;
  flex-shrink: 0;
}

.elyria-header-cta {
  position       : relative;
  display        : inline-flex;
  align-items    : center;
  justify-content: center;
  gap            : 6px;
  height         : 38px;
  padding        : 0 18px;
  border-radius  : 10px;
  font-size      : 13.5px;
  font-weight    : 600;
  text-decoration: none;
  white-space    : nowrap;
  letter-spacing : -0.01em;
  overflow       : hidden;
  transition     :
    background   0.22s cubic-bezier(0.22,1,0.36,1),
    border-color 0.22s ease,
    color        0.22s ease,
    transform    0.22s cubic-bezier(0.22,1,0.36,1),
    box-shadow   0.22s cubic-bezier(0.22,1,0.36,1);
}

/* Ghost */
.elyria-header-cta--ghost {
  color     : #4a5060;
  background: transparent;
  border    : 1px solid rgba(0,0,0,0.11);
}
.elyria-header-cta--ghost:hover {
  color       : #111;
  border-color: rgba(0,0,0,0.20);
  background  : rgba(0,0,0,0.038);
  transform   : translateY(-1px);
}
.elyria-header-cta--ghost:active {
  transform        : scale(0.97);
  transition-duration: 0.08s;
}

/* Primary — breathing glow */
@keyframes eh-pulse {
  0%, 100% { box-shadow: 0 1px 4px rgba(0,0,0,0.16), 0  3px 14px rgba(15,23,42,0.13); }
  50%       { box-shadow: 0 1px 4px rgba(0,0,0,0.16), 0  7px 28px rgba(15,23,42,0.22); }
}

.elyria-header-cta--primary {
  color     : #fff;
  background: #0F172A;
  border    : 1px solid rgba(255,255,255,0.06);
  animation : eh-pulse 3.8s ease-in-out infinite;
}
.elyria-header-cta--primary:hover {
  background: #1e293b;
  transform : translateY(-1.5px);
  animation : none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22), 0 8px 32px rgba(15,23,42,0.20);
}
.elyria-header-cta--primary:active {
  transform        : scale(0.96);
  transition-duration: 0.08s;
  animation        : none;
}

/* Shine sweep */
.elyria-cta-shine {
  position      : absolute;
  top           : 0;
  left          : -130%;
  width         : 60%;
  height        : 100%;
  background    : linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  transform     : skewX(-22deg);
  pointer-events: none;
}
.elyria-header-cta--primary:hover .elyria-cta-shine {
  animation: eh-shine 0.50s ease forwards;
}
@keyframes eh-shine { to { left: 190%; } }

/* ── 7. MOBILE TOGGLE ─────────────────────────────────────────── */
.elyria-mobile-toggle {
  display        : none;
  flex-direction : column;
  align-items    : center;
  justify-content: center;
  gap            : 5px;
  width          : 40px;
  height         : 40px;
  border         : 1px solid rgba(0,0,0,0.09);
  border-radius  : 10px;
  background     : transparent;
  cursor         : pointer;
  padding        : 0;
  flex-shrink    : 0;
  transition     : background 0.18s ease, border-color 0.18s ease;
}
.elyria-mobile-toggle:hover {
  background  : rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.16);
}

.elyria-tgl-line {
  display      : block;
  height       : 1.5px;
  background   : #111;
  border-radius: 999px;
  transition   : transform 0.30s cubic-bezier(0.4,0,0.2,1), width 0.30s ease;
}
.elyria-tgl-line:nth-child(1) { width: 18px; }
.elyria-tgl-line:nth-child(2) { width: 12px; }
.elyria-header.is-open .elyria-tgl-line:nth-child(1) {
  width    : 18px;
  transform: translateY(3.5px) rotate(45deg);
}
.elyria-header.is-open .elyria-tgl-line:nth-child(2) {
  width    : 18px;
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ── 8. MOBILE OVERLAY ────────────────────────────────────────── */
.elyria-mobile-overlay {
  position           : fixed;
  inset              : 0;
  z-index            : 999;
  background         : rgba(255,255,255,0.98);
  backdrop-filter    : blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  opacity            : 0;
  visibility         : hidden;
  transform          : translateY(-10px);
  transition         :
    opacity    0.28s ease,
    visibility 0.28s ease,
    transform  0.28s cubic-bezier(0.22,1,0.36,1);
  pointer-events     : none;
  overflow-y         : auto;
  -webkit-overflow-scrolling: touch;
}
.elyria-header.is-open .elyria-mobile-overlay {
  opacity       : 1;
  visibility    : visible;
  transform     : translateY(0);
  pointer-events: all;
}

.elyria-mobile-inner {
  display        : flex;
  flex-direction : column;
  min-height     : 100%;
  padding        : 86px 24px 52px;
  max-width      : 520px;
  margin         : 0 auto;
}

.elyria-mobile-nav { display: flex; flex-direction: column; flex: 1; }

.elyria-mob-link {
  display        : flex;
  align-items    : center;
  justify-content: space-between;
  padding        : 18px 4px;
  color          : #1a1a2e;
  font-size      : clamp(20px, 5vw, 28px);
  font-weight    : 700;
  text-decoration: none;
  border-bottom  : 1px solid rgba(0,0,0,0.065);
  letter-spacing : -0.03em;
  font-family    : "Cabinet Grotesk", sans-serif;
  transition     : color 0.18s ease, padding-left 0.22s cubic-bezier(0.22,1,0.36,1);
}
.elyria-mob-link:first-child { border-top: 1px solid rgba(0,0,0,0.065); }
.elyria-mob-link:hover        { color: #0F172A; padding-left: 10px; }

.elyria-mlink-arr {
  font-size : 16px;
  color     : rgba(0,0,0,0.24);
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1);
}
.elyria-mob-link:hover .elyria-mlink-arr { transform: translateX(5px); }

/* Accordéon */
.elyria-mob-acc { border-bottom: 1px solid rgba(0,0,0,0.065); }
.elyria-mob-acc:first-of-type { border-top: 1px solid rgba(0,0,0,0.065); }

.elyria-mob-acc-btn {
  display        : flex;
  align-items    : center;
  justify-content: space-between;
  width          : 100%;
  padding        : 18px 4px;
  background     : none;
  border         : none;
  cursor         : pointer;
  text-align     : left;
  font-size      : clamp(20px, 5vw, 28px);
  font-weight    : 700;
  color          : #1a1a2e;
  letter-spacing : -0.03em;
  font-family    : "Cabinet Grotesk", sans-serif;
  transition     : color 0.18s ease, padding-left 0.22s cubic-bezier(0.22,1,0.36,1);
}
.elyria-mob-acc-btn:hover,
.elyria-mob-acc.is-open .elyria-mob-acc-btn { color: #0F172A; }
.elyria-mob-acc.is-open .elyria-mob-acc-btn { padding-left: 10px; }

.elyria-mob-acc-caret {
  color     : rgba(0,0,0,0.30);
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
}
.elyria-mob-acc.is-open .elyria-mob-acc-caret { transform: rotate(180deg); }

.elyria-mob-acc-body {
  max-height: 0;
  overflow  : hidden;
  transition: max-height 0.36s cubic-bezier(0.22,1,0.36,1);
}
.elyria-mob-acc.is-open .elyria-mob-acc-body { max-height: 380px; }

.elyria-mob-sub {
  display        : block;
  padding        : 11px 14px;
  font-size      : 14.5px;
  font-weight    : 500;
  color          : #4a5060;
  text-decoration: none;
  border-radius  : 9px;
  margin-bottom  : 2px;
  transition     : background 0.16s ease, color 0.16s ease, padding-left 0.20s cubic-bezier(0.22,1,0.36,1);
}
.elyria-mob-sub:hover { background: rgba(0,0,0,0.04); color: #111; padding-left: 20px; }

/* CTAs mobile */
.elyria-mobile-ctas {
  display       : flex;
  flex-direction: column;
  gap           : 10px;
  margin-top    : 36px;
}
.elyria-mobile-cta {
  display        : flex;
  align-items    : center;
  justify-content: center;
  min-height     : 56px;
  border-radius  : 14px;
  font-size      : 15.5px;
  font-weight    : 700;
  text-decoration: none;
  letter-spacing : -0.01em;
  transition     : all 0.22s cubic-bezier(0.22,1,0.36,1);
}
.elyria-mobile-cta--ghost {
  color     : #4a5060;
  background: transparent;
  border    : 1px solid rgba(0,0,0,0.11);
}
.elyria-mobile-cta--ghost:hover { background: rgba(0,0,0,0.038); color: #111; }
.elyria-mobile-cta--primary {
  color     : #fff;
  background: #0F172A;
  box-shadow: 0 4px 20px rgba(0,0,0,0.16);
}
.elyria-mobile-cta--primary:hover {
  background: #1e293b;
  transform : translateY(-1px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.20);
}

.elyria-mobile-foot {
  margin-top    : 32px;
  text-align    : center;
  font-size     : 12px;
  color         : rgba(0,0,0,0.20);
  letter-spacing: 0.10em;
}

/* ── 9. RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .elyria-header     { padding: 14px 16px 0; }
  .elyria-nav-link   { padding: 8px 10px; font-size: 13px; }
}
@media (max-width: 1050px) {
  .elyria-nav-link   { padding: 8px 8px; font-size: 12.5px; }
  .elyria-header-cta { padding: 0 14px; font-size: 13px; }
}
@media (max-width: 940px) {
  .elyria-nav,
  .elyria-header-actions { display: none; }
  .elyria-mobile-toggle  { display: inline-flex; }
  .elyria-header         { padding: 10px 12px 0; }
  .elyria-header__inner  { min-height: 56px; border-radius: 18px; padding: 0 10px 0 14px; }
}
@media (max-width: 480px) {
  .elyria-header     { padding: 8px 8px 0; }
  .elyria-brand-img  { height: 34px; }
}
