/* ===== Header base ===== */

.header {
  width: 100%;
  position: relative; /* pour ancrer le fatmenu sous le header */
  z-index: 100;
}

.header .wp-block-list li, .header li {
  margin-bottom: 0;
}

/* Barre top */
.header__bar {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* gauche / logo / droite */
  align-items: center;
  padding: 18px 24px;
  background: #fff;
  /*border-bottom: 1px solid var(--color-blanc);*/
  position:relative;
  z-index:100;
}

/* TACHE (remplace header__bar::after) */
.header__barBlob {
  position: absolute;
  width: 100px;
  height: 100px;
  top: -55px;
  right: -55px;
  opacity: 1;
  pointer-events: none;
  z-index: 0;

  background: radial-gradient(

    circle,

    var(--page-accent) 0%,

    rgba(0, 0, 0, 0) 65%

  );

  filter: blur(18px);


  transition: top 100ms ease, right 100ms ease, opacity 100ms ease;
}

/* Assure que le contenu du header passe au-dessus de la tache */
.header__bar > *:not(.header__barBlob) {
  position: relative;
  z-index: 1;
}

/* Colonne gauche / droite */
.header__nav--left {
  justify-self: start;
}

.header__right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo centré */
.header__logo {
  justify-self: center;
  display: flex;
  align-items: center;
  line-height: 0;
}

.header__logo img {
  display: block;
  height: auto;
  max-width: 100%;
}

/* ===== Menus ===== */
.header__nav ul {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Liens (design system ETAPLAB) */
.header a {
  font-size: var(--font-size-s);
  color: var( --color-noir);
  transition: all 0.4s ease;
  text-decoration: none;
  white-space: nowrap;
}

/* Hover + accessibilité */
.header a:hover,
.header a:focus-visible {
  color: var(--page-accent);
}

/* Évite que le logo hérite de l'opacité */
.header__logo a {
  opacity: 1;
  transition: none;
}

/* WPML (tu peux ajuster selon le markup exact du shortcode) */
.header__lang {
  display: flex;
  align-items: center;
}

/* ===== Fat menu (dropdown aligné sur le trigger) ===== */
.fatmenu {
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;

  /* largeur du panneau (pas full width) */
  width: 75%;
  background: #fff;
  z-index: 90;

  /* état fermé (animatable) */
  opacity: 0;
  transform: translateX(10px);
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0s linear 0.4s;
}

/* ===== Colonne catégories (pictos + flèches) ===== */
.fatmenu__cats {
  gap: 14px; /* un peu plus d’air que les listes normales */
}

.fatmenu__catLink {
   display: flex;
  align-items: center;
  gap: 8px;
  opacity: 1; /* on ne veut pas le 0.6 générique ici */
  text-decoration: none;
  color: var(--color-noir);
}

.fatmenu__icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: all 0.4s ease;
}

.fatmenu__icon img {
  display: block;
}

.fatmenu__label {
  font-size: var(--font-size-s);
  color: var(--color-noir);
  display: inline;
  transition: all 0.4s ease;
}

.fatmenu__arrow {
  font-size: var(--font-size-s);
  transition: all 0.4s ease;
}





/* ===== Couleurs par catégorie (variables du general.scss) ===== */
/* Dermatologie = rose */
.fatmenu__cat--derm .fatmenu__icon { background: rgba(236, 96, 126, 0.10); }
.fatmenu__cat--derm .fatmenu__arrow { color: var(--color-rose); }
.fatmenu__cat--derm:hover .fatmenu__icon { background: rgba(236, 96, 126, 0.20); }
.fatmenu__cat--derm:hover .fatmenu__label { color: var(--color-rose) }

/* Neurologie = vert */
.fatmenu__cat--neuro .fatmenu__icon { background: rgba(116, 186, 94, 0.10); }
.fatmenu__cat--neuro .fatmenu__arrow { color: var(--color-vert); }
.fatmenu__cat--neuro:hover .fatmenu__icon { background: rgba(116, 186, 94, 0.20); }
.fatmenu__cat--neuro:hover .fatmenu__label { color: var(--color-vert) }

/* Cardiovasculaire = orange */
.fatmenu__cat--cardio .fatmenu__icon { background: rgba(242, 146, 50, 0.10); }
.fatmenu__cat--cardio .fatmenu__arrow { color: var(--color-orange); }
.fatmenu__cat--cardio:hover .fatmenu__icon { background: rgba(242, 146, 50, 0.20); }
.fatmenu__cat--cardio:hover .fatmenu__label { color: var(--color-orange) }

/* Neurovasculaire = bleu clair */
.fatmenu__cat--neurovasc .fatmenu__icon { background: rgba(71, 127, 193, 0.10); }
.fatmenu__cat--neurovasc .fatmenu__arrow { color: var(--color-bleu-clair); }
.fatmenu__cat--carneurovascdio:hover .fatmenu__icon { background: rgba(71, 127, 193, 0.20); }
.fatmenu__cat--neurovasc:hover .fatmenu__label { color: var(--color-bleu-clair) }



