/* En-tête commun à toutes les pages, transitions entre pages et panneau « ajouté à ma sélection ».
   Source : refonte/entete.css, copié dans css/entete.css à chaque construction du site. */
.barre{position:sticky;top:12px;z-index:40;margin:12px 12px 0;font-family:"Atkinson Hyperlegible",system-ui,sans-serif;font-size:1rem;line-height:1.3;view-transition-name:barre}
.barre--flottante{position:fixed;left:12px;right:12px;margin:0}
.barre-in{max-width:1152px;margin:0 auto;display:flex;align-items:center;gap:10px;padding:8px 8px 8px 14px;border-radius:999px;background:rgba(255,255,255,.82);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border:1px solid rgba(29,52,69,.10);box-shadow:0 10px 30px -14px rgba(29,52,69,.25)}
.barre-marque{display:flex;align-items:center;gap:10px;margin-right:auto;min-width:0;overflow:hidden;color:#1D3445;text-decoration:none}
.barre-marque img{width:44px;height:auto;flex:none}
.barre-marque strong{display:block;font-size:1rem;white-space:nowrap}
.barre-marque small{display:block;font-size:.875rem;color:#4A5861;white-space:nowrap}
.barre-menu{display:none;align-items:center;gap:2px}
.barre-menu a,.barre-mobile a{color:#1D3445;text-decoration:none;padding:9px 14px;border-radius:999px;white-space:nowrap}
.barre-menu a:hover,.barre-mobile a:hover{background:rgba(29,52,69,.10);color:#1D3445}
.barre-menu a[aria-current=page],.barre-mobile a[aria-current=page]{background:#1D3445;color:#fff}
.barre-selection{display:inline-flex;align-items:center;gap:6px;flex:none;background:#F2C14E;color:#17232B;font-weight:700;text-decoration:none;padding:10px 16px;border-radius:999px;white-space:nowrap;min-height:44px;transition:background-color .2s}
.barre-selection:hover{background:#f6cf6c;color:#17232B}
.barre-selection .court{display:none}
.barre-compte{display:inline-block;min-width:1.6em;text-align:center;background:#1D3445;color:#fff;border-radius:999px;padding:0 .4em;font-size:.9em}
.barre-tel{display:none;align-items:center;gap:8px;flex:none;background:#1D3445;color:#fff;font-weight:700;text-decoration:none;padding:10px 16px;border-radius:999px;white-space:nowrap;min-height:44px;transition:background-color .2s}
.barre-tel:hover{background:#1F4F47;color:#fff}
.barre-burger{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:999px;background:none;color:#1D3445;cursor:pointer;padding:0}
.barre-burger:hover{background:rgba(29,52,69,.10)}
.barre-mobile{max-width:1152px;margin:8px auto 0;padding:10px;border-radius:24px;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border:1px solid rgba(29,52,69,.10);box-shadow:0 18px 40px -18px rgba(29,52,69,.35);display:grid;gap:2px}
.barre-mobile a{border-radius:16px;padding:13px 16px;white-space:normal}
.barre-mobile[hidden]{display:none}
.barre :focus-visible{outline:3px solid #F2C14E;outline-offset:3px}
@media (min-width:1024px){.barre-menu{display:flex}.barre-burger{display:none}.barre-mobile{display:none!important}}
@media (min-width:1180px){.barre-tel{display:inline-flex}}
@media (max-width:480px){
  .barre-in{gap:6px;padding-left:10px}
  .barre-marque{gap:8px}.barre-marque img{width:34px}.barre-marque strong{font-size:.95rem}.barre-marque small{display:none}
  .barre-selection{padding:10px 12px}.barre-selection .long{display:none}.barre-selection .court{display:inline}
}
/* Le compteur « Ma sélection » sursaute quand on ajoute un article */
@keyframes saute{0%{transform:scale(1)}40%{transform:scale(1.55)}100%{transform:scale(1)}}
.barre-compte.saute{animation:saute .45s ease-out}
/* Panneau qui confirme l'ajout */
@keyframes ajout-entre{from{opacity:0;transform:translateY(14px)}}
.ajout{position:fixed;right:16px;bottom:16px;z-index:45;width:min(360px,calc(100vw - 32px));display:flex;gap:12px;align-items:center;background:#fff;color:#17232B;border:1px solid rgba(29,52,69,.12);border-radius:22px;padding:12px;box-shadow:0 22px 50px -18px rgba(29,52,69,.45);font-family:"Atkinson Hyperlegible",system-ui,sans-serif;font-size:1rem;line-height:1.3;animation:ajout-entre .3s ease-out}
.ajout img{width:64px;height:64px;object-fit:contain;border-radius:14px;background:#FBF7EF;flex:none}
.ajout-texte{min-width:0;flex:1}
.ajout-titre{display:flex;align-items:center;gap:6px;font-weight:700;color:#1F4F47;margin:0 0 2px}
.ajout-nom{margin:0 0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ajout a{color:#1D3445;font-weight:700;text-underline-offset:3px}
.ajout-fermer{flex:none;align-self:flex-start;width:32px;height:32px;border:0;border-radius:50%;background:none;color:#4A5861;font-size:1.3rem;line-height:1;cursor:pointer}
.ajout-fermer:hover{background:rgba(29,52,69,.10)}
@media (max-width:1023px){.ajout{left:16px;right:16px;width:auto;bottom:84px}}
/* Passage en douceur d'une page à l'autre (navigateurs récents) */
@view-transition{navigation:auto}
@keyframes page-sort{to{opacity:0}}
@keyframes page-entre{from{opacity:0;transform:translateY(10px)}}
::view-transition-old(root){animation:.16s ease-in both page-sort}
::view-transition-new(root){animation:.3s ease-out both page-entre}
@media (prefers-reduced-motion:reduce){
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
  .barre-compte.saute,.ajout{animation:none}
}
