/* ==========================================================================
   Design system — MENU DU SITE : icônes qui s'animent au survol, panneaux plus vivants,
   alignement mobile, ancres (scroll), drapeaux des menus de pays, bascule Liste / Calendrier.
   ========================================================================== */

/* les ancres (#equipe…) ne passent plus sous l'en-tête collant */
html{scroll-padding-top:150px}
@media (max-width:900px){html{scroll-padding-top:90px}}

/* ---------- Rangée de menus : l'icône s'anime et devient orange au survol ---------- */
html body .ca-hdr.ca-hdr--c .hc-li .hc-ic{transition:color .2s ease,transform .25s ease;transform-origin:50% 60%}
html body .ca-hdr.ca-hdr--c .hc-li:hover>a .hc-ic:first-child,
html body .ca-hdr.ca-hdr--c .hc-li:hover>button .hc-ic:first-child,
html body .ca-hdr.ca-hdr--c .hc-li.is-open>button .hc-ic:first-child{color:#ec9521}
html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--home{animation:hc-saut .6s ease}
html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--news{animation:hc-froisse .7s ease}
html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--build{animation:hc-balance 1s ease-in-out;transform-origin:50% 100%}
html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--pin{animation:hc-saut .7s ease}
html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--wheel{animation:hc-tourne 1.2s cubic-bezier(.3,.1,.3,1);transform-origin:50% 42%}
html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--info{animation:hc-pouls .7s ease}
html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--users,html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--user{animation:hc-pouls .7s ease}
@keyframes hc-saut{0%,100%{transform:translateY(0)}35%{transform:translateY(-5px)}60%{transform:translateY(0)}78%{transform:translateY(-2px)}}
@keyframes hc-froisse{0%,100%{transform:rotate(0)}25%{transform:rotate(-10deg)}50%{transform:rotate(8deg)}75%{transform:rotate(-4deg)}}
@keyframes hc-balance{0%,100%{transform:rotate(0)}30%{transform:rotate(-9deg)}65%{transform:rotate(7deg)}}
@keyframes hc-tourne{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
@keyframes hc-pouls{0%,100%{transform:scale(1)}40%{transform:scale(1.28)}}

/* ---------- Panneaux : ligne qui glisse, pastille d'icône qui s'illumine, flèche qui apparaît ---------- */
body .hc-pn .hc-it{position:relative;transition:background .2s ease,transform .2s ease}
body .hc-pn .hc-it:hover,body .hc-pn .hc-it:focus-visible{transform:translateX(3px)}
html body .hc-it__i{transition:background .25s ease,color .25s ease,transform .3s cubic-bezier(.2,1.5,.4,1),box-shadow .25s ease}
html body .hc-it:hover .hc-it__i,html body .hc-it:focus-visible .hc-it__i{background:linear-gradient(135deg,#1E5FB4,#0B3C91);color:#fff;transform:scale(1.1) rotate(-7deg);box-shadow:0 8px 16px rgba(11,60,145,.32)}
.hc-it__i svg{transition:transform .3s ease}
.hc-it:hover .hc-it__i svg{transform:scale(1.12)}
body .hc-pn .hc-it::after{content:"→";position:absolute;right:14px;top:50%;margin-top:-.65em;font:700 18px/1.3 'Barlow',sans-serif;color:#124A9E;opacity:0;transform:translateX(-8px);transition:opacity .2s ease,transform .25s ease}
body .hc-pn .hc-it:hover::after,body .hc-pn .hc-it:focus-visible::after{opacity:1;transform:none}
/* teintes de repos : une couleur par famille d'icônes (bleu : actus, orange : temps, vert : lieux) */
.hc-it[data-ic="recap"] .hc-it__i,.hc-it[data-ic="sun"] .hc-it__i,.hc-it[data-ic="spark"] .hc-it__i,.hc-it[data-ic="cal"] .hc-it__i{background:#FFF1DC;color:#C26A0A}
.hc-it[data-ic="map"] .hc-it__i,.hc-it[data-ic="pin"] .hc-it__i,.hc-it[data-ic="route"] .hc-it__i{background:#E4F6EC;color:#1E8A55}

/* ---------- Mobile : tous les éléments du menu alignés pareil ---------- */
@media (max-width:900px){
  html body .ca-hdr.ca-hdr--c .hc-li>a,html body .ca-hdr.ca-hdr--c .hc-li>button{padding:0 14px !important;justify-content:flex-start !important}
  html body .ca-hdr.ca-hdr--c .hc-li>button .hc-ic:last-child{margin-left:auto}
}

/* ---------- Menus déroulants de pays : drapeau devant le nom ---------- */
.ca-sel__btn .ca-sel__fl{flex:0 0 auto}

/* ---------- Page Projets : bascule Liste / Calendrier avec icônes ---------- */
html body:not(#_) .ca-pv__bascule button{display:inline-flex;align-items:center;gap:8px}
html body:not(#_) .ca-pv__bascule .ca-pv__ico{flex:none;transition:transform .25s ease}
html body:not(#_) .ca-pv__bascule button:hover .ca-pv__ico{transform:scale(1.12) rotate(-6deg)}

/* ---------- Accueil : compteurs cliquables ---------- */
.ca-h3__chiffres .ca-h3__stat{position:relative;cursor:pointer;transition:transform .2s ease,background .2s ease,border-color .2s ease;user-select:none}
.ca-h3__chiffres .ca-h3__stat:hover{transform:translateY(-3px)}
.ca-h3__chiffres .ca-h3__stat:active{transform:scale(.96)}
.ca-h3__chiffres .ca-h3__stat:focus-visible{outline:3px solid #ec9521;outline-offset:3px}

/* Le réglage « réduire les animations » de certains postes coupait déjà tout l'en-tête : on garde ici les petites animations d'icônes voulues */
@media (prefers-reduced-motion:reduce){
  html body .ca-hdr.ca-hdr--c .hc-li .hc-ic{transition:color .2s ease,transform .25s ease !important}
  html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--home,html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--pin{animation:hc-saut .65s ease !important}
  html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--news{animation:hc-froisse .7s ease !important}
  html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--build{animation:hc-balance 1s ease-in-out !important}
  html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--wheel{animation:hc-tourne 1.2s cubic-bezier(.3,.1,.3,1) !important}
  html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--info,html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--users,html body .ca-hdr.ca-hdr--c .hc-li:hover .hc-ic--user{animation:hc-pouls .7s ease !important}
  body .hc-pn .hc-it,html body .hc-it__i,.hc-it__i svg,body .hc-pn .hc-it::after{transition-duration:.25s !important}
}

/* l'ouverture d'un menu retournait toutes les icônes du bouton : seule la flèche pivote */
html body .ca-hdr.ca-hdr--c .hc-li.is-open>button .hc-ic:not(:last-child),
html body .ca-hdr__mega-item.is-open>.ca-hdr__nav-btn svg:not(:last-child){transform:none}
/* le panneau « À propos » s'ouvre vers la droite comme les autres, sauf sur les écrans étroits où il risquerait de dépasser */
@media (min-width:1101px){html body .hc-nav>.hc-li:nth-last-child(1) .hc-pn{left:0;right:auto}}

/* page Parcs : la recherche ne colle plus au bas du bandeau bleu */
html body .ca-ph .pa-barre{margin-top:22px;margin-bottom:30px}
html body .ca-ph--bande{padding-bottom:6px}
