/* ============================================================
   adhesion.onarp.org — Design system public
   Cohérent avec auth.onarp.org et le site vitrine onarp.org.
   ============================================================ */

/* ------------------------------------------------------------
   Variables
   ------------------------------------------------------------ */
:root {
  --navy-950: #060D18;
  --navy-900: #0B1A2F;
  --navy-800: #122640;
  --navy-700: #1A3050;
  --navy-600: #223A5C;

  --gold-500: #C4983E;
  --gold-400: #D4A94E;
  --gold-300: #E0BE6A;

  --silver-100: #EBEBEB;
  --silver-400: #8899AA;
  --silver-600: #55697D;

  --arp:   #4E7BC0;
  --osint: #3D5A3E;
  --ie:    #8B6914;

  --success: #6B9F8A;
  --danger:  #C83C3C;
  --warning: #D6A247;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.24);
  --shadow:    0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 18px 56px rgba(0, 0, 0, 0.48);

  --gold-glow: 0 0 24px rgba(196, 152, 62, 0.30);

  --duration: 0.25s;
  --easing: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------------------------------------
   Reset minimal
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--silver-100);
  background: var(--navy-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold-400);
  text-decoration: none;
  transition: color var(--duration) var(--easing);
}
a:hover, a:focus-visible {
  color: var(--gold-300);
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

::selection {
  background: var(--gold-500);
  color: var(--navy-900);
}

:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------
   Typographie
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: 600;
  color: var(--silver-100);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem); line-height: 1.15; }
h2 { font-size: clamp(1.35rem, 1.5vw + 1rem, 2rem);    line-height: 1.2; }
h3 { font-size: 1.25rem; line-height: 1.3; }
h4 { font-size: 1.05rem; line-height: 1.35; }

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-400);
}

p { margin: 0 0 1em; }

.lead {
  font-size: 1.1rem;
  color: var(--silver-100);
  opacity: 0.9;
}

.muted { color: var(--silver-400); }
.small { font-size: 0.875rem; }

/* ------------------------------------------------------------
   Layout général
   ------------------------------------------------------------ */
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  isolation: isolate;
}

.smoke-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .smoke-canvas { display: none; }
}

.page::before {
  /* Insigne ONARP en filigrane (fond de page, toutes pages) */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('/assets/img/insigne-onarp.webp');
  background-repeat: no-repeat;
  background-position: center 50%;
  background-size: min(880px, 85vw);
  opacity: 0.08;
  pointer-events: none;
}
/* L'insigne du header disparaît (remplacé par le fond) — seul le texte reste.
   Spécificité rehaussée (body.page) pour battre .admin-body de admin.css. */
body.page .site-brand__insigne { display: none; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 2.5rem);
}

.container--narrow { max-width: 780px; }
.container--medium { max-width: 940px; }

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.site-header {
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(1.25rem, 3vw, 2rem);
  text-align: center;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  color: inherit;
  text-decoration: none;
}
.site-brand:hover { text-decoration: none; }

.site-brand__insigne {
  width: clamp(72px, 9vw, 100px);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(196, 152, 62, 0.25));
  transition: transform var(--duration) var(--easing);
}
.site-brand:hover .site-brand__insigne { transform: translateY(-2px); }

.site-brand__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-100);
}

.site-brand__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver-400);
}

/* ------------------------------------------------------------
   Main
   ------------------------------------------------------------ */
main {
  flex: 1 0 auto;
  padding: 0 0 clamp(1.5rem, 3vw, 2.5rem);
}

.hero {
  text-align: center;
  padding: 0 0 clamp(1rem, 2vw, 1.75rem);
}

.hero h1 { margin-bottom: 0.75rem; }
.hero .lead { max-width: 620px; margin-left: auto; margin-right: auto; }

.divider-gold {
  display: block;
  width: 60px;
  height: 2px;
  margin: 1.5rem auto;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  border: 0;
}

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: 1.25rem 0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(180deg,
      rgba(18, 38, 64, 0.85) 0%,
      rgba(11, 26, 47, 0.85) 100%);
  border: 1px solid rgba(196, 152, 62, 0.22);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform var(--duration) var(--easing),
    border-color var(--duration) var(--easing),
    box-shadow var(--duration) var(--easing);
}

