/* Additions for the WordPress version (language switcher, map, YouTube, Instagram, admin bar).
   The original design lives untouched in style.css. */

/* ---------- Admin bar offset for the sticky header ---------- */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

/* ---------- Active menu item ---------- */
.main-nav a[aria-current="page"] { color: var(--sand); }

/* ---------- Language switcher ---------- */
.lang-switch { position: relative; display: inline-flex; align-items: center; margin-left: 0.35rem; }
.lang-switch-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 36px; padding: 0.3rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
  background: transparent; color: var(--white);
  font: inherit; font-weight: 800; letter-spacing: 0.04em; cursor: pointer;
}
.lang-switch-toggle svg { width: 10px; height: 8px; transition: transform 0.2s ease; }
.lang-switch.is-open .lang-switch-toggle svg { transform: rotate(180deg); }
.lang-switch-toggle:hover, .lang-switch-toggle:focus-visible { border-color: var(--sand); color: var(--sand); outline: none; }
.lang-switch-menu {
  position: absolute; top: calc(100% + 0.5rem); right: 0; z-index: 30;
  display: none; min-width: 170px; margin: 0; padding: 0.4rem; list-style: none;
  border-radius: 8px; background: var(--white); box-shadow: var(--shadow);
  text-transform: none; letter-spacing: 0;
}
.lang-switch.is-open .lang-switch-menu { display: block; }
.lang-switch .lang-switch-menu a {
  display: flex; gap: 0.6rem; width: 100%; min-height: 0; padding: 0.5rem 0.7rem;
  border-radius: 6px; color: var(--ink); font-weight: 700; font-size: 0.9rem;
  text-decoration: none; text-transform: none;
}
.lang-switch .lang-switch-menu a { align-items: center; }
.lang-flag {
  flex: none; width: 21px; height: 14px; border-radius: 2px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}
/* Corsican flag: white field with the Moor's head, kept whole */
.lang-flag-co { object-fit: contain; background: #fff; }
.lang-switch .lang-switch-menu a:hover, .lang-switch .lang-switch-menu a[aria-current="true"] { background: var(--sand); color: var(--deep); }

/* Large screens: the switcher sits in the menu. Below 1060px the menu folds into ☰,
   so a copy stays visible in the header bar, next to the ☰ button. */
.lang-switch--bar { display: none; }
@media (max-width: 1060px) {
  .main-nav .lang-switch { display: none; }
  .lang-switch--bar {
    display: inline-flex; grid-column: 2; grid-row: 1; justify-self: end;
    margin: 0;
  }
  .lang-switch--bar .lang-switch-menu { top: calc(100% + 0.5rem); right: 0; }
}
@media (max-width: 680px) {
  .lang-switch--bar .lang-switch-toggle { min-height: 38px; padding: 0.25rem 0.6rem; }
}

/* ---------- Partners: scrolling band (home) ---------- */
.partners-strip.asn-partners-band {
  display: block; overflow: hidden; position: relative; min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.asn-partners-track {
  display: flex; gap: 0.75rem; width: max-content; padding: 0.4rem 0 1.6rem;
  animation: asn-partners-scroll var(--asn-band-duration, 60s) linear infinite;
}
.asn-partners-band .partner-mini-card { width: 168px; flex: none; }
.asn-partners-band:hover .asn-partners-track,
.asn-partners-band:focus-within .asn-partners-track { animation-play-state: paused; }
@keyframes asn-partners-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 0.375rem)); }
}
@media (prefers-reduced-motion: reduce) {
  .asn-partners-track { animation: none; }
  .partners-strip.asn-partners-band { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 640px) {
  .asn-partners-band .partner-mini-card { width: 150px; }
}

/* ---------- Medical box (diving fiches) ---------- */
.quick-facts li.asn-medical {
  display: block;
  border: 2px solid var(--coral); border-left-width: 6px;
  background: #fff4ee;
  scroll-margin-top: 110px; /* sticky header */
}
.quick-facts li.asn-medical .asn-medical-title {
  display: flex; align-items: center; gap: 0.45rem;
  color: var(--coral); font-weight: 900; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.82rem;
}
.asn-medical-title svg, .asn-medical-hero svg { width: 16px; height: 16px; flex: none; }
.quick-facts li.asn-medical p { margin: 0.5rem 0 0; }
.asn-medical-btn {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.75rem;
  padding: 0.6rem 0.9rem; border-radius: 6px;
  background: var(--coral); color: var(--white) !important;
  font-weight: 800; font-size: 0.9rem; line-height: 1.25; text-decoration: none;
}
.asn-medical-btn:hover, .asn-medical-btn:focus-visible { background: var(--deep); outline: none; }
.asn-medical-hero { margin: 0.9rem 0 0; }
.asn-medical-hero a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.8rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.95); color: var(--coral);
  font-weight: 800; font-size: 0.9rem; text-decoration: none;
}
.asn-medical-hero a:hover { background: var(--white); color: var(--deep); }
/* Mandatory certificate: stronger */
.quick-facts li.asn-medical-required { background: var(--coral); border-color: var(--coral); color: var(--white); }
.quick-facts li.asn-medical-required .asn-medical-title { color: var(--white); font-size: 0.95rem; }
.quick-facts li.asn-medical-required .asn-medical-btn { background: var(--white); color: var(--coral) !important; }
.quick-facts li.asn-medical-required .asn-medical-btn:hover { background: var(--deep); color: var(--white) !important; }
.asn-medical-hero-required a { background: var(--coral); color: var(--white); }
.asn-medical-hero-required a:hover { background: var(--white); color: var(--coral); }

