/* Components: header, buttons, cards, forms, footer */

/* ---------- Header: full-width blue bar (same effects as support.surfagest.com) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; isolation: isolate;
  color: #fff;
  background: linear-gradient(112deg, #0c56a6 0%, #1a82db 46%, #35a3ee 74%, #1687c6 100%);
  background-size: 220% 220%;
  border-bottom: 1px solid rgb(255 255 255 / 0.18);
  box-shadow: 0 18px 42px -18px rgb(12 86 166 / 0.5), 0 2px 6px rgb(12 86 166 / 0.14), inset 0 1px 0 rgb(255 255 255 / 0.18);
  animation: hx-in 0.4s var(--ease-out) both, hx-flow 11s ease infinite;
}
.site-header.is-scrolled { box-shadow: 0 14px 34px -14px rgb(8 26 43 / 0.55), inset 0 1px 0 rgb(255 255 255 / 0.18); }

/* decorative layer (clipped separately so the dropdown can overflow the header) */
.header-fx { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.header-fx::before { /* light sweep */
  content: ""; position: absolute; top: -90%; left: -42%; width: 34%; height: 280%; transform: rotate(15deg);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.18), transparent);
  animation: hx-sweep 6.5s ease-in-out infinite;
}
.hx-mountain {
  position: absolute; left: -5%; right: -5%; bottom: -46px; height: 78px;
  clip-path: polygon(0 64%, 14% 39%, 29% 66%, 45% 30%, 62% 64%, 77% 40%, 91% 65%, 100% 43%, 100% 100%, 0 100%);
}
.hx-mountain-a { background: rgb(255 255 255 / 0.08); animation: hx-mountain 18s ease-in-out infinite alternate; }
.hx-mountain-b { bottom: -53px; background: rgb(255 255 255 / 0.12); animation: hx-mountain 24s ease-in-out infinite alternate-reverse; }
.hx-bar {
  position: absolute; top: -35%; height: 175%; width: 20px; border-radius: 7px; transform: skewX(-24deg);
  background: linear-gradient(rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.01));
  animation: hx-bar linear infinite;
}
.hx-bar-a { left: 19%; animation-duration: 18s; }
.hx-bar-b { left: 61%; animation-duration: 23s; animation-delay: -8s; }

.header-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 1rem;
  height: var(--header-h); padding-inline: clamp(14px, 1.6vw, 28px);
  transition: height var(--dur) var(--ease-out);
}
.site-header.is-scrolled .header-inner { height: 62px; }