.card::after {
  /* Halo doré subtil vers le haut */
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 3px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(196, 152, 62, 0.5) 50%,
      transparent 100%);
  opacity: 0;
  transition: opacity var(--duration) var(--easing);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(196, 152, 62, 0.55);
  box-shadow: var(--shadow), var(--gold-glow);
  text-decoration: none;
}
.card:hover::after,
.card:focus-visible::after { opacity: 1; }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--gold-400);
  background: rgba(196, 152, 62, 0.08);
  border: 1px solid rgba(196, 152, 62, 0.28);
  border-radius: var(--radius);
  transition:
    color var(--duration) var(--easing),
    background var(--duration) var(--easing),
    border-color var(--duration) var(--easing);
}
.card__icon svg {
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.card:hover .card__icon {
  color: var(--gold-300);
  background: rgba(196, 152, 62, 0.14);
  border-color: rgba(196, 152, 62, 0.55);
}

/* --- Animations spécifiques par pictogramme --- */
@keyframes icon-pop {
  0%   { transform: scale(1) rotate(0deg); }
  40%  { transform: scale(1.18) rotate(-6deg); }
  70%  { transform: scale(0.96) rotate(3deg); }
  100% { transform: scale(1.06) rotate(0deg); }
}

@keyframes icon-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes icon-lift {
  0%   { transform: translateY(0) scale(1); }
  50%  { transform: translateY(-4px) scale(1.06); }
  100% { transform: translateY(-2px) scale(1.04); }
}

.card--adherer:hover    .card__icon svg { animation: icon-pop    0.55s var(--easing); }
.card--renouveler:hover .card__icon svg { animation: icon-rotate 0.9s  cubic-bezier(0.4, 0, 0.2, 1); }
.card--admin:hover      .card__icon svg { animation: icon-lift   0.55s var(--easing) forwards; }

.card--admin:hover .card__icon {
  color: var(--silver-100);
  background: rgba(136, 153, 170, 0.10);
  border-color: rgba(136, 153, 170, 0.55);
}

.card__title {
  margin: 0.2rem 0 0.1rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--silver-100);
}

.card__desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--silver-400);
}