/* état ouvert */
.fatmenu.is-open {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;

  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0s linear 0s;
}

.fatmenu__inner {
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}

.fatmenu__col strong {
  display: block;
  margin-bottom: 10px;
}

.fatmenu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.fatmenu a {
  opacity: 1;
  text-decoration: none;
}

.fatmenu a:hover .fatmenu__arrow {
  margin-left:5px;
}

/* ===== Overlay animé ===== */
.fatmenu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 80;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.4s ease,
    visibility 0s linear 0.4s;
}

.fatmenu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition:
    opacity 0.4s ease,
    visibility 0s linear 0s;
}

/* Optionnel : lock scroll quand ouvert */
body.is-fatmenu-open {
  overflow: hidden;
}

/* =========================
   MOBILE MENU (AJOUT)
   ========================= */

/* Burger caché par défaut (desktop) */
.header__burger {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin-left: 12px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
}

/* Icon burger -> croix */
.header__burgerIcon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  background: var(--color-noir);
  transform: translate(-50%, -50%);
  transition: background 0.3s ease;
}

.header__burgerIcon::before,
.header__burgerIcon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--color-noir);
  transition: transform 0.3s ease, top 0.3s ease;
}

.header__burgerIcon::before { top: -7px; }
.header__burgerIcon::after  { top:  7px; }

/* état ouvert = croix */
.header__burger.is-open .header__burgerIcon {
  background: transparent;
}
.header__burger.is-open .header__burgerIcon::before {
  top: 0;
  transform: rotate(45deg);
}
.header__burger.is-open .header__burgerIcon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Overlay mobile (séparé du fatmenu desktop) */
.mobilemenu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 85;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.mobilemenu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease, visibility 0s linear 0s;
}