/* Logo: left corner */
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.375rem; line-height: 1; letter-spacing: -0.025em; }
.brand:hover { color: inherit; }
.brand-name { text-shadow: 0 2px 14px rgb(0 0 0 / 0.22); }
.brand-mark {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; overflow: hidden; background: #fff;
  box-shadow: 0 10px 24px -4px rgb(0 0 0 / 0.3), inset 0 1px 0 rgb(255 255 255 / 0.9), 0 0 0 1px rgb(255 255 255 / 0.12);
  transition: transform 0.35s var(--ease-out), filter 0.35s;
}
.site-header .brand-mark { animation: hx-logo-glow 3s ease-in-out infinite; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.site-header:hover .brand-mark, .brand:hover .brand-mark { transform: scale(1.07) rotate(-2deg); filter: brightness(1.05); }
.site-footer .brand { margin-right: 0; }

.nav-toggle { margin-left: auto; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgb(255 255 255 / 0.3); border-radius: 12px; background: rgb(255 255 255 / 0.12); color: #fff; cursor: pointer; transition: background var(--dur-fast); }
.nav-toggle:hover { background: rgb(255 255 255 / 0.22); }
.nav-toggle .icon { transition: transform var(--dur) var(--ease-spring); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; transform: rotate(90deg); }

.nav-link {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border: 0; border-radius: var(--radius-pill); background: none;
  color: rgb(255 255 255 / 0.9); font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-link:hover, .nav-link[aria-current="page"], .has-dropdown.is-active > .nav-link, .has-dropdown.is-open > .nav-link { color: #fff; }
.dropdown-toggle .icon { transition: transform var(--dur) var(--ease-out); }
.has-dropdown.is-open .dropdown-toggle .icon { transform: rotate(180deg); }

/* Espace client */
.nav-account { position: relative; }
.nav-login { display: inline-flex; align-items: center; gap: 0.55rem; color: rgb(255 255 255 / 0.92); font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; transition: color var(--dur-fast); }
.nav-login-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgb(255 255 255 / 0.12); border: 1px solid rgb(255 255 255 / 0.24); transition: background var(--dur), transform var(--dur) var(--ease-spring); }
.nav-login:hover { color: #fff; }
.nav-login:hover .nav-login-icon { background: rgb(255 255 255 / 0.24); transform: scale(1.08); }
.nav-connected { display: none; align-items: center; gap: 0.3rem; color: #d5ffe9; font-size: 0.68rem; font-weight: 700; }
.nav-connected > span { width: 7px; height: 7px; border-radius: 50%; background: #55e39a; box-shadow: 0 0 0 3px rgb(85 227 154 / 0.16); }
.nav-account.is-connected .nav-login { gap: 0.45rem; }
.nav-account.is-connected .nav-connected { display: inline-flex; }
.nav-account-menu { position: absolute; top: calc(100% + 0.55rem); right: 0; z-index: 20; display: none; min-width: 210px; padding: 0.45rem; border: 1px solid rgb(255 255 255 / 0.22); border-radius: 14px; background: #fff; color: var(--color-ink); box-shadow: 0 16px 36px rgb(8 26 43 / 0.24); }
.nav-account.is-connected:is(:hover, :focus-within, .is-menu-open) .nav-account-menu { display: grid; }
.nav-account-email { overflow: hidden; padding: 0.5rem 0.65rem 0.6rem; border-bottom: 1px solid var(--color-line); color: var(--color-muted); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.nav-account-download { padding: 0.65rem; border-radius: 9px; color: var(--color-brand-dark); font-size: 0.88rem; font-weight: 650; text-decoration: none; }
.nav-account-download:hover, .nav-account-download:focus-visible { background: var(--color-brand-soft); color: var(--color-brand-dark); }
.nav-account-logout { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.65rem; border: 0; border-radius: 9px; background: #fff; color: #334155; text-align: left; font: inherit; font-size: 0.88rem; font-weight: 650; cursor: pointer; }
.nav-account-logout:hover, .nav-account-logout:focus-visible { background: #fff1f0; color: #b42318; }
.nav-actions [data-demo-cta][hidden] { display: none; }
.nav-account-caret { display: none; }
.nav-account-caret .icon { width: 14px; height: 14px; }
.nav-account-sep { display: none; }

/* Language: one glass button showing the other language, right corner */
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.4rem; flex-shrink: 0;
  height: 40px; padding: 0 0.95rem 0 0.8rem; border-radius: var(--radius-pill);
  border: 1.5px solid rgb(255 255 255 / 0.28); background: rgb(255 255 255 / 0.12);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16), 0 4px 12px -2px rgb(0 0 0 / 0.12);
  color: #fff; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-decoration: none;
  transition: background var(--dur), color var(--dur), border-color var(--dur), transform var(--dur) var(--ease-out);
}
.lang-switch:hover { color: #1a6fc7; background: #fff; border-color: #fff; transform: scale(1.04); }
.lang-globe { transition: transform 700ms var(--ease-spring); }
.lang-switch:hover .lang-globe { transform: rotate(360deg); }

/* Mobile navigation sheet */
@media (max-width: 1023.98px) {
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 99;
    display: flex; flex-direction: column; gap: 1.5rem;
    padding: 1.25rem var(--gutter) 2rem; overflow-y: auto;
    background: var(--color-dark); color: #fff;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path 450ms var(--ease-out), visibility 0s 450ms;
  }
  .site-nav.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 450ms var(--ease-out); }
  /* The header shrinks to 62px on scroll: the sheet starts right under it (no gap). */
  .site-header.is-scrolled .site-nav { top: 62px; }
  .nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
  .nav-indicator { display: none; }
  .nav-list > li { opacity: 0; transform: translateY(12px); transition: opacity 400ms, transform 400ms var(--ease-out); }
  .site-nav.is-open .nav-list > li { opacity: 1; transform: none; }
  .site-nav.is-open .nav-list > li:nth-child(3) { transition-delay: 60ms; }
  .site-nav.is-open .nav-list > li:nth-child(4) { transition-delay: 120ms; }
  .nav-list .nav-link { width: 100%; justify-content: space-between; padding: 0.9rem 1rem; font-size: 1.15rem; border-radius: var(--radius); }
  .nav-list .nav-link:hover { background: rgb(255 255 255 / 0.08); }
  .dropdown { display: none; padding: 0.25rem 0 0.75rem; }
  .has-dropdown.is-open .dropdown { display: block; }
  .dropdown-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
  .dropdown-grid a { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; color: #fff; text-decoration: none; border-radius: var(--radius-sm); }
  .dropdown-grid a:hover { background: rgb(255 255 255 / 0.08); }
  .dropdown-grid small, .dd-arrow, .mega-shot { display: none; }
  .dd-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgb(34 162 240 / 0.18); color: var(--color-brand-light); }
  .dd-icon .icon { width: 1.15rem; height: 1.15rem; }
  .mega-feature { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0.5rem 0 0; padding: 0.85rem 1rem; border-radius: var(--radius); background: rgb(34 162 240 / 0.14); color: #fff; text-decoration: none; }
  .mega-body small { display: none; }
  .mega-body strong { font-weight: 650; color: var(--color-brand-light); }
  .mega-go { display: grid; color: var(--color-brand-light); }
  .nav-actions { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; margin-top: auto; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / 0.12); }
  .nav-actions .btn-header { grid-column: 1 / -1; grid-row: 1; justify-content: center; padding-block: 0.95rem; }
  .nav-actions .nav-account { grid-column: 1; grid-row: 2; }
  .nav-actions.is-connected .nav-account { grid-row: 1; }
  .nav-account-menu { position: static; min-width: 0; margin-top: 0.4rem; border-color: rgb(255 255 255 / 0.18); background: rgb(255 255 255 / 0.08); color: #fff; box-shadow: none; }
  .nav-account-email { border-color: rgb(255 255 255 / 0.15); color: rgb(255 255 255 / 0.7); }
  .nav-account-download { color: #fff; }
  .nav-account-download:hover, .nav-account-download:focus-visible { background: rgb(255 255 255 / 0.12); color: #fff; }
  .nav-account-logout { color: #fff; background: transparent; }
  .nav-account-logout:hover, .nav-account-logout:focus-visible { background: rgb(255 255 255 / 0.12); color: #fff; }

  /* Account and language stay in the header bar; the sheet keeps the demo CTA. */
  .header-inner { gap: 0.6rem; }
  .nav-toggle { margin-left: 0; flex-shrink: 0; order: 2; }
  .header-inner > .lang-switch { order: 1; height: 44px; padding-inline: 0.65rem; }
  .nav-actions { display: flex; flex-direction: column; align-items: stretch; gap: 0.9rem; }
  .nav-actions .nav-account { display: none; }
  .nav-actions .btn-header { justify-content: center; padding-block: 0.95rem; }
}
@media (max-width: 479.98px) {
  .header-inner { gap: 0.4rem; }
  .brand { gap: 9px; font-size: 1.2rem; }
  .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
  .header-inner > .lang-switch { width: 44px; padding: 0; justify-content: center; }
  .header-inner > .lang-switch .lang-globe { display: none; }
}

/* Mobile menu: "Portail client" card at the top of the sheet (main.js adds .is-connected when signed in).
   Flowing header gradient, cyan glow, light orbiting the border, bouncing download icon, "Connecté" status. */
.m-portal { display: none; }
@media (max-width: 1023.98px) {
  .site-nav.is-connected .m-portal {
    position: relative; isolation: isolate; overflow: hidden; display: flex; flex: none; align-items: center; gap: 0.9rem;
    min-height: 84px; padding: 1rem 0.95rem 1rem 1rem; border: 1px solid rgb(64 217 241 / 0.35); border-radius: 20px;
    background: #0c4f97; color: #fff; text-decoration: none; -webkit-tap-highlight-color: transparent;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 20px 40px -20px rgb(26 130 219 / 0.95), 0 0 0 1px rgb(0 0 0 / 0.12);
    opacity: 0; transform: translateY(16px) scale(0.96);
    transition: opacity 450ms ease, transform 600ms var(--ease-spring), box-shadow var(--dur-fast);
  }
  .site-nav.is-open.is-connected .m-portal { opacity: 1; transform: none; transition-delay: 80ms; }
  .site-nav.is-open.is-connected .m-portal:active { transform: scale(0.98); transition-delay: 0s; }
  .m-portal:hover, .m-portal:focus-visible {
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 0 0 2px rgb(64 217 241 / 0.65), 0 22px 44px -18px rgb(26 130 219 / 1);
  }
  /* Header gradient as a sliding layer (transform only). */
  .m-portal-flow {
    position: absolute; inset: 0 auto 0 0; z-index: -3; width: 220%; pointer-events: none;
    background: linear-gradient(112deg, #0a2342 0%, #0c56a6 20%, #1a82db 38%, #35a3ee 50%, #1a82db 64%, #0c56a6 82%, #0a2342 100%);
    animation: billing-flow 7s ease-in-out infinite alternate;
  }
  /* Soft cyan glow drifting in the corner. */
  .m-portal::before {
    content: ""; position: absolute; top: -55px; right: -40px; z-index: -2; width: 170px; height: 170px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgb(64 217 241 / 0.5), transparent);
    animation: m-portal-orb 6s ease-in-out infinite alternate;
  }
  /* Light sweep. */
  .m-portal::after {
    content: ""; position: absolute; inset: 0 auto 0 0; z-index: -1; width: 40%; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.2), transparent);
    transform: translateX(-130%) skewX(-22deg); animation: ribbon-shine 4.5s cubic-bezier(0.45, 0, 0.2, 1) 1.2s infinite;
  }
  /* Light orbiting the border (same effect as the COMPLÈTE card). */
  .m-portal-ring {
    position: absolute; inset: 0; z-index: 2; padding: 1.5px; border-radius: inherit; pointer-events: none;
    background: conic-gradient(from var(--ring-angle), transparent 0deg 250deg, rgb(64 217 241 / 0.9) 300deg, #fff 325deg, rgb(64 217 241 / 0.9) 345deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0.85; animation: plan-ring 6s linear infinite;
  }
  .m-portal-icon {
    position: relative; display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 15px;
    border: 1px solid rgb(255 255 255 / 0.32); background: linear-gradient(145deg, rgb(255 255 255 / 0.3), rgb(255 255 255 / 0.08));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4), 0 10px 20px -10px rgb(0 0 0 / 0.55);
  }
  .m-portal-icon .icon { width: 1.35rem; height: 1.35rem; stroke-width: 2.2; animation: m-portal-bob 2.4s ease-in-out infinite; }
  .m-portal-text { display: grid; gap: 0.2rem; min-width: 0; }
  .m-portal-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
  .m-portal-title strong { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.01em; text-shadow: 0 1px 2px rgb(4 40 80 / 0.4); }
  .m-portal-status {
    display: inline-flex; align-items: center; gap: 0.32rem; padding: 0.14rem 0.5rem 0.14rem 0.42rem; border: 1px solid rgb(52 210 123 / 0.5);
    border-radius: var(--radius-pill); background: rgb(8 40 30 / 0.35); color: #b9f5d3;
    font-size: 0.64rem; font-weight: 800; letter-spacing: 0.07em; line-height: 1.2; text-transform: uppercase;
  }
  .m-portal-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #34d27b; box-shadow: 0 0 6px rgb(52 210 123 / 0.9); }
  .m-portal-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #34d27b; animation: pulse 1.8s ease-out infinite; }
  .m-portal-text small { overflow: hidden; color: rgb(255 255 255 / 0.82); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
  .m-portal-text small:empty { display: none; }
  .m-portal-go {
    display: grid; flex: none; place-items: center; width: 38px; height: 38px; margin-left: auto; border-radius: 50%;
    background: #fff; color: #0c56a6; box-shadow: 0 8px 18px -8px rgb(0 0 0 / 0.55), 0 0 0 4px rgb(255 255 255 / 0.14);
    transition: transform var(--dur-fast) var(--ease-out);
  }
  .m-portal-go .icon { stroke-width: 2.4; animation: m-portal-nudge 2.4s ease-in-out infinite; }
  .m-portal:hover .m-portal-go, .m-portal:focus-visible .m-portal-go { transform: scale(1.08); }
}
@media (max-width: 1023.98px) and (prefers-reduced-motion: reduce) {
  .m-portal::after { display: none; }
  .m-portal-flow, .m-portal::before, .m-portal-ring, .m-portal-icon .icon, .m-portal-dot::after, .m-portal-go .icon { animation: none !important; }
}
/* Mobile header account control */
.m-account { display: none; }
@media (max-width: 1023.98px) {
  .m-account { position: relative; display: flex; align-items: center; margin-left: auto; }
  .m-login {
    display: inline-flex; align-items: center; gap: 0.4rem; height: 40px; padding: 0 0.85rem 0 0.7rem;
    border: 1.5px solid rgb(255 255 255 / 0.3); border-radius: var(--radius-pill); background: rgb(255 255 255 / 0.14);
    color: #fff; font-size: 0.82rem; font-weight: 700; text-decoration: none; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18);
    transition: background var(--dur-fast), color var(--dur-fast);
  }
  .m-login:hover, .m-login:focus-visible, .m-login[aria-current="page"] { background: #fff; color: var(--color-brand-dark); }
  .m-chip {
    position: relative; display: none; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1.5px solid rgb(255 255 255 / 0.5); border-radius: 50%; background: rgb(255 255 255 / 0.14); cursor: pointer;
    transition: transform var(--dur-fast), background var(--dur-fast);
  }
  .m-chip:active { transform: scale(0.95); }
  .m-account.is-connected .m-login { display: none; }
  .m-account.is-connected .m-chip { display: grid; }
  .m-account.is-open .m-chip { background: #fff; }
  .m-avatar {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #fff, #dff1ff); color: var(--color-brand-dark);
    font-size: 0.8rem; font-weight: 800; letter-spacing: 0.02em;
  }
  .m-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border: 2px solid #1b7fd6; border-radius: 50%; background: #34d27b; }
  .m-menu {
    position: absolute; top: calc(100% + 0.6rem); right: -54px; z-index: 120;
    display: grid; gap: 0.2rem; width: min(300px, calc(100vw - 24px)); padding: 0.55rem;
    border: 1px solid var(--color-line); border-radius: 18px; background: #fff; color: var(--color-ink);
    box-shadow: 0 24px 48px -12px rgb(8 26 43 / 0.35);
    opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98); transform-origin: top right;
    transition: opacity 180ms, transform 220ms var(--ease-out), visibility 0s 220ms;
  }
  .m-account.is-open .m-menu { opacity: 1; visibility: visible; transform: none; transition: opacity 180ms, transform 220ms var(--ease-out); }
  .m-menu-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.6rem 0.4rem; }
  .m-avatar-lg { width: 44px; height: 44px; flex: none; background: linear-gradient(135deg, #1b7fd6, #22a2f0); color: #fff; font-size: 0.95rem; }
  .m-menu-id { display: grid; min-width: 0; }
  .m-menu-id strong { overflow: hidden; font-size: 0.98rem; text-overflow: ellipsis; white-space: nowrap; }
  .m-menu-id small { overflow: hidden; color: var(--color-muted); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
  .m-menu-status { display: inline-flex; align-items: center; gap: 0.4rem; justify-self: start; margin: 0 0.6rem 0.45rem; padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); background: #e8f9ef; color: #157a45; font-size: 0.72rem; font-weight: 700; }
  .m-menu-status > span { width: 7px; height: 7px; border-radius: 50%; background: #34d27b; }
  .m-menu-link, .m-menu-logout {
    display: flex; align-items: center; gap: 0.65rem; min-height: 46px; padding: 0 0.75rem; border: 0; border-radius: 12px;
    background: none; color: var(--color-ink); font: inherit; font-size: 0.92rem; font-weight: 650; text-align: left; text-decoration: none; cursor: pointer;
  }
  .m-menu-link { background: var(--color-brand-soft); color: var(--color-brand-dark); }
  .m-menu-go { margin-left: auto; }
  .m-menu-logout { border-top: 1px solid var(--color-line); border-radius: 0 0 12px 12px; margin-top: 0.3rem; color: #475569; }
  .m-menu-logout:hover, .m-menu-logout:focus-visible { background: #fff1f0; color: #b42318; }
}
@media (max-width: 479.98px) {
  .m-login { width: 40px; padding: 0; justify-content: center; }
  .m-login span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Desktop: [logo + links] ...empty middle... [Espace client | demo | language] */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; flex: 1; gap: 1rem; }
  .nav-account.is-connected::after { position: absolute; top: 100%; right: 0; width: max(100%, 210px); height: 0.65rem; content: ""; }
  .nav-list {
    position: relative; list-style: none; margin: 0 auto 0 clamp(1rem, 2.2vw, 2.5rem); padding: 4px;
    display: flex; align-items: center; gap: 2px;
    border-radius: var(--radius-pill); background: rgb(255 255 255 / 0.1); border: 1px solid rgb(255 255 255 / 0.2);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14);
  }
  .nav-indicator { /* sliding highlight, positioned by main.js */
    position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--ind-w, 0); z-index: 0;
    border-radius: var(--radius-pill); background: rgb(255 255 255 / 0.2); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28);
    transform: translateX(var(--ind-x, 0)); opacity: var(--ind-o, 0);
    transition: transform 380ms var(--ease-out), width 380ms var(--ease-out), opacity 200ms;
  }
  :is(.no-indicator, :root:not(.js)) :is(.nav-list .nav-link:hover, .nav-link[aria-current="page"], .has-dropdown.is-active > .nav-link) { background: rgb(255 255 255 / 0.2); }

  /* Mega menu: anchored to the links pill, never wider than the space to its right */
  .has-dropdown { position: static; }
  .dropdown {
    position: absolute; top: calc(100% + 14px); left: 0; z-index: 5;
    width: min(920px, calc(100vw - 240px));
    display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 0.75rem;
    padding: 0.75rem; border-radius: 22px; color: var(--color-text);
    background: #fff;
    border: 1px solid rgb(11 27 43 / 0.08);
    box-shadow: 0 40px 80px -24px rgb(8 26 43 / 0.45), 0 0 0 1px rgb(11 27 43 / 0.06);
    opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.985); transform-origin: 20% top;
    transition: opacity 200ms var(--ease-out) 120ms, transform 260ms var(--ease-out) 120ms, visibility 0s 380ms;
  }
  .dropdown::before { content: ""; position: absolute; inset: -18px 0 auto; height: 18px; } /* hover bridge */
  .has-dropdown:hover .dropdown, .has-dropdown.is-open .dropdown, .has-dropdown:focus-within .dropdown {
    opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
  }
  .has-dropdown:hover .dropdown-toggle .icon { transform: rotate(180deg); }

  .dropdown-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; align-content: start; min-width: 0; }
  .dropdown-grid li { opacity: 0; transform: translateY(8px); transition: opacity 300ms, transform 400ms var(--ease-out); }
  .has-dropdown:is(:hover, .is-open, :focus-within) .dropdown-grid li { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 30ms + 60ms); }
  .dropdown-grid a {
    position: relative; display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 0.85rem; border-radius: 14px;
    color: inherit; text-decoration: none; transition: background var(--dur-fast);
  }
  .dropdown-grid a:hover, .dropdown-grid a:focus-visible, .dropdown-grid a[aria-current] { background: var(--color-brand-soft); }
  .dd-text { min-width: 0; flex: 1; }
  .dropdown-grid strong { display: block; color: var(--color-ink); font-size: 0.95rem; transition: color var(--dur-fast); }
  .dropdown-grid small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--color-muted); font-size: 0.8rem; line-height: 1.5; }
  .dropdown-grid a:hover strong { color: var(--color-brand-dark); }
  .dd-icon {
    display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px;
    background: var(--color-brand-soft); color: var(--color-brand-dark);
    transition: background var(--dur), color var(--dur), transform var(--dur) var(--ease-spring), box-shadow var(--dur);
  }
  .dd-icon .icon { width: 1.25rem; height: 1.25rem; }
  .dropdown-grid a:hover .dd-icon { background: linear-gradient(135deg, #0c56a6, #35a3ee); color: #fff; transform: scale(1.06) rotate(-4deg); box-shadow: 0 8px 18px -8px rgb(12 86 166 / 0.7); }
  .dd-arrow { flex: none; color: var(--color-brand-dark); opacity: 0; transform: translateX(-6px); transition: opacity var(--dur-fast), transform var(--dur) var(--ease-out); }
  .dropdown-grid a:hover .dd-arrow, .dropdown-grid a:focus-visible .dd-arrow { opacity: 1; transform: none; }

  /* Featured card: "Toutes les fonctionnalités" with the real screenshot */
  .mega-feature {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: flex-end; gap: 0.25rem; min-height: 100%;
    padding: 1.1rem; border-radius: 16px; color: #fff; text-decoration: none;
    background: linear-gradient(150deg, #0c56a6 0%, #1a82db 60%, #35a3ee 100%);
  }
  .mega-feature::after { content: ""; position: absolute; inset: 0; z-index: -3; background: linear-gradient(115deg, transparent 55%, rgb(255 255 255 / 0.12) 55% 68%, transparent 68%); }
  .mega-shot {
    position: absolute; z-index: -2; top: 1.1rem; left: 1.1rem; right: -2.5rem;
    border-radius: 10px; overflow: hidden; border: 1px solid rgb(255 255 255 / 0.35);
    box-shadow: 0 18px 30px -12px rgb(0 0 0 / 0.45);
    transform: rotate(-3deg) translateY(4px); transform-origin: left top;
    transition: transform 500ms var(--ease-out);
  }
  .mega-shot img { display: block; width: 100%; height: auto; }
  .mega-feature:hover .mega-shot { transform: rotate(0) translateY(-4px); }
  .mega-body { display: grid; gap: 0.2rem; padding-top: 7.5rem; }
  .mega-body small { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: rgb(255 255 255 / 0.8); }
  .mega-body strong { font-size: 1.05rem; line-height: 1.25; }
  .mega-go {
    position: absolute; right: 1rem; bottom: 1rem; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: #fff; color: #1a6fc7; box-shadow: 0 6px 14px -4px rgb(0 0 0 / 0.3);
    transition: transform var(--dur) var(--ease-spring);
  }
  .mega-feature:hover .mega-go { transform: translateX(3px) scale(1.08); }
  .mega-feature .mega-body { padding-right: 2.75rem; }
  .mega-feature::before { /* fade so the text stays readable over the screenshot */
    content: ""; position: absolute; inset: 40% 0 0; z-index: -1; background: linear-gradient(transparent, rgb(12 86 166 / 0.95) 60%);
  }

  .nav-actions { display: flex; align-items: center; gap: 0.9rem; }
  .nav-actions .nav-account { padding-right: 0.9rem; border-right: 1px solid rgb(255 255 255 / 0.24); }
  .nav-account.is-connected { padding-right: 0; border-right: 0; }
  /* Connected profile pill: same frosted white glass as the nav pill and language button */
  .nav-account.is-connected .nav-login {
    position: relative; gap: 0.6rem; height: 44px; padding: 0 0.9rem 0 0.3rem;
    border: 1px solid rgb(255 255 255 / 0.3); border-radius: var(--radius-pill);
    background: linear-gradient(180deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0.07));
    color: #fff;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.32), 0 8px 20px -10px rgb(8 40 90 / 0.45);
    transition: background var(--dur), border-color var(--dur), box-shadow var(--dur);
  }
  .nav-account.is-connected .nav-login:hover, .nav-account.is-connected:is(:focus-within, .is-menu-open) .nav-login {
    border-color: rgb(255 255 255 / 0.5); color: #fff;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.28), rgb(255 255 255 / 0.12));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4), 0 10px 24px -10px rgb(8 40 90 / 0.55);
  }
  .nav-account.is-connected .nav-login:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
  .nav-account.is-connected .nav-login-icon {
    width: 34px; height: 34px; border: 0;
    background: linear-gradient(160deg, #fff 40%, #e3f1ff); color: #1a6fc7;
    box-shadow: 0 0 0 3px rgb(255 255 255 / 0.18), 0 4px 10px -3px rgb(8 40 90 / 0.4);
  }
  .nav-account.is-connected .nav-login:hover .nav-login-icon { transform: none; background: linear-gradient(160deg, #fff 40%, #e3f1ff); }
  .nav-account.is-connected .nav-account-sep { display: block; flex: none; width: 1px; height: 20px; background: linear-gradient(rgb(255 255 255 / 0), rgb(255 255 255 / 0.45), rgb(255 255 255 / 0)); }
  .nav-account.is-connected .nav-login-text { color: #fff; font-size: 0.92rem; font-weight: 650; }
  .nav-account.is-connected .nav-connected {
    gap: 0.38rem; padding: 0.24rem 0.6rem 0.24rem 0.5rem; border-radius: var(--radius-pill);
    background: #fff; color: #0f8a4e; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.01em;
    box-shadow: 0 3px 8px -3px rgb(8 40 90 / 0.35);
  }
  .nav-account.is-connected .nav-connected > span { width: 7px; height: 7px; background: #22c55e; box-shadow: 0 0 0 2.5px rgb(34 197 94 / 0.2), 0 0 6px rgb(34 197 94 / 0.55); }
  .nav-account.is-connected .nav-account-caret { display: inline-grid; place-items: center; color: rgb(255 255 255 / 0.9); transition: transform var(--dur) var(--ease-out), color var(--dur-fast); }
  .nav-account.is-connected .nav-login:hover .nav-account-caret { color: #fff; }
  .nav-account.is-connected:is(:focus-within, .is-menu-open) .nav-account-caret, .nav-account.is-connected:hover .nav-account-caret { transform: rotate(180deg); }
  .nav-account-menu { color: var(--color-ink); }
}
@media (min-width: 1024px) and (max-width: 1239.98px) {
  .header-inner { gap: 0.6rem; }
  .nav-link, .nav-login, .nav-actions .btn-header { font-size: 0.85rem; }
  .nav-login-text { max-width: 10ch; overflow: hidden; text-overflow: ellipsis; }
  .nav-account.is-connected .nav-connected { gap: 0; padding: 0.3rem; font-size: 0; }
  .nav-account.is-connected .nav-connected > span { width: 8px; height: 8px; }
  .nav-link { padding-inline: 0.65rem; }
  .nav-list { margin-left: 0.5rem; }
  .nav-actions { gap: 0.6rem; }
  .nav-actions .nav-account { padding-right: 0.6rem; }
  .dropdown { grid-template-columns: minmax(0, 1fr); width: min(640px, calc(100vw - 230px)); }
  .mega-feature { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; }
  .nav-actions .btn-header { padding-inline: 0.8rem; }
  .nav-actions .btn-header .icon { display: none; }
  .mega-shot, .mega-feature::before { display: none; }
  .mega-body { padding-top: 0; }
}
/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--color-btn); --btn-fg: #fff;
  position: relative; display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.4rem; border: 0; border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 650; font-size: 0.975rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; isolation: isolate; overflow: hidden;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background var(--dur);
}
.btn::after { /* shine sweep */
  content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-110%);
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.28) 50%, transparent 70%);
  transition: transform 700ms var(--ease-out);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); }
.btn:hover::after { transform: translateX(110%); }
.btn .icon { transition: transform var(--dur) var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { box-shadow: var(--shadow-brand); }
.btn-primary:hover { --btn-bg: var(--color-btn-hover); box-shadow: 0 18px 36px -12px rgb(23 129 193 / 0.65); }
.btn-lg { padding: 1.05rem 1.75rem; font-size: 1.05rem; }
.btn-lg:hover .icon { transform: translateY(3px); }
.btn-block { width: 100%; justify-content: center; }
.btn-soft { --btn-bg: var(--color-brand-soft); --btn-fg: var(--color-brand-dark); }
.btn-soft:hover { --btn-bg: #d6eefc; }
.btn-header { --btn-bg: #fff; --btn-fg: var(--color-brand-dark); padding: 0.7rem 1.2rem; box-shadow: 0 8px 20px -8px rgb(0 0 0 / 0.35); }
.btn-header { animation: cta-halo 3.2s var(--ease-out) 1.5s infinite; white-space: nowrap; }
.btn-header::after { background: linear-gradient(110deg, transparent 30%, rgb(34 162 240 / 0.22) 50%, transparent 70%); }
.btn-header:hover { box-shadow: 0 14px 28px -10px rgb(0 0 0 / 0.45); animation: none; }

/* ---------- Section heading ---------- */
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-head.is-center .lead { margin-inline: auto; }
.section-head .lead { margin-bottom: 0; }
.section-head.is-light h2 { color: #fff; }
.section-head.is-light .lead { color: var(--color-dark-text); }
.section-head.is-light .eyebrow { color: var(--color-brand-light); }
.h-sub { display: block; color: var(--color-muted); font-weight: 500; }

/* ---------- Cards ---------- */
[data-spotlight] { position: relative; isolation: isolate; }
[data-spotlight]::before { /* mouse-follow light (main.js sets --mx/--my) */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(34 162 240 / 0.12), transparent 45%);
  opacity: 0; transition: opacity var(--dur);
}
[data-spotlight]:hover::before { opacity: 1; }

.card-icon {
  display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px;
  background: var(--color-brand-soft); color: var(--color-brand-dark);
  transition: transform var(--dur) var(--ease-spring), background var(--dur), color var(--dur);
}
.card-icon-lg { width: 64px; height: 64px; border-radius: 18px; }
.card-icon-lg .icon { width: 1.9rem; height: 1.9rem; }

.card-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.feature-card { border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--color-line); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur), border-color var(--dur); }
.feature-card > a, .feature-card > div { display: flex; flex-direction: column; gap: 0.75rem; height: 100%; padding: 1.75rem; color: inherit; text-decoration: none; border-radius: inherit; }
.feature-card h3 { margin: 0.5rem 0 0; }
.feature-card p { margin: 0; color: var(--color-muted); font-size: var(--fs-sm); }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgb(34 162 240 / 0.35); }
.feature-card:hover .card-icon { background: var(--gradient-brand); color: #fff; transform: scale(1.08) rotate(-5deg); }
.card-link { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: auto; padding-top: 0.5rem; color: var(--color-brand-dark); font-weight: 650; font-size: var(--fs-sm); text-decoration: none; }
.card-link .icon { transition: transform var(--dur) var(--ease-out); }
.feature-card:hover .card-link .icon, .card-link:hover .icon { transform: translateX(4px); }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.check-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.check-list .icon { margin-top: 0.2rem; padding: 2px; border-radius: 50%; background: var(--color-brand-soft); color: var(--color-brand-dark); stroke-width: 2.5; }

.chip-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.page-hero.is-center .chip-row { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.9rem;
  border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: #fff;
  color: var(--color-ink); font-size: var(--fs-xs); font-weight: 600;
}
.chip .icon { color: var(--color-brand); stroke-width: 2.5; }
button.chip { cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
button.chip:hover { border-color: var(--color-brand); }
button.chip.is-active { background: var(--color-ink); border-color: var(--color-ink); color: #fff; }
@media (max-width: 599.98px) {
  .chip-row { gap: 0.4rem; }
  .chip { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
  .page-hero .chip-row { display: grid; grid-template-columns: 1fr 1fr; }
  .page-hero .chip { align-items: flex-start; padding: 0.5rem 0.65rem; border-radius: 12px; text-align: left; line-height: 1.3; }
  .page-hero .chip .icon { flex: none; margin-top: 0.1em; }
}

/* ---------- Media placeholder ---------- */
.media-slot { position: relative; margin: 0; aspect-ratio: var(--ratio, 16 / 9); border-radius: var(--radius-lg); overflow: hidden; }
.media-slot img { width: 100%; height: 100%; object-fit: cover; }
.placeholder {
  display: grid; place-items: center;
  background: repeating-linear-gradient(-45deg, var(--color-ph-bg) 0 14px, var(--color-ph-stripe) 14px 28px);
  border: 1px dashed #c9d6e2; color: var(--color-ph-text);
}
.placeholder figcaption { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; border-radius: var(--radius-pill); background: #fff; font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-sm); }
.placeholder.is-wide { width: 100%; }

/* ---------- Pricing ---------- */
.plan-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); align-items: stretch; }
.plan-grid-2 { max-width: 820px; margin-inline: auto; }
.plan-card {
  display: flex; flex-direction: column; gap: 1rem; padding: 1.75rem 1.5rem;
  border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--color-line);
  box-shadow: 0 1px 2px rgb(11 27 43 / 0.04), 0 12px 28px -18px rgb(13 79 128 / 0.22);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur), border-color var(--dur);
}
.plan-card:hover { transform: translateY(-6px); border-color: rgb(34 162 240 / 0.35); box-shadow: 0 2px 4px rgb(11 27 43 / 0.04), 0 30px 60px -28px rgb(13 79 128 / 0.38); }
.plan-card h3 { margin: 0; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-brand-dark); }
.plan-card .check-list { font-size: var(--fs-sm); }
/* Featured card: breathing glow (--glow), a light travelling around the border (--ring-angle), drifting aurora behind the content. */
@property --glow { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --ring-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.plan-card.is-featured {
  background:
    radial-gradient(120% 70% at 100% 0%, rgb(64 217 241 / 0.26), transparent 60%),
    linear-gradient(165deg, #072a47 0%, var(--color-brand-deep) 28%, var(--color-brand-dark) 68%, var(--color-brand) 100%);
  color: #e9f6ff; border-color: rgb(64 217 241 / 0.45);
  box-shadow:
    0 0 0 1px rgb(64 217 241 / calc(0.18 + var(--glow) * 0.22)),
    0 0 calc(18px + var(--glow) * 18px) -6px rgb(64 217 241 / calc(0.35 + var(--glow) * 0.35)),
    var(--shadow-lg);
  animation: plan-glow 5s ease-in-out infinite;
}
.plan-card.is-featured:hover {
  border-color: rgb(64 217 241 / 0.8);
  box-shadow: 0 0 0 1px rgb(64 217 241 / 0.45), 0 0 44px -4px rgb(64 217 241 / 0.7), 0 50px 90px -30px rgb(13 79 128 / 0.6);
}
.plan-card.is-featured::after {
  content: ""; position: absolute; inset: -1px; z-index: 1; padding: 1.5px; border-radius: calc(var(--radius-lg) + 1px); pointer-events: none;
  background: conic-gradient(from var(--ring-angle), transparent 0deg 230deg, rgb(64 217 241 / 0.85) 295deg, #fff 322deg, rgb(64 217 241 / 0.85) 345deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0.8; animation: plan-ring 7s linear infinite;
}
.plan-card.is-featured:hover::after { opacity: 1; }
.plan-card.is-featured[data-spotlight]::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgb(160 240 255 / 0.22), transparent 45%); }
.plan-aurora { position: absolute; inset: 0; z-index: -2; overflow: hidden; border-radius: inherit; pointer-events: none; }
.plan-aurora::before, .plan-aurora::after { content: ""; position: absolute; border-radius: 50%; filter: blur(34px); will-change: transform; }
.plan-aurora::before { top: 18%; left: -35%; width: 120%; height: 38%; background: rgb(64 217 241 / 0.32); animation: aurora-a 14s ease-in-out infinite alternate; }
.plan-aurora::after { bottom: -10%; right: -40%; width: 110%; height: 45%; background: rgb(120 200 255 / 0.28); animation: aurora-b 18s ease-in-out infinite alternate; }
.plan-card.is-featured h3, .plan-card.is-featured .plan-currency { color: #fff; }
.plan-card.is-featured .plan-amount {
  color: #fff; background: linear-gradient(180deg, #fff 45%, #bff1fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 14px rgb(64 217 241 / 0.35));
  /* background-clip:text only paints inside the box, and the negative tracking makes the box narrower than the last glyph */
  padding: 0.08em 0.12em 0.08em 0; margin: -0.08em -0.12em -0.08em 0;
}
.plan-card.is-featured .plan-unit { color: #cfe9fb; }
.plan-card.is-featured .plan-price { border-bottom-color: rgb(255 255 255 / 0.18); }
.plan-card.is-featured .check-list .icon { background: rgb(255 255 255 / 0.18); color: #fff; transition: background var(--dur), color var(--dur), transform var(--dur) var(--ease-out); }
.plan-card.is-featured .check-list li:hover .icon { background: var(--color-brand-light); color: var(--color-ink); transform: scale(1.12); }
.plan-amount { font-variant-numeric: tabular-nums; }
.plan-highlight {
  position: relative; overflow: hidden; flex-basis: 100%; margin-top: 0.6rem; padding: 0.45rem 0.7rem; border-radius: 10px;
  border: 1px solid rgb(64 217 241 / 0.55); background: linear-gradient(135deg, rgb(64 217 241 / 0.24), rgb(64 217 241 / 0.1));
  color: #fff; font-size: var(--fs-xs); font-weight: 700; line-height: 1.35;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.15), 0 6px 16px -10px rgb(64 217 241 / 0.8);
}
.plan-highlight::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 45%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.28), transparent);
  transform: translateX(-120%) skewX(-20deg); animation: plan-sweep 6s cubic-bezier(0.45, 0, 0.2, 1) 2.6s infinite;
}

/* "Popular" pill straddling the top edge: flowing gradient, orbiting light on its border (::before), shimmer (::after), pulsing halo (.plan-ribbon::before). */
@property --pill-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.plan-ribbon {
  position: absolute; top: 0; left: 50%; z-index: 3; display: block; pointer-events: none;
  transform: translate(-50%, -50%);
}
.plan-ribbon::before {
  content: ""; position: absolute; inset: -5px; z-index: -1; border-radius: var(--radius-pill);
  background: radial-gradient(closest-side, rgb(64 217 241 / 0.55), transparent);
  filter: blur(8px); opacity: 0.7;
}
.plan-ribbon-band {
  position: relative; display: inline-flex; align-items: center; gap: 0.4rem; overflow: hidden;
  padding: 0.42rem 0.95rem 0.42rem 0.75rem; border-radius: var(--radius-pill);
  background: linear-gradient(100deg, #22a2f0, #40d9f1 35%, #7ef0ff 50%, #40d9f1 65%, #22a2f0) 0 0 / 220% 100%;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.55), inset 0 -1px 0 rgb(4 50 80 / 0.25),
    0 8px 20px -6px rgb(13 79 128 / 0.55), 0 0 0 3px rgb(64 217 241 / 0.16);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur);
}
.plan-ribbon-band::before {
  content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--pill-angle), transparent 0deg 250deg, rgb(255 255 255 / 0.95) 320deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.plan-ribbon-band::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 45%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.75), transparent);
  transform: translateX(-130%) skewX(-22deg);
}
.plan-ribbon-spark { position: relative; flex: none; width: 13px; height: 13px; fill: #fff; filter: drop-shadow(0 0 4px rgb(255 255 255 / 0.9)); overflow: visible; }
.plan-ribbon-spark-sm { transform-box: fill-box; transform-origin: center; }
.plan-ribbon-text {
  position: relative; display: block; color: #fff; font-size: 0.68rem; font-weight: 800; line-height: 1.2;
  letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; text-shadow: 0 1px 2px rgb(4 50 80 / 0.45);
}
.plan-card.is-featured:hover .plan-ribbon-band {
  transform: translateY(-2px) scale(1.05);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), inset 0 -1px 0 rgb(4 50 80 / 0.25), 0 12px 26px -6px rgb(13 79 128 / 0.6), 0 0 0 4px rgb(64 217 241 / 0.28), 0 0 24px rgb(64 217 241 / 0.55);
}
/* Idle loops run without JS; with JS they start after the pop-in entrance. */
.plan-ribbon::before { animation: pill-halo 3.2s ease-in-out infinite; }
.plan-ribbon-band { animation: pill-flow 6s linear infinite; }
.plan-ribbon-band::before { animation: pill-orbit 3.5s linear infinite; }
.plan-ribbon-band::after { animation: ribbon-shine 4.5s cubic-bezier(0.45, 0, 0.2, 1) 1.5s infinite; }
.plan-ribbon-spark { animation: pill-spark 2.4s ease-in-out infinite; }
.plan-ribbon-spark-sm { animation: pill-twinkle 2.4s ease-in-out 0.6s infinite; }
.js .plan-card .plan-ribbon-band { opacity: 0; }
.js .plan-card:not(.is-visible) .plan-ribbon::before { opacity: 0; animation: none; }
.js .plan-card.is-visible .plan-ribbon::before { animation: pill-fade-in 600ms ease-out 750ms backwards, pill-halo 3.2s ease-in-out 1.35s infinite; }
.js .plan-card.is-visible .plan-ribbon-band { opacity: 1; animation: pill-pop 750ms cubic-bezier(0.34, 1.56, 0.64, 1) 650ms backwards, pill-flow 6s linear 1.4s infinite; }
.js .plan-card.is-visible .plan-ribbon-text { animation: ribbon-label 650ms cubic-bezier(0.16, 1, 0.3, 1) 900ms backwards; }
.js .plan-card.is-visible .plan-ribbon-spark { animation: pill-spark-in 700ms cubic-bezier(0.34, 1.56, 0.64, 1) 850ms backwards, pill-spark 2.4s ease-in-out 1.6s infinite; }
.js .plan-card.is-visible .plan-ribbon-band::after { animation: ribbon-shine 4.5s cubic-bezier(0.45, 0, 0.2, 1) 1.5s infinite; }
.js .plan-card.is-visible:hover { transform: translateY(-6px); }
.plan-badge { align-self: flex-start; padding: 0.3rem 0.7rem; border-radius: var(--radius-pill); background: var(--color-brand-light); color: var(--color-ink); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; align-content: flex-start; gap: 0.15rem 0.35rem; margin: 0; padding-bottom: 1rem; border-bottom: 1px solid rgb(127 140 155 / 0.2); }
.plan-currency { font-size: 1.25rem; font-weight: 700; color: var(--color-ink); }
.plan-amount { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--color-ink); }
.plan-unit { flex-basis: 100%; font-size: var(--fs-sm); color: var(--color-muted); }
.plan-note { margin: auto 0 0; font-size: var(--fs-xs); color: var(--color-muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.6rem; }
.faq-item { border-radius: var(--radius); background: #fff; border: 1px solid var(--color-line); transition: border-color var(--dur), box-shadow var(--dur); }
.faq-item[open] { border-color: rgb(34 162 240 / 0.45); box-shadow: var(--shadow); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; cursor: pointer; list-style: none; font-weight: 650; color: var(--color-ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--color-brand-soft); transition: background var(--dur), transform var(--dur) var(--ease-out); }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--color-brand-dark); transition: transform var(--dur) var(--ease-out), background var(--dur); }
.faq-plus::after { transform: rotate(90deg); }
.faq-item[open] .faq-plus { background: var(--color-brand-dark); transform: rotate(180deg); }
.faq-item[open] .faq-plus::before, .faq-item[open] .faq-plus::after { background: #fff; }
.faq-item[open] .faq-plus::after { transform: rotate(0deg); }
.faq-answer { padding: 0 1.25rem 1.25rem; color: var(--color-text); }
.faq-answer p { margin: 0; }
.faq-item[open] .faq-answer { animation: faq-in 380ms var(--ease-out); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Forms & contact ---------- */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.05fr; } }
.contact-info h1, .contact-info h2 { font-size: var(--fs-h1); }
.contact-cards { display: grid; gap: 0.75rem; margin-top: 2rem; }
.contact-card {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
  border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--color-line);
  color: inherit; text-decoration: none; transition: transform var(--dur) var(--ease-out), box-shadow var(--dur), border-color var(--dur);
}
.contact-card small { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); }
.contact-card strong { color: var(--color-ink); font-size: 1.1rem; word-break: break-word; }
.contact-card .card-arrow { margin-left: auto; color: var(--color-brand-dark); transition: transform var(--dur) var(--ease-out); }
.contact-card:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgb(34 162 240 / 0.4); }
.contact-card:hover .card-arrow { transform: translateX(4px); }
.contact-card:hover .card-icon { background: var(--gradient-brand); color: #fff; }
@media (max-width: 479.98px) {
  .contact-card { gap: 0.85rem; padding: 0.95rem 1rem; }
  .contact-card > span:not(.card-icon) { min-width: 0; }
  .contact-card strong { display: block; font-size: 0.98rem; word-break: normal; overflow-wrap: anywhere; }
}

.form-card { padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius-xl); background: #fff; border: 1px solid var(--color-line); box-shadow: var(--shadow-lg); }
.form { display: grid; gap: 1rem; }
.form-title { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--color-ink); letter-spacing: -0.02em; }
.form-text { margin: 0; color: var(--color-muted); font-size: var(--fs-sm); }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; font-size: var(--fs-sm); font-weight: 600; color: var(--color-ink); }
.field input, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--color-line); border-radius: 12px; background: var(--color-bg-alt);
  font-weight: 400; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--color-brand); background: #fff; box-shadow: 0 0 0 4px rgb(34 162 240 / 0.15); }
.field textarea { resize: vertical; min-height: 120px; }

.support-teaser {
  display: grid; gap: 1.5rem; align-items: center; padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-xl); background: var(--color-bg-alt); border: 1px solid var(--color-line);
}
.support-teaser h2 { font-size: 1.5rem; }
.support-teaser p { margin-bottom: 0.4rem; color: var(--color-muted); }
@media (min-width: 900px) { .support-teaser { grid-template-columns: auto 1fr auto; gap: 2rem; } }