.card__meta {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card__meta svg {
  transition: transform var(--duration) var(--easing);
}
.card:hover .card__meta svg { transform: translateX(3px); }

/* Variante admin (plus sobre) */
.card--admin {
  background: linear-gradient(180deg,
      rgba(18, 38, 64, 0.55) 0%,
      rgba(11, 26, 47, 0.55) 100%);
  border-color: rgba(136, 153, 170, 0.24);
}
.card--admin .card__icon {
  color: var(--silver-400);
  background: rgba(136, 153, 170, 0.06);
  border-color: rgba(136, 153, 170, 0.28);
}
.card--admin .card__meta { color: var(--silver-400); }
.card--admin:hover {
  border-color: rgba(136, 153, 170, 0.5);
  box-shadow: var(--shadow);
}
.card--admin:hover::after { display: none; }

/* ------------------------------------------------------------
   Boutons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--silver-100);
  background: linear-gradient(180deg, var(--navy-700) 0%, var(--navy-800) 100%);
  border: 1px solid rgba(196, 152, 62, 0.3);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--duration) var(--easing),
    border-color var(--duration) var(--easing),
    box-shadow var(--duration) var(--easing),
    background var(--duration) var(--easing);
}
.btn:hover, .btn:focus-visible {
  border-color: var(--gold-400);
  box-shadow: var(--gold-glow);
  color: var(--gold-300);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(180deg, var(--gold-400) 0%, var(--gold-500) 100%);
  color: var(--navy-900);
  border-color: var(--gold-500);
  font-weight: 600;
}
.btn--primary:hover, .btn--primary:focus-visible {
  color: var(--navy-950);
  border-color: var(--gold-300);
  filter: brightness(1.05);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(136, 153, 170, 0.3);
}

.btn--danger {
  border-color: rgba(200, 60, 60, 0.5);
  color: #F0BABA;
}
.btn--danger:hover, .btn--danger:focus-visible {
  border-color: var(--danger);
  color: #FFCFCF;
  box-shadow: 0 0 24px rgba(200, 60, 60, 0.25);
}

.btn--sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn--block { display: flex; width: 100%; }

/* ------------------------------------------------------------
   Badges
   ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(136, 153, 170, 0.12);
  color: var(--silver-100);
  border: 1px solid rgba(136, 153, 170, 0.28);
}
.badge--arp   { color: #B7CDF0; background: rgba(78, 123, 192, 0.14); border-color: rgba(78, 123, 192, 0.4); }
.badge--osint { color: #B2D8B4; background: rgba(61, 90, 62, 0.24);   border-color: rgba(90, 175, 92, 0.45); }
.badge--ie    { color: #E7C77A; background: rgba(139, 105, 20, 0.18); border-color: rgba(139, 105, 20, 0.5); }
.badge--success { color: #C7E5D9; background: rgba(107, 159, 138, 0.16); border-color: rgba(107, 159, 138, 0.4); }
.badge--danger  { color: #F0BABA; background: rgba(200, 60, 60, 0.14);   border-color: rgba(200, 60, 60, 0.4); }
.badge--warning { color: #F0D497; background: rgba(214, 162, 71, 0.14);  border-color: rgba(214, 162, 71, 0.4); }
/* ------------------------------------------------------------
   Compteur d'adhérents actifs (page d'accueil)
   ------------------------------------------------------------ */
.member-counter {
  margin: 0 auto 2.5rem;
  max-width: 620px;
  padding: 0 1rem;
}
.member-counter__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.4rem 1.75rem 1.5rem;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(196,152,62,0.10) 0%, transparent 60%),
    linear-gradient(180deg, rgba(18,38,64,0.65) 0%, rgba(11,26,47,0.75) 100%);
  border: 1px solid rgba(196,152,62,0.35);
  border-radius: 14px;
  box-shadow:
    0 8px 28px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(224,190,106,0.10);
  text-align: center;
  overflow: hidden;
}
.member-counter__inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  opacity: 0.75;
}
.member-counter__eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-400);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.member-counter__eyebrow::before,
.member-counter__eyebrow::after {
  content: '';
  width: 18px; height: 1px;
  background: currentColor;
  opacity: 0.55;
}
.member-counter__value {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--gold-300);
  text-shadow: 0 0 24px rgba(224,190,106,0.25);
  font-variant-numeric: tabular-nums;
  transition: color 0.6s ease;
}
.member-counter__number { display: inline-block; }
.member-counter__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver-100);
  font-weight: 500;
}
.member-counter__label-main {
  white-space: nowrap;
}
.member-counter__hint {
  position: relative;
  color: var(--gold-300);
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(224, 190, 106, 0.55);
  animation: member-counter-pulse 2.4s ease-in-out infinite;
}
@keyframes member-counter-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .member-counter__hint { animation: none; opacity: 1; }
}

/* Mobile : réduction du padding, wrap du label, box responsive */
@media (max-width: 480px) {
  .member-counter { padding: 0 0.5rem; margin-bottom: 2rem; }
  .member-counter__inner {
    padding: 1.15rem 1rem 1.2rem;
    gap: 0.4rem;
    border-radius: 12px;
  }
  .member-counter__eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.22em;
  }
  .member-counter__eyebrow::before,
  .member-counter__eyebrow::after {
    width: 12px;
  }
  .member-counter__value {
    font-size: 2.4rem;
  }
  .member-counter__label {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    gap: 0.25rem 0.5rem;
    line-height: 1.4;
  }
}

.badge--donateur {
  color: var(--gold-300);
  background: rgba(212, 169, 78, 0.10);
  border-color: rgba(212, 169, 78, 0.45);
  padding: 0.12rem 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

/* ------------------------------------------------------------
   Mention basse (sous les cards accueil)
   ------------------------------------------------------------ */
.member-hint {
  margin: clamp(1.25rem, 2.5vw, 2rem) auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--silver-400);
}
.member-hint a { font-weight: 500; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(196, 152, 62, 0.18);
  background: var(--navy-950);
  font-size: 0.8rem;
  color: var(--silver-400);
  position: relative;
  z-index: 3;
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer__brand p {
  margin: 0;
  line-height: 1.55;
  color: var(--silver-100);
  opacity: 0.75;
}

.site-footer__socials {
  display: inline-flex;
  gap: 0.5rem;
}
.site-footer__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--silver-100);
  opacity: 0.55;
  border: 1px solid rgba(136, 153, 170, 0.22);
  border-radius: 50%;
  transition:
    color var(--duration) var(--easing),
    opacity var(--duration) var(--easing),
    border-color var(--duration) var(--easing),
    transform var(--duration) var(--easing);
}
.site-footer__socials a:hover {
  color: var(--gold-300);
  opacity: 1;
  border-color: rgba(196, 152, 62, 0.5);
  transform: translateY(-2px);
}
.site-footer__socials svg { width: 16px; height: 16px; }

