/* ===========================================================================
   MENU — logo non rogné et navigation déroulante
   La maquette recadrait une image matricielle du logo et n avait que des liens
   simples. Le site utilise le logo vectoriel et ouvre, sous « Nos prestations »
   et « Zone d intervention », un panneau listant les pages réelles.
   =========================================================================== */

/* ------------------------------------------------------------------ logo */
.cps-logo {
  display: block;
  height: clamp(44px, 4.6vw, 62px);
  width: auto;
}
.m-brand { align-items: center; gap: 0; }

/* ------------------------------------------------------------------ navigation */
#navigation { position: relative; }

.cps-groupe { position: relative; display: inline-flex; }

.cps-declencheur {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.cps-declencheur svg {
  width: 13px;
  height: 13px;
  transition: transform 220ms cubic-bezier(0.22, 0.8, 0.28, 1);
}
.cps-groupe[data-ouvert='oui'] .cps-declencheur { color: #0659a7; }
.cps-groupe[data-ouvert='oui'] .cps-declencheur svg { transform: rotate(180deg); }

/* panneau déroulant */
.cps-panneau {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  translate: -50% 0;
  z-index: 60;
  width: max-content;
  max-width: min(94vw, 40rem);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(15rem, 1fr));
  gap: 4px;
  border: 1px solid #e0eaf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(11, 66, 116, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 220ms, transform 220ms, visibility 220ms;
}
/* une zone tampon évite que le panneau se ferme en traversant l espace */
.cps-panneau::before {
  content: '';
  position: absolute;
  inset: -20px 0 auto;
  height: 22px;
}
.cps-groupe[data-ouvert='oui'] .cps-panneau {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.cps-entree {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  text-decoration: none;
  color: #16212e;
  transition: background 180ms, transform 180ms;
}
.cps-entree:hover { background: #f1f6fb; transform: translateX(2px); }
.cps-entree > .cps-entree__icone {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #0659a7, #2f882c);
  color: #fff;
}
.cps-entree__icone svg { width: 20px; height: 20px; }
.cps-entree strong {
  display: block;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.25;
}
.cps-entree > span:last-child > span {
  display: block;
  margin-top: 2px;
  font-size: 0.79rem;
  line-height: 1.45;
  color: #5a6b7d;
}

/* pied du panneau : accès à la page d ensemble */
.cps-panneau__pied {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 12px 12px 4px;
  border-top: 1px solid #edf2f7;
  font-size: 0.83rem;
}
.cps-panneau__pied a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: #0659a7;
  text-decoration: none;
}
.cps-panneau__pied a svg { width: 15px; height: 15px; }
.cps-panneau__pied span { color: #5a6b7d; }

/* pastilles des départements */
.cps-panneau--zones { grid-template-columns: repeat(2, minmax(13rem, 1fr)); }
.cps-entree > .cps-entree__code {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #eef4fb;
  color: #0659a7;
  font-size: 0.8rem;
  font-weight: 700;
}
.cps-entree:hover .cps-entree__code { background: #0659a7; color: #fff; }

/* ------------------------------------------------------------------ téléphone */
@media (max-width: 1000px) {
  .cps-panneau {
    position: static;
    translate: none;
    transform: none;
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
    padding: 6px 0 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms cubic-bezier(0.22, 0.8, 0.28, 1);
  }
  .cps-groupe[data-ouvert='oui'] .cps-panneau { max-height: 40rem; }
  /* #navigation etait en position:relative (specificite d identifiant) : il
     battait le « position:absolute; left:0; right:0 » de la maquette, et le
     panneau ne couvrait que la moitie droite de l ecran. */
  #navigation {
    position: absolute;
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }
  .cps-groupe { display: block; width: 100%; }
  .cps-declencheur { width: 100%; justify-content: space-between; }
  .cps-entree { padding: 10px 6px; }
  /* seule la description disparait : le nom de la prestation doit rester,
     sans quoi le sous-menu n affiche plus qu une colonne d icones muettes */
  .cps-entree > span:not(.cps-entree__icone) { display: block; min-width: 0; }
  .cps-entree > span:not(.cps-entree__icone) > span { display: none; }
  .cps-entree > span strong { font-size: 0.94rem; font-weight: 600; }
  .cps-panneau__pied { padding: 10px 6px 2px; }
  .cps-logo { height: 46px; }
}

/* ---------------------------------------------------------------------------
   Icônes : la maquette applique un remplissage global aux SVG (ses propres
   symboles sont pleins). Les icônes du site sont dessinées au trait : il faut
   donc rétablir explicitement leur mode de tracé.
   --------------------------------------------------------------------------- */
.cps-entree__icone svg {
  /* la maquette impose une couleur aux SVG : on la fixe ici, sinon le trait
     prend le vert de la maquette et disparait sur la pastille degradee */
  width: 20px !important;
  height: 20px !important;
  color: #fff !important;
  fill: none !important;
  stroke: #fff !important;
}
.cps-declencheur svg,
.cps-panneau__pied svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cps-entree__icone svg [fill='currentColor'] {
  fill: currentColor !important;
  stroke: none !important;
}