/* ---------- Footer: blue band, same motion as the header + glass contact cards ---------- */
.site-footer {
  position: relative;
  padding-top: 1rem;
  color: #eaf7ff;
  background: linear-gradient(112deg, #0b3f7d 0%, #0c4b8c 56%, #105a9d 100%);
}

.site-footer .container { max-width: none; padding-inline: clamp(14px, 1.6vw, 28px); }
.footer-grid { display: grid; gap: 1rem 1.5rem; padding-bottom: 0.85rem; align-items: start; }
@media (min-width: 620px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr; gap: clamp(1.5rem, 3vw, 3rem); } }
.footer-brand .brand { color: #fff; margin-bottom: 0.35rem; }
.footer-brand .brand-mark { animation: none; }
.footer-brand p { max-width: 36ch; margin: 0; font-size: 0.82rem; line-height: 1.4; color: #eaf7ff; }
.footer-brand .footer-description { margin-top: 0.25rem; color: rgb(234 247 255 / 0.78); font-size: 0.78rem; line-height: 1.4; }
.footer-social { display: grid; place-items: center; width: 32px; height: 32px; margin-top: 0.5rem; border: 1px solid rgb(255 255 255 / 0.32); border-radius: 9px; color: #fff; text-decoration: none; transition: background var(--dur-fast), transform var(--dur) var(--ease-out); }
.footer-social .icon { width: 1.15rem; height: 1.15rem; }
.footer-social:hover, .footer-social:focus-visible { background: rgb(255 255 255 / 0.16); color: #fff; transform: translateY(-2px); }
.footer-title { margin-bottom: 0.3rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; }
.footer-title a { color: inherit; text-decoration: none; }
.footer-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: var(--fs-sm); }
.footer-links a {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.16rem 0.75rem; margin-left: -0.75rem;
  border-radius: 10px; color: #eaf7ff; text-decoration: none;
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur) var(--ease-out);
}
.footer-links a .icon { opacity: 0; transform: translateX(-6px); transition: opacity var(--dur-fast), transform var(--dur) var(--ease-out); }
.footer-links a:hover, .footer-links a:focus-visible { color: #fff; background: rgb(255 255 255 / 0.12); transform: translateX(3px); }
.footer-links a:hover .icon, .footer-links a:focus-visible .icon { opacity: 1; transform: none; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.footer-contact a {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.18rem 0;
  color: #fff; text-decoration: none;
  transition: color var(--dur), transform var(--dur) var(--ease-out);
}
.footer-contact a:hover, .footer-contact a:focus-visible { color: #fff; transform: translateX(3px); }
.fc-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid rgb(255 255 255 / 0.24); border-radius: 9px; background: rgb(255 255 255 / 0.1); }
.footer-contact small { display: block; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }
.footer-contact strong { font-size: 0.86rem; word-break: break-word; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.45rem 0.55rem; border-top: 1px solid rgb(255 255 255 / 0.18); font-size: var(--fs-xs); color: #eaf7ff; }
.footer-bottom p { margin: 0; }
.footer-account { color: inherit; text-decoration: none; }
.footer-account:hover, .footer-account:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-cookies { margin-left: auto; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.footer-cookies:hover, .footer-cookies:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) { .footer-cookies { margin-left: 0; } }

/* ---------- Cookie consent ---------- */
.cookie-consent {
  position: fixed; right: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px); z-index: 1000;
  display: grid; gap: 0.9rem; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto;
  padding: 1.25rem 1.35rem 1rem; border: 1px solid rgb(15 23 42 / 0.08); border-radius: 20px;
  background: rgb(255 255 255 / 0.97); color: var(--color-text); font-family: var(--font-sans);
  box-shadow: 0 30px 70px -18px rgb(8 26 43 / 0.45), 0 0 0 1px rgb(255 255 255 / 0.6) inset;
  backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(40px) scale(0.96); transform-origin: bottom right;
}
.cookie-consent[hidden] { display: none; }
.cookie-consent.is-visible { opacity: 1; transform: none; transition: opacity 450ms ease, transform 650ms cubic-bezier(0.2, 1.3, 0.35, 1); }
.cookie-consent.is-leaving { opacity: 0; transform: translateY(30px) scale(0.97); transition: opacity 320ms ease, transform 400ms cubic-bezier(0.55, 0, 0.75, 0.2); }
.cookie-consent::before { position: absolute; inset: 0 0 auto; height: 4px; border-radius: 20px 20px 0 0; background: var(--gradient-brand); content: ""; }
.cookie-head { display: flex; align-items: center; gap: 0.7rem; }
.cookie-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--color-brand-soft); color: var(--color-brand-dark); }
.cookie-consent.is-visible .cookie-icon .icon { animation: cookie-wobble 900ms 350ms var(--ease-spring) both; }
@keyframes cookie-wobble { 0% { transform: rotate(-35deg) scale(0.6); } 60% { transform: rotate(12deg) scale(1.1); } 100% { transform: none; } }
.cookie-head h2 { flex: 1; margin: 0; color: var(--color-ink); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.cookie-close { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--color-ink); cursor: pointer; transition: background var(--dur-fast), transform var(--dur) var(--ease-spring); }
.cookie-close:hover, .cookie-close:focus-visible { background: var(--color-bg-alt); transform: rotate(90deg); }
.cookie-text { margin: 0; color: var(--color-muted); font-size: 0.82rem; line-height: 1.55; }
.cookie-consent.is-prefs .cookie-text { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cookie-prefs { display: grid; gap: 0.45rem; }
.cookie-prefs[hidden] { display: none; }
.cookie-prefs:not([hidden]) { animation: cookie-prefs-in 380ms var(--ease-out) both; }
@keyframes cookie-prefs-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cookie-cat { border: 1px solid var(--color-line); border-radius: 12px; background: #fff; }
.cookie-cat summary { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 46px; padding: 0.4rem 0.8rem; list-style: none; cursor: pointer; }
.cookie-cat summary::-webkit-details-marker { display: none; }
.cookie-cat-name { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--color-ink); font-size: 0.9rem; font-weight: 700; }
.cookie-cat-name .icon { color: var(--color-muted); transform: rotate(-90deg); transition: transform var(--dur) var(--ease-out); }
.cookie-cat[open] .cookie-cat-name .icon { transform: none; }
.cookie-cat p { margin: 0; padding: 0 0.85rem 0.8rem 2.1rem; color: var(--color-muted); font-size: 0.8rem; line-height: 1.5; }
.cookie-always { color: #157a45; font-size: 0.75rem; font-weight: 700; }
.cookie-switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.cookie-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cookie-slider { width: 42px; height: 24px; border-radius: 999px; background: #cbd5e1; transition: background var(--dur-fast); }
.cookie-slider::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgb(0 0 0 / 0.2); content: ""; transition: transform 260ms var(--ease-spring); }
.cookie-switch input:checked + span + .cookie-slider { background: var(--color-brand); }
.cookie-switch input:checked + span + .cookie-slider::after { transform: translateX(18px); }
.cookie-switch input:focus-visible + span + .cookie-slider { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.cookie-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.cookie-btn { min-height: 46px; padding: 0.55rem 0.7rem; border: 1px solid var(--color-line); border-radius: 12px; background: var(--color-bg-alt); color: var(--color-ink); font: inherit; font-size: 0.88rem; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast); }
.cookie-btn:hover, .cookie-btn:focus-visible { border-color: rgb(34 162 240 / 0.45); background: #fff; transform: translateY(-1px); }
.cookie-btn-primary { border-color: transparent; background: var(--color-brand-dark); color: #fff; box-shadow: 0 10px 22px -10px rgb(23 129 193 / 0.8); }
.cookie-btn-primary:hover, .cookie-btn-primary:focus-visible { border-color: transparent; background: var(--color-brand); color: #fff; }
.cookie-privacy { justify-self: center; color: var(--color-brand-dark); font-size: 0.8rem; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 520px) {
  .cookie-consent { right: 8px; bottom: 8px; left: 8px; width: auto; padding: 1.1rem 1rem 0.9rem; border-radius: 18px; transform-origin: bottom center; }
  .cookie-actions { grid-template-columns: 1fr 1fr; }
  .cookie-btn-primary { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-consent, .cookie-consent.is-visible, .cookie-consent.is-leaving { transform: none; transition: opacity 150ms; }
  .cookie-consent.is-visible .cookie-icon .icon { animation: none; }
}
@media (max-width: 480px) { .footer-bottom { align-items: flex-start; flex-direction: column; gap: 0.4rem; } }

/* ---------- Pricing page: monthly / annual switch + five plan cards ---------- */
.pricing {
  --p-navy: #0a2342; --p-blue: #087cc2; --p-bright: #159be8; --p-cyan: #30c7e8;
  --p-light: #eaf7ff; --p-muted: #64748b; --p-line: rgb(10 35 66 / 0.1);
}
.pricing .page-hero { padding-bottom: clamp(1.25rem, 3vw, 2rem); background: linear-gradient(180deg, var(--p-light), #fff); }
.pricing-plans { padding-top: clamp(1.5rem, 3vw, 2.25rem); }
.pricing-container { max-width: 1400px; }

.billing { display: grid; justify-items: center; gap: 0.75rem; margin-top: 0.5rem; }
/* Switch in the header's blues: flowing gradient thumb that slides with a spring, light sweep, breathing glow, light orbiting the border. */
.billing-toggle {
  position: relative; isolation: isolate; display: inline-flex; align-items: stretch; gap: 4px; min-inline-size: 0; margin: 0; padding: 5px;
  border: 1px solid rgb(26 130 219 / 0.2); border-radius: var(--radius-pill); background: #fff;
  box-shadow: 0 1px 2px rgb(12 86 166 / 0.06), 0 16px 36px -18px rgb(26 130 219 / 0.65);
}
.billing-toggle::after {
  content: ""; position: absolute; inset: -1px; z-index: 2; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ring-angle), transparent 0deg 240deg, rgb(53 163 238 / 0.9) 295deg, #fff 322deg, rgb(48 199 232 / 0.9) 345deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0.8; animation: plan-ring 6s linear infinite;
}
.billing-toggle.is-switching { animation: billing-bump 460ms var(--ease-out); }
.billing-input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.billing-option {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 48px; padding: 0.5rem 1.35rem;
  border-radius: var(--radius-pill); color: var(--p-muted); font-size: 1rem; font-weight: 700; line-height: 1.2; cursor: pointer;
  transition: background-color 250ms ease, color 300ms ease, box-shadow 250ms ease, text-shadow 300ms ease;
}
.billing-option:hover { color: #0c56a6; background-color: rgb(26 130 219 / 0.07); }
.billing-input:checked + .billing-option {
  color: #fff; text-shadow: 0 1px 2px rgb(4 40 80 / 0.45);
  background: linear-gradient(112deg, #0c56a6 0%, #1a82db 46%, #35a3ee 74%, #1687c6 100%);
  box-shadow: 0 0 0 1px rgb(53 163 238 / 0.5), 0 10px 24px -8px rgb(26 130 219 / 0.75);
}
.billing-toggle.has-thumb .billing-input:checked + .billing-option { background: none; box-shadow: none; }
.billing-input:focus-visible + .billing-option { outline: 3px solid var(--p-bright); outline-offset: 2px; }
.billing-thumb { display: none; }
.billing-toggle.has-thumb .billing-thumb {
  position: absolute; top: 0; left: 0; z-index: 0; display: block; overflow: hidden;
  width: var(--thumb-w, 0); height: var(--thumb-h, 0); border-radius: var(--radius-pill);
  transform: translate(var(--thumb-x, 0), var(--thumb-y, 0));
  background: #1a82db;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 0 0 1px rgb(53 163 238 / 0.6), 0 10px 24px -8px rgb(26 130 219 / 0.8), 0 0 26px -4px rgb(48 199 232 / 0.55);
  transition: transform 560ms cubic-bezier(0.34, 1.36, 0.64, 1), width 560ms cubic-bezier(0.34, 1.36, 0.64, 1), height 300ms ease;
}
/* Flowing header gradient as a sliding layer (transform only: no repaint on every frame). */
.billing-thumb::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 220%; pointer-events: none;
  background: linear-gradient(112deg, #0c56a6 0%, #1a82db 21%, #35a3ee 34%, #1687c6 46%, #1a82db 66%, #35a3ee 82%, #0c56a6 100%);
  animation: billing-flow 6s ease-in-out infinite alternate;
}
.billing-toggle.has-thumb .billing-thumb.is-instant { transition: none; }
.billing-thumb::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 45%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.5), transparent);
  transform: translateX(-130%) skewX(-22deg); animation: ribbon-shine 3.8s cubic-bezier(0.45, 0, 0.2, 1) 1s infinite;
}
.billing-save {
  position: relative; overflow: hidden; padding: 0.28rem 0.7rem; border: 1px solid rgb(48 199 232 / 0.55); border-radius: var(--radius-pill);
  background: linear-gradient(100deg, #e6f6ff, #cdeefb); color: #0c56a6; text-shadow: none;
  font-size: 0.76rem; font-weight: 800; white-space: nowrap;
  transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
  animation: billing-nudge 2.6s ease-in-out infinite;
}
.billing-save::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 50%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.55), transparent);
  transform: translateX(-130%) skewX(-22deg); animation: ribbon-shine 3.2s cubic-bezier(0.45, 0, 0.2, 1) 0.6s infinite;
}
.billing-input:checked + .billing-option .billing-save {
  border-color: rgb(255 255 255 / 0.9); background: #fff; color: #0c56a6;
  box-shadow: 0 4px 14px -6px rgb(4 40 80 / 0.6); animation: none;
}
.billing-toggle.is-switching .billing-input:checked + .billing-option .billing-save { animation: billing-badge-pop 520ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.billing-support { margin: 0; color: var(--p-muted); font-size: var(--fs-sm); }

.price-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; max-width: 460px; margin: 0 auto; padding: 20px 0 0; list-style: none; }
/* White cards; the featured card keeps the original .plan-card.is-featured gradient, glow, light ring, aurora and ribbon. */
.price-card {
  display: flex; flex-direction: column; gap: 0; padding: 1.75rem 1.35rem 1.4rem;
  border-radius: var(--radius-lg); border-color: var(--p-line); color: var(--color-text);
}
.price-card-head { padding-bottom: 1.1rem; }
.price-card h3 { margin: 0; color: var(--p-navy); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.price-tagline { margin: 0.45rem 0 0; color: var(--p-muted); font-size: 0.9rem; line-height: 1.45; }
.price-availability { display: inline-block; margin: 0.65rem 0 0; padding: 0.15rem 0.6rem; border-radius: var(--radius-pill); background: var(--p-light); color: var(--p-navy); font-size: 0.72rem; font-weight: 700; }

/* Both billing views share one grid cell, so the card keeps its height when switching. */
.price-card-price { display: grid; padding: 1.15rem 0 1.25rem; border-block: 1px solid var(--p-line); }
.price-view { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 0.35rem; }
/* Instant swap (visibility only, no fade): see the note on painting in main.js. */
.price-view-monthly { visibility: hidden; }
.pricing[data-billing="monthly"] .price-view-annual { visibility: hidden; }
.pricing[data-billing="monthly"] .price-view-monthly { visibility: visible; }
@supports selector(:has(*)) {
  .pricing:has(#billing-monthly:checked) .price-view-annual { visibility: hidden; }
  .pricing:has(#billing-monthly:checked) .price-view-monthly { visibility: visible; }
}
.price-amount { display: flex; flex-wrap: wrap; align-items: baseline; margin: 0; color: var(--p-navy); line-height: 1; }
.price-num { color: inherit; font-size: clamp(2.3rem, 2rem + 0.6vw, 2.55rem); font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.price-cur { color: inherit; font-size: 1.35rem; font-weight: 800; }
.price-unit { flex-basis: 100%; margin-top: 0.45rem; color: var(--p-muted); font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.price-amount.is-request { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.price-billing { margin: 0; color: var(--p-muted); font-size: 0.8rem; font-style: italic; line-height: 1.4; }
.price-compare { margin: 0.1rem 0 0; color: var(--p-navy); font-size: 0.84rem; font-weight: 600; line-height: 1.4; }
.price-save {
  display: flex; align-items: flex-start; gap: 0.45rem; margin: 0.35rem 0 0; padding: 0.5rem 0.65rem;
  border: 1px solid rgb(48 199 232 / 0.5); border-radius: 12px; background: var(--p-light); color: var(--p-navy); font-size: 0.8rem; line-height: 1.35;
}
.price-save .icon { flex: none; margin-top: 0.1rem; color: var(--p-blue); stroke-width: 3; }
.price-save strong, .price-save small { display: block; }
.price-save strong { font-weight: 800; }
.price-save small { color: var(--p-muted); font-size: 0.76rem; }
.price-save.is-upsell { border-style: dashed; background: #fff; }
.price-card .price-features { padding: 1.2rem 0 0.2rem; gap: 0.5rem; color: var(--color-text); font-size: 0.88rem; line-height: 1.45; }
.price-features .icon { background: var(--p-light); color: var(--p-blue); }

.pricing .plan-card.is-featured {
  background:
    radial-gradient(120% 70% at 100% 0%, rgb(48 199 232 / 0.26), transparent 60%),
    linear-gradient(165deg, var(--p-navy) 0%, #0b4f86 28%, var(--p-blue) 68%, var(--p-bright) 100%);
}
.pricing .plan-ribbon-band { background: linear-gradient(100deg, var(--p-bright), var(--p-cyan) 35%, #7ef0ff 50%, var(--p-cyan) 65%, var(--p-bright)) 0 0 / 220% 100%; }
.price-card.is-featured h3, .price-card.is-featured .price-amount, .price-card.is-featured .price-compare { color: #fff; }
.price-card.is-featured .price-tagline, .price-card.is-featured .price-unit, .price-card.is-featured .price-billing { color: #d6ecfb; }
.price-card.is-featured .price-card-price { border-color: rgb(255 255 255 / 0.18); }
.price-card.is-featured .price-num { font-size: clamp(2.6rem, 2.2rem + 0.9vw, 2.95rem); }
.price-card.is-featured .price-features { color: #e9f6ff; }
/* Savings pill on the featured card reuses the old highlight look and light sweep. */
.price-card.is-featured .price-save {
  position: relative; overflow: hidden; border-color: rgb(48 199 232 / 0.6); color: #fff;
  background: linear-gradient(135deg, rgb(48 199 232 / 0.26), rgb(48 199 232 / 0.1));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.15), 0 6px 16px -10px rgb(48 199 232 / 0.8);
}
.price-card.is-featured .price-save::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 45%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.28), transparent);
  transform: translateX(-120%) skewX(-20deg); animation: plan-sweep 6s cubic-bezier(0.45, 0, 0.2, 1) 2.6s infinite;
}
.price-card.is-featured .price-save .icon { color: var(--p-cyan); }
.price-card.is-featured .price-save small { color: #d6ecfb; }
.price-card.is-featured .price-save.is-upsell { border-style: dashed; }
/* Original five-card motion: 3D tilt toward the pointer (main.js sets --rx/--ry) and staggered featured checklist. */
/* Breathing glow as a fading layer instead of an animated box-shadow (cheaper to draw while prices change). */
.pricing .plan-card.is-featured { animation: none; }
.price-glow {
  position: absolute; inset: 0; z-index: -3; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 1px rgb(64 217 241 / 0.4), 0 0 36px -6px rgb(64 217 241 / 0.7);
  animation: price-glow 5s ease-in-out infinite;
}
/* main.js adds .is-switching for about a second: decorative loops pause so the new prices are drawn immediately. */
.pricing.is-switching .price-glow, .pricing.is-switching .plan-card.is-featured::after, .pricing.is-switching .plan-aurora::before, .pricing.is-switching .plan-aurora::after,
.pricing.is-switching .plan-ribbon::before, .pricing.is-switching .plan-ribbon-band, .pricing.is-switching .plan-ribbon-band::before, .pricing.is-switching .plan-ribbon-band::after,
.pricing.is-switching .plan-ribbon-spark, .pricing.is-switching .plan-ribbon-spark-sm, .pricing.is-switching .price-save::after,
.pricing.is-switching .billing-toggle::after, .pricing.is-switching .billing-thumb::before, .pricing.is-switching .billing-thumb::after,
.pricing.is-switching .billing-save, .pricing.is-switching .billing-save::after { animation-play-state: paused; }
.js .price-grid .plan-card.is-visible:hover { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px); }
.js .price-grid .plan-card.is-featured.is-visible .check-list li { animation: plan-item-in 600ms var(--ease-out) both; animation-delay: calc(700ms + var(--i, 0) * 70ms); }
.pricing-note { max-width: 780px; margin: 1.75rem auto 0; color: var(--p-muted); font-size: 0.85rem; line-height: 1.6; text-align: center; }
.pricing-included { justify-content: center; margin-top: 1.5rem; }

/* 1 column (mobile) -> 2 + 2 + 1 (tablet) -> 3 + 2 (small desktop) -> 5 in one row. */
@media (min-width: 680px) {
  .price-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
  .price-grid > * { grid-column: span 2; }
  .price-grid > :last-child { grid-column: 2 / span 2; }
  /* Subgrid lines up headings, prices and feature lists across a row. */
  @supports (grid-template-rows: subgrid) {
    .price-card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
    .price-card > .price-features { align-self: start; }
  }
}
@media (min-width: 1024px) {
  .price-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .price-grid > :last-child { grid-column: span 2; }
  .price-grid > :nth-child(4) { grid-column: 2 / span 2; }
}
@media (min-width: 1240px) {
  .price-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
  .price-grid > *, .price-grid > :nth-child(4), .price-grid > :last-child { grid-column: auto; }
  .price-card { padding-inline: 1.2rem; }
}
/* Mobile: full-width segmented control with two equal halves; the savings badge floats above "Annuel". */
@media (max-width: 559.98px) {
  .billing { gap: 0.85rem; width: 100%; margin-top: 1.25rem; }
  .billing-toggle { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 380px; padding: 5px; border-radius: var(--radius-pill); }
  .billing-option { min-height: 52px; padding: 0.55rem 0.75rem; font-size: 1.02rem; }
  .billing-option[for="billing-annual"] { z-index: 3; }
  .billing-save, .billing-input:checked + .billing-option .billing-save {
    position: absolute; top: -13px; right: 2px; left: auto; width: max-content;
    padding: 0.24rem 0.6rem; border: 2px solid #fff; background: linear-gradient(100deg, #30c7e8, #7ee3f6); color: var(--p-navy);
    font-size: 0.68rem; letter-spacing: 0.01em; box-shadow: 0 6px 14px -6px rgb(12 86 166 / 0.55);
  }
  .billing-support { max-width: 30ch; font-size: 0.88rem; line-height: 1.45; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .js .price-grid .plan-card.is-visible:hover { transform: none; }
  .js .price-grid .plan-card.is-featured .check-list li, .price-card.is-featured .price-save::after { animation: none !important; }
  .price-card.is-featured .price-save::after, .billing-thumb::after, .billing-save::after { display: none; }
  .billing-toggle::after, .billing-save, .billing-thumb, .billing-thumb::before, .price-glow { animation: none !important; }
  .price-glow { opacity: 0.6; }
}