.site-footer__legal {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  text-align: right;
  min-width: 200px;
}
.site-footer__legal a { color: var(--silver-100); opacity: 0.75; }
.site-footer__legal a:hover { color: var(--gold-300); opacity: 1; }

.site-footer__copyright {
  opacity: 0.55;
  margin-top: 0.2rem;
  font-size: 0.72rem;
}

/* ------------------------------------------------------------
   Contenus statiques (mentions, confidentialité, charte)
   ------------------------------------------------------------ */
.prose {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
  background: rgba(11, 26, 47, 0.7);
  border: 1px solid rgba(136, 153, 170, 0.14);
  border-radius: var(--radius-lg);
}

/* Bouton fermer (croix) sur les pages légales */
.page-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--silver-400);
  background: rgba(11, 26, 47, 0.9);
  border: 1px solid rgba(136, 153, 170, 0.25);
  border-radius: 50%;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.3s var(--easing),
    background 0.3s var(--easing),
    border-color 0.3s var(--easing),
    box-shadow 0.3s var(--easing),
    transform 0.45s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 2;
}
.page-close svg { width: 18px; height: 18px; }
.page-close:hover,
.page-close:focus-visible {
  color: #F0BABA;
  background: rgba(200, 60, 60, 0.15);
  border-color: var(--danger);
  box-shadow: 0 0 24px rgba(200, 60, 60, 0.28);
  transform: rotate(90deg) scale(1.08);
  text-decoration: none;
}
.page-close:active { transform: rotate(90deg) scale(0.94); }

.prose h1 { margin-bottom: 0.5rem; }
.prose h2 {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(136, 153, 170, 0.14);
  color: var(--gold-400);
  font-size: 1.3rem;
}
.prose h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.5rem; }
.prose h3 {
  margin-top: 1.75rem;
  color: var(--silver-100);
  font-size: 1.05rem;
}

.prose p, .prose li { color: var(--silver-100); opacity: 0.92; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4rem; }

.prose a { font-weight: 500; }

.prose strong { color: var(--silver-100); font-weight: 600; }

.prose__meta {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(136, 153, 170, 0.14);
  font-size: 0.85rem;
  color: var(--silver-400);
}

/* ------------------------------------------------------------
   Bouton "Retour en haut"
   ------------------------------------------------------------ */
.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--silver-100);
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  border: 1px solid rgba(196, 152, 62, 0.30);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition:
    opacity 0.35s var(--easing),
    visibility 0.35s var(--easing),
    transform 0.35s var(--easing),
    color 0.3s var(--easing),
    border-color 0.3s var(--easing),
    box-shadow 0.3s var(--easing);
  z-index: 100;
}
.scroll-top svg { width: 18px; height: 18px; }
.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top:hover,
.scroll-top:focus-visible {
  color: var(--gold-300);
  border-color: var(--gold-400);
  box-shadow: 0 0 28px rgba(196, 152, 62, 0.45);
  transform: translateY(-3px);
}
.scroll-top:active { transform: translateY(0) scale(0.96); }

@media (max-width: 640px) {
  .scroll-top { bottom: 1rem; right: 1rem; width: 42px; height: 42px; }
}

/* ------------------------------------------------------------
   Erreurs et messages
   ------------------------------------------------------------ */