/* ---------- Footer: payment methods ---------- */
.footer-payments { margin-top: 1.1rem; text-align: center; }
.footer-payments p { margin: 0 0 0.5rem; font-weight: 800; font-size: 0.85rem; }
.footer-payments ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.footer-payments li {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.6rem; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 6px;
  font-size: 0.78rem; font-weight: 700; line-height: 1.2;
}
.footer-payments svg { width: 18px; height: 18px; flex: none; }
.asn-pay-brands { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.15rem; }
.asn-visa { padding: 0.05rem 0.3rem; border-radius: 3px; background: #fff; color: #1a1f71; font-style: italic; font-weight: 900; font-size: 0.7rem; letter-spacing: 0.02em; }
.asn-mc { display: inline-flex; padding: 0.15rem 0.25rem; border-radius: 3px; background: #fff; }
.asn-mc i { width: 10px; height: 10px; border-radius: 50%; background: #eb001b; }
.asn-mc i + i { margin-left: -4px; background: #f79e1b; mix-blend-mode: multiply; }

/* ---------- Footer "manage cookies" link ---------- */
.footer-cookie-link {
  padding: 0; border: 0; background: none; color: var(--white);
  font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer;
}
.footer-legal a + .footer-cookie-link::before {
  content: "-"; display: inline-block; margin-right: 0.5rem; color: rgba(255, 255, 255, 0.75); text-decoration: none;
}
@media (max-width: 680px) { .footer-legal a + .footer-cookie-link::before { content: none; } }

/* ---------- External content placeholders ---------- */
.asn-external { position: relative; }
.asn-external iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Map ---------- */
.asn-map { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; background: var(--white); }
.asn-map-tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 1rem; background: var(--white); border-bottom: 1px solid rgba(18, 51, 66, 0.1); }
.asn-map-tab {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.35rem 1rem 0.35rem 0.35rem;
  border: 2px solid transparent; border-radius: 999px; background: #f2f5f3;
  color: var(--ink); font: inherit; font-weight: 800; cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.asn-map-tab .leaflet-asn-pin { width: 34px; height: 34px; border-width: 2px; box-shadow: none; }
.asn-map-tab .leaflet-asn-pin img { width: 17px; height: 17px; }
.asn-map-tab:hover { background: var(--sand); }
.asn-map-tab.is-active { border-color: var(--deep); background: var(--white); }
.asn-map-frame { min-height: 520px; background: #cfe7e9; }
.asn-map-frame iframe { min-height: 520px; }
.asn-map-placeholder {
  display: grid; place-content: center; justify-items: center; gap: 1rem;
  min-height: 520px; padding: 2rem; text-align: center;
  background: linear-gradient(135deg, #dcefee, #e9f0eb);
}
.asn-map-placeholder img { width: min(260px, 60%); opacity: 0.9; }
.asn-map-placeholder p { max-width: 420px; margin: 0; font-weight: 700; }
.asn-map-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 1rem; background: var(--white);
}
.asn-map-footer p { margin: 0; font-weight: 800; }
.asn-map-footer .button-secondary { color: var(--deep); border-color: var(--deep); }
@media (max-width: 680px) {
  .asn-map-frame, .asn-map-frame iframe, .asn-map-placeholder { min-height: 340px; }
  .asn-map-tab { flex: 1 1 100%; }
}

/* ---------- YouTube ---------- */
.asn-youtube-player { aspect-ratio: 16 / 9; background: #061f2a; }
.asn-youtube-player iframe { aspect-ratio: 16 / 9; }
.asn-youtube-facade { position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0; background: #061f2a; cursor: pointer; }
.asn-youtube-facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; transition: opacity 0.2s ease, transform 0.4s ease; }
.asn-youtube-facade:hover img { opacity: 1; transform: scale(1.02); }
.asn-youtube-play { position: absolute; left: 50%; top: 50%; width: 72px; transform: translate(-50%, -50%); filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35)); }
.asn-youtube-play svg { display: block; width: 100%; }
.asn-youtube-list {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 1fr); gap: 0.5rem;
  margin: 0; padding: 0.6rem; list-style: none; overflow-x: auto; background: #061f2a;
}
.asn-youtube-list button {
  display: grid; gap: 0.35rem; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 6px;
  background: transparent; color: rgba(255, 255, 255, 0.85); font: inherit; font-size: 0.78rem; text-align: left; cursor: pointer; overflow: hidden;
}
.asn-youtube-list button.is-active { border-color: var(--sun); }
.asn-youtube-list img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.asn-youtube-list span { padding: 0 0.35rem 0.35rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Instagram ---------- */
.asn-instagram-tile, .asn-instagram-placeholder { position: relative; display: block; overflow: hidden; border-radius: 8px; }
.asn-instagram-tile img, .asn-instagram-placeholder img { transition: transform 0.5s ease; }
.asn-instagram-tile:hover img, .asn-instagram-placeholder:hover img { transform: scale(1.05); }
.asn-instagram-tile::after, .asn-instagram-placeholder::after {
  content: ""; position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(180deg, transparent 55%, rgba(12, 47, 61, 0.55));
  pointer-events: none;
}
.asn-instagram-badge {
  position: absolute; right: 0.8rem; bottom: 0.8rem; z-index: 1;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #fff;
}
.asn-instagram-badge svg { width: 22px; height: 22px; }
.asn-instagram-post.is-loaded { overflow: hidden; border-radius: 8px; background: var(--white); }
.asn-instagram-post .instagram-media { min-width: 0 !important; max-width: 100% !important; width: 100% !important; margin: 0 !important; border-radius: 8px !important; }

/* ---------- Tarifs note ---------- */
.tariff-note { margin: 0.6rem 0 0; font-size: 0.85rem; opacity: 0.8; }
