/* Le menu du site : le même sur toutes les pages, accueil et visite guidée compris (build.mjs, siteNav).
   Grand écran : les rubriques en ligne. Tablette et téléphone : un bouton « Menu » qui ouvre la liste. */

.sn-btn, .sn-short, .sn-tiny { display: none; }
.sn-btn {
  align-items: center; gap: 8px; flex: none;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .5); color: #fff;
  border-radius: 999px; padding: 8px 14px;
  font: inherit; font-weight: 700; font-size: .9rem; line-height: 1.2;
  cursor: pointer; white-space: nowrap;
}
.sn-btn:hover, .sn-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .2); }
.sn-ic { display: inline-flex; flex-direction: column; gap: 3px; }
.sn-ic i { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.sn-btn[aria-expanded="true"] .sn-ic i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.sn-btn[aria-expanded="true"] .sn-ic i:nth-child(2) { opacity: 0; }
.sn-btn[aria-expanded="true"] .sn-ic i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
/* accueil, écran clair (la Thaïlande) : le bouton passe à l'encre */
.on-light .sn-btn[aria-expanded="false"] { color: #0B1A33; border-color: rgba(11, 26, 51, .45); background: rgba(11, 26, 51, .06); }

.sn-btn:focus-visible, .sn-panel a:focus-visible, .sn-panel button:focus-visible { outline: 3px solid #FFC94D; outline-offset: 2px; }

/* la liste qui s'ouvre sous le bouton */
.sn-panel {
  position: absolute; top: calc(100% + 6px); right: clamp(16px, 6vw, 96px); z-index: 90;
  width: min(340px, calc(100vw - 32px)); padding: 8px;
  background: #0B1A33; color: #fff;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  text-align: left;
}
.sn-panel[hidden] { display: none; }
.sn-panel ul { list-style: none; margin: 0; padding: 0; }
.sn-panel li + li { border-top: 1px solid rgba(255, 255, 255, .12); }
.sn-panel a:not(.sn-panel-cta), .sn-panel button {
  display: block; width: 100%; padding: 14px; border: 0; border-radius: 10px; background: none;
  color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; line-height: 1.3;
  text-align: left; text-decoration: none; cursor: pointer;
}
.sn-panel a:not(.sn-panel-cta):hover, .sn-panel button:hover { background: rgba(255, 255, 255, .1); }
.sn-panel a[aria-current="page"] { color: #FFC94D; }
.sn-panel a[aria-current="page"]::after { content: " · vous êtes ici"; font-weight: 600; font-size: .85rem; color: rgba(255, 255, 255, .8); }
.sn-panel .sn-som { color: #FFC94D; }
.sn-panel li.sn-li-cta { border-top: 0; padding: 8px 4px 4px; }
.sn-panel a.sn-panel-cta { display: flex; justify-content: center; width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 16px; font-size: 1rem; white-space: normal; text-align: center; }

/* grand écran : la même écriture, le même espacement et la même place sur toutes les pages
   (l'en-tête des pages du site prend toute la largeur, comme celui de l'accueil et de la visite guidée) */
.sn .sn-link { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.top .top-in { max-width: none; min-height: 66px; padding-left: clamp(16px, 6vw, 96px); padding-right: clamp(16px, 6vw, 96px); }
.top .brand { gap: 10px; flex: none; }
.top .brand span { font-size: 1.12rem; }
.top .brand img { width: 34px; height: 34px; }
.top .menu.sn { gap: clamp(12px, 2vw, 26px); }
.top .menu .sn-cta { min-height: 38px; padding: 0 16px; font-size: .9rem; white-space: nowrap; }

/* tablette et petit portable : le bouton « Menu » remplace les rubriques en ligne,
   au même seuil sur toutes les pages (l'accueil, avec son bouton Sommaire, n'a pas la place en dessous) */
@media (max-width: 1220px) {
  .sn .sn-link, .sn .sn-wide { display: none; }
  .sn .sn-btn { display: inline-flex; }
  .top .menu.sn { gap: 12px; }
}
/* tablette : la même marge et la même hauteur sur toutes les pages */
@media (max-width: 820px) {
  .top .top-in { min-height: 58px; padding-left: 16px; padding-right: 16px; }
  .sn-panel { right: 16px; }
}

/* petite tablette et grand téléphone : l'en-tête se resserre */
@media (max-width: 600px) {
  .sn-app .sn-long { display: none; }
  .sn-app .sn-short { display: inline; }
  .ci-top { gap: 8px; padding: 10px 16px; }
  .top .top-in { gap: 8px; min-height: 58px; padding-left: 16px; padding-right: 16px; }
  .ci-top .ci-nav, .top .menu.sn { gap: 8px; }
  .ci-top .ci-brand, .top .brand { gap: 7px; flex: none; }
  .ci-top .ci-brand span, .top .brand span { font-size: 1rem; }
  .ci-top .ci-brand img, .top .brand img { width: 30px; height: 30px; }
  .ci-top .ci-btn-sm { padding: 8px 12px; font-size: .84rem; white-space: nowrap; }
  .top .menu .sn-cta { min-height: 36px; padding: 0 12px; font-size: .84rem; }
  .sn-panel { right: 16px; }
}
/* le bouton doré passe au libellé court */
@media (max-width: 520px) {
  .sn .sn-long { display: none; }
  .sn .sn-short { display: inline; }
}

/* téléphone : tout tient sur une seule ligne (l'ancien menu des pages passait sous le logo) */
@media (max-width: 480px) {
  .ci-top { gap: 6px; padding: 8px 12px; }
  .top .top-in { flex-wrap: nowrap; gap: 6px; row-gap: 0; min-height: 48px; padding: 0 12px; }
  .ci-top .ci-nav { gap: 6px; }
  .top .menu.sn { width: auto; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
  .ci-top .ci-brand, .top .brand { gap: 6px; }
  .ci-top .ci-brand span, .top .brand span { font-size: .9rem; }
  .ci-top .ci-brand img, .top .brand img { width: 26px; height: 26px; }
  .ci-top .ci-btn-sm { padding: 7px 10px; font-size: .78rem; }
  .top .menu .sn-cta { min-height: 32px; padding: 0 10px; font-size: .78rem; }
  .sn .sn-btn { padding: 7px 10px; gap: 6px; font-size: .8rem; }
  .sn-panel { left: 12px; right: 12px; width: auto; }
}
/* visite guidée : « S'inscrire » à la place de « Être prévenu » */
@media (max-width: 399px) {
  .sn-app .sn-short { display: none; }
  .sn-app .sn-tiny { display: inline; }
}
@media (max-width: 360px) {
  .ci-top { padding: 8px 10px; }
  .top .top-in { padding: 0 10px; }
}
/* très petits téléphones : l'icône seule (le bouton garde son nom « Menu » pour les lecteurs d'écran) */
@media (max-width: 369px) {
  .sn-app .sn-btn-t { display: none; }
}
@media (max-width: 359px) {
  .sn .sn-btn-t { display: none; }
}