.page-error main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.error-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  text-align: center;
  background: rgba(11, 26, 47, 0.8);
  border: 1px solid rgba(196, 152, 62, 0.22);
  border-radius: var(--radius-lg);
}
.error-card h1 { color: var(--gold-400); }

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  margin-bottom: 1.5rem;
}
.alert--success { background: rgba(107, 159, 138, 0.12); border-color: rgba(107, 159, 138, 0.4); color: #D6EDE1; }
.alert--danger  { background: rgba(200, 60, 60, 0.12);   border-color: rgba(200, 60, 60, 0.4);   color: #F0BABA; }
.alert--warning { background: rgba(214, 162, 71, 0.12);  border-color: rgba(214, 162, 71, 0.4);  color: #F0D497; }
.alert--info    { background: rgba(78, 123, 192, 0.10);  border-color: rgba(78, 123, 192, 0.35); color: #C4D5EE; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 640px) {
  .site-footer__grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }
  .site-footer__brand,
  .site-footer__brand p {
    text-align: center;
  }
  .site-footer__socials {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .site-footer__legal {
    align-items: center;
    text-align: center;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------
   Grille tarifaire dégressive — v0.8.9
   ------------------------------------------------------------ */
.tarifs-grid {
  background: var(--navy-900);
  border: 1px solid rgba(196,152,62,0.22);
  border-radius: 8px;
  padding: 1.25rem 1.35rem;
  margin: 0 0 2rem;
}
.tarifs-grid__header { margin-bottom: 1rem; }
.tarifs-grid__title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-400);
  font-weight: 600;
}
.tarifs-grid__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--silver-400);
  line-height: 1.5;
}
.tarifs-grid__hint strong {
  color: var(--silver-100);
  font-weight: 500;
}
.tarifs-grid__wrap {
  overflow-x: auto;
  margin: 0 -0.35rem;
}
.tarifs-grid__table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
  font-size: 0.9rem;
}
.tarifs-grid__table th,
.tarifs-grid__table td {
  padding: 0.7rem 0.6rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tarifs-grid__th-formule {
  text-align: left !important;
  font-weight: 500;
  color: var(--silver-100);
  min-width: 130px;
}
.tarifs-grid__th {
  vertical-align: middle;
  padding-top: 0.9rem !important;
  padding-bottom: 0.9rem !important;
  font-weight: 500;
  line-height: 1.25;
  transition: background 0.2s, color 0.2s;
}
.tarifs-grid__q-label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
}
.tarifs-grid__q-months {
  display: block;
  font-size: 0.7rem;
  color: var(--silver-400);
  margin-top: 0.1rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.tarifs-grid__badge {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.15rem 0.5rem;
  background: var(--gold-500);
  color: #060D18;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-radius: 3px;
  font-weight: 600;
}
.tarifs-grid__cell {
  font-variant-numeric: tabular-nums;
  transition: background 0.2s, color 0.2s;
}
/* Colonne active : mise en évidence or */
.tarifs-grid__th.is-active,
.tarifs-grid__cell.is-active {
  background: rgba(196,152,62,0.12);
  color: var(--gold-300);
  font-weight: 600;
}
.tarifs-grid__th.is-active .tarifs-grid__q-label {
  color: var(--gold-400);
}
.tarifs-grid__th.is-active .tarifs-grid__q-months {
  color: var(--silver-100);
}
/* Colonnes non applicables : lisibles mais visuellement en retrait
   (couleur plus douce + fond légèrement sombre, opacity conservée haute) */
.tarifs-grid__th.is-off,
.tarifs-grid__cell.is-off {
  color: var(--silver-100);
  background: rgba(255,255,255,0.02);
  opacity: 0.78;
}
.tarifs-grid__th.is-off .tarifs-grid__q-label {
  color: var(--silver-100);
}
.tarifs-grid__th.is-off .tarifs-grid__q-months {
  color: var(--silver-400);
}
.tarifs-grid__cell.is-off {
  text-decoration: line-through;
  text-decoration-color: rgba(224, 190, 106, 0.85);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.05em;
}
/* Mode info (renouvellement) : tout grisé uniformément, pas de highlight */
.tarifs-grid--info .tarifs-grid__th,
.tarifs-grid--info .tarifs-grid__cell {
  opacity: 1;
  color: var(--silver-100);
  background: none;
  font-weight: 500;
}
.tarifs-grid--info {
  padding: 0.9rem 1rem;
}
.tarifs-grid--info .tarifs-grid__title {
  font-size: 0.72rem;
}
.tarifs-grid--info .tarifs-grid__table {
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .tarifs-grid { padding: 1rem 0.85rem; }
  .tarifs-grid__hint { font-size: 0.78rem; }

  /* Colonne formule fixe pendant le scroll horizontal */
  .tarifs-grid__wrap { position: relative; }
  .tarifs-grid__table th.tarifs-grid__th-formule,
  .tarifs-grid__table td.tarifs-grid__th-formule {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--navy-900);
    box-shadow: 4px 0 6px -3px rgba(0,0,0,0.4);
    min-width: 110px;
  }
  /* La cellule sticky doit avoir un fond opaque pour cacher ce qui passe dessous */
  .tarifs-grid__table thead th.tarifs-grid__th-formule {
    background: var(--navy-900);
  }
}