/* Drawer mobile */
.mobilemenu {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.mobilemenu__panel {
  position: absolute;
  inset: 0;                 /* full width + full height */
  width: 100%;
  height: 100%;
  background: var(--color-blanc-fonce);
  padding: 90px 18px 24px;

  transform: translateX(100%);  /* slide-in depuis la droite */
  transition: transform 0.35s ease;
  pointer-events: auto;

  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobilemenu.is-open .mobilemenu__panel {
  transform: translateX(0);
}

.mobilemenu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.mobilemenu__item { margin: 0; }

.mobilemenu__link {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  font-size: var(--font-size-l)!important; /* <-- L */
  color: var(--color-noir);
  opacity: 1;
  text-decoration: none;

  padding: 10px 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.mobilemenu__link:hover,
.mobilemenu__link:focus-visible {
  color: var(--page-accent);
}

/* Flèche noire à côté de Services CRO */
.mobilemenu__arrow {
  color: var(--color-noir);
  opacity: 1;
  font-size: var(--font-size-l); /* <-- L */
}

/* Lang en bas du drawer */
.mobilemenu__lang {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* Sous-menu par dessus (niveau 2) */
.mobilesubmenu {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
}

.mobilesubmenu__panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--color-blanc-fonce);
  padding: 90px 18px 24px;

  transform: translateX(100%);  /* slide-in depuis la droite */
  transition: transform 0.3s ease;
  pointer-events: auto;
  overflow: auto;
}

.mobilesubmenu.is-open .mobilesubmenu__panel {
  transform: translateX(0);
}

.mobilesubmenu__back {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: var(--font-size-s);
  color: var(--color-noir);
  opacity: 0.7;
  padding: 6px 0 12px;
}

.mobilesubmenu__accordions {
  display: grid;
  gap: 14px;
}

/* Accordéons */
.mobilesubmenu__acc {
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.mobilesubmenu__title {
  list-style: none;
  cursor: pointer;

  padding: 14px 0;
  font-weight: 500;
  font-size: var(--font-size-l); /* titre en L (cohérent avec ton besoin "liens") */
  background: transparent;       /* <-- pas de fond */

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobilesubmenu__acc summary::-webkit-details-marker {
  display: none;
}

.mobilesubmenu__list {
  list-style: none;
  margin: 0;
  padding: 6px 0 14px;
  display: grid;
  gap: 12px;
}

/* Flèche custom (CSS) */
.mobilesubmenu__title::after {
  content: "\2192";              /* chevron simple */
  display: inline-block;
  transform: rotate(90deg);      /* fermé = vers le bas */
  transition: transform 0.3s ease;
  font-size: var(--font-size-l);
  line-height: 1;
  color: var(--color-noir);
  opacity: 0.7;
}

/* Ouvert = flèche tournée (vers le haut) */
.mobilesubmenu__acc[open] > .mobilesubmenu__title::after {
  transform: rotate(-90deg);
  opacity: 1;
}

/* Liste simple (tech/service) */
.mobilesubmenu__list.simple a {
  opacity: 1;
  color: var(--color-noir);
  text-decoration: none;
  font-size: var(--font-size-l); /* <-- L */
}
.mobilesubmenu__list.simple a:hover,
.mobilesubmenu__list.simple a:focus-visible {
  color: var(--page-accent);
}

/* On réutilise tes styles fatmenu__catLink / icon / label pour garder EXACTEMENT le même look */
.mobilesubmenu .fatmenu__catLink { opacity: 1; }
.mobilesubmenu .fatmenu__label { opacity: 1; }
.mobilesubmenu .fatmenu__arrow { opacity: 1; }

.mobilesubmenu .fatmenu__label {
  font-size: var(--font-size-l); /* <-- L */
}
.mobilesubmenu .fatmenu__arrow {
  font-size: var(--font-size-l); /* <-- L */
}

/* Lock scroll quand menu mobile ouvert */
body.is-mobilemenu-open {
  overflow: hidden;
}

/* =========================
   ANIMATION D'ENTRÉE HEADER
   ========================= */

@keyframes headerNavReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* état initial */
.header__nav ul li {
  opacity: 0;
  transform: translateY(14px);
  animation: headerNavReveal 0.7s ease forwards;
}

/* décalage progressif gauche */
.header__nav--left ul li:nth-child(1) { animation-delay: 0.10s; }
.header__nav--left ul li:nth-child(2) { animation-delay: 0.18s; }
.header__nav--left ul li:nth-child(3) { animation-delay: 0.26s; }

/* décalage progressif droite */
.header__nav--right ul li:nth-child(1) { animation-delay: 0.34s; }
.header__nav--right ul li:nth-child(2) { animation-delay: 0.42s; }
.header__nav--right ul li:nth-child(3) { animation-delay: 0.50s; }
.header__nav--right ul li:nth-child(4) { animation-delay: 0.58s; }
.header__nav--right ul li:nth-child(5) { animation-delay: 0.66s; }

/* option accessibilité */
@media (prefers-reduced-motion: reduce) {
  .header__nav ul li {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* =========================
   ANIMATION DES COLONNES DU FATMENU
   ========================= */

@keyframes fatmenuColumnReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* état initial quand le menu est fermé */
.fatmenu .fatmenu__col {
  opacity: 0;
  transform: translateY(18px);
}

/* animation au moment de l'ouverture */
.fatmenu.is-open .fatmenu__col {
  animation: fatmenuColumnReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fatmenu.is-open .fatmenu__col:nth-child(1) {
  animation-delay: 0.06s;
}

.fatmenu.is-open .fatmenu__col:nth-child(2) {
  animation-delay: 0.14s;
}

.fatmenu.is-open .fatmenu__col:nth-child(3) {
  animation-delay: 0.22s;
}

/* accessibilité */
@media (prefers-reduced-motion: reduce) {
  .fatmenu .fatmenu__col,
  .fatmenu.is-open .fatmenu__col {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* =========================
   RESPONSIVE (NE CASSE PAS DESKTOP)
   ========================= */
@media (max-width: 980px) {

  /* On garde ton header visuellement, mais on cache les navs desktop */
  .header__nav--left,
  .header__right {
    display: none;
  }

  /* On garde logo + burger sur la même ligne */
  .header__bar {
    grid-template-columns: 1fr auto; /* logo + burger */
    align-items: center;
  }

  .header__logo {
    justify-self: start;
  }

  .header__burger {
    display: inline-flex;
    justify-self: end;
    align-items: center;
    justify-content: center;
  }

  /* Ton fatmenu desktop reste tel quel, mais en mobile on le laisse inactif (le trigger desktop est caché) */
}



/* =========================================================
   ACTIVE (même rendu que hover) — AJOUT UNIQUEMENT
========================================================= */

/* Liens header (desktop + mobile links) */
.header a.is-active,
.header a.is-active:hover,
.header a.is-active:focus-visible {
  color: var(--page-accent);
}

/* Bouton Services CRO mobile (c'est un <button>) */
.mobilemenu__link.is-active {
  color: var(--page-accent);
}

/* Catégories expertise : dupliquer le hover en "is-active" */
.fatmenu__cat--derm.is-active .fatmenu__icon { background: rgba(236, 96, 126, 0.20); }
.fatmenu__cat--derm.is-active .fatmenu__label { color: var(--color-rose); }

.fatmenu__cat--neuro.is-active .fatmenu__icon { background: rgba(116, 186, 94, 0.20); }
.fatmenu__cat--neuro.is-active .fatmenu__label { color: var(--color-vert); }

.fatmenu__cat--cardio.is-active .fatmenu__icon { background: rgba(242, 146, 50, 0.20); }
.fatmenu__cat--cardio.is-active .fatmenu__label { color: var(--color-orange); }

.fatmenu__cat--neurovasc.is-active .fatmenu__icon { background: rgba(71, 127, 193, 0.20); }
.fatmenu__cat--neurovasc.is-active .fatmenu__label { color: var(--color-bleu-clair); }