/* ------------------------------------------------------------
   Notify modal (remplace alert/confirm natifs) — v0.8.20
   ------------------------------------------------------------ */
.notify-modal {
  position: fixed; inset: 0;
  z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(6, 13, 24, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.18s ease-out;
}
.notify-modal.is-visible { opacity: 1; }
.notify-modal__panel {
  background: var(--navy-900);
  border: 1px solid rgba(196,152,62,0.35);
  border-left: 4px solid var(--gold-400);
  border-radius: 8px;
  padding: 1.15rem 1.35rem 1.1rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  transform: translateY(6px) scale(0.98);
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1.1);
}
.notify-modal.is-visible .notify-modal__panel {
  transform: none;
}
.notify-modal__panel--confirm { border-left-color: var(--gold-400); }
.notify-modal__panel--danger  { border-left-color: var(--danger);
                                 border-color: rgba(200, 60, 60, 0.45); }
.notify-modal__title {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-400);
  font-weight: 600;
}
.notify-modal__panel--danger .notify-modal__title { color: #F5A9A9; }
.notify-modal__body {
  margin: 0 0 1.15rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--silver-100);
}
.notify-modal__actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.notify-modal__actions .btn { min-width: 100px; }

@media (max-width: 480px) {
  .notify-modal__actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  .notify-modal__actions .btn { width: 100%; }
}

/* ------------------------------------------------------------
   Pretty date picker (remplace input type=date natif) — v0.8.22
   ------------------------------------------------------------ */
.pretty-date-modal {
  position: fixed; inset: 0;
  z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(6, 13, 24, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.18s ease-out;
}
.pretty-date-modal.is-visible { opacity: 1; }

.pretty-date-modal__panel {
  background: var(--navy-900);
  border: 1px solid rgba(196, 152, 62, 0.35);
  border-top: 3px solid var(--gold-500);
  border-radius: 10px;
  padding: 1rem 1.05rem 0.9rem;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 24px rgba(196, 152, 62, 0.10);
  transform: translateY(6px) scale(0.98);
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1.1);
}
.pretty-date-modal.is-visible .pretty-date-modal__panel {
  transform: none;
}

.pretty-date__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.pretty-date__title {
  flex: 1;
  text-align: center;
  color: var(--gold-400);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
.pretty-date__nav {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(196, 152, 62, 0.08);
  border: 1px solid rgba(196, 152, 62, 0.28);
  border-radius: 6px;
  color: var(--gold-400);
  font-size: 1.4rem; line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pretty-date__nav:hover,
.pretty-date__nav:focus-visible {
  background: rgba(196, 152, 62, 0.18);
  border-color: var(--gold-400);
  color: var(--gold-300);
  outline: none;
}

.pretty-date__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.pretty-date__weekdays span {
  text-align: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--silver-400);
  font-weight: 600;
  padding: 4px 0;
}

.pretty-date__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.pretty-date__cell {
  height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--silver-100);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.pretty-date__cell:hover:not(:disabled) {
  background: rgba(196, 152, 62, 0.14);
  border-color: rgba(196, 152, 62, 0.35);
  color: var(--gold-300);
}
.pretty-date__cell.is-today {
  border-color: rgba(196, 152, 62, 0.45);
  color: var(--gold-400);
}
.pretty-date__cell.is-selected {
  background: var(--gold-500);
  border-color: var(--gold-400);
  color: var(--navy-900);
  font-weight: 700;
}
.pretty-date__cell.is-selected:hover {
  background: var(--gold-400);
  color: var(--navy-900);
}
.pretty-date__cell.is-disabled,
.pretty-date__cell:disabled {
  color: rgba(136, 153, 170, 0.35);
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
}
.pretty-date__cell--pad {
  visibility: hidden;
  cursor: default;
}

.pretty-date__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(196, 152, 62, 0.15);
}
.pretty-date__link {
  background: none;
  border: none;
  padding: 0.35rem 0.5rem;
  color: var(--silver-400);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.pretty-date__link:hover,
.pretty-date__link:focus-visible {
  color: var(--gold-400);
  outline: none;
}

/* Champ input pretty-date : curseur pointer + icone calendrier a droite */
.field input[data-pretty-date] {
  cursor: pointer;
  padding-right: 2.5rem;
  background-image:
    url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C4983E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}
.field input[data-pretty-date]::placeholder {
  color: var(--silver-400);
  opacity: 0.75;
}
