/* Footer public unique — palette anthracite de la page d'accueil, indépendante du thème local de chaque page. */
.v2-footer {
  --color-surface-2: #F2F2F2;
  --color-text: #333333;
  --color-text-muted: #5F5F5F;
  --color-border: #E2E2E2;
  --color-border-strong: #8A8A8A;
  --color-brand: #E91E63;
  --color-brand-strong: #C2185B;
  --color-brand-soft: #FCE4EC;
  --color-link: #AD1457;
  --color-focus: #1A56DB;
  background: var(--color-surface-2);
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
}
:root[data-theme="dark"] .v2-footer {
  --color-surface-2: #484848;
  --color-text: #F5F5F5;
  --color-text-muted: #CFCFCF;
  --color-border: #575757;
  --color-border-strong: #A8A8A8;
  --color-brand: #FF4F8B;
  --color-brand-strong: #C2185B;
  --color-brand-soft: #4A2A36;
  --color-link: #FF8AB3;
  --color-focus: #8AB4FF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .v2-footer {
    --color-surface-2: #484848;
    --color-text: #F5F5F5;
    --color-text-muted: #CFCFCF;
    --color-border: #575757;
    --color-border-strong: #A8A8A8;
    --color-brand: #FF4F8B;
    --color-brand-strong: #C2185B;
    --color-brand-soft: #4A2A36;
    --color-link: #FF8AB3;
    --color-focus: #8AB4FF;
  }
}
/* Même structure et mêmes motifs sur les vues v1 et v2 qui partagent le footer. */
.v2-footer { position: relative; isolation: isolate; overflow: hidden; margin-top: auto; }
.v2-footer > .v2-container { position: relative; z-index: 1; width: 100%; max-width: 72rem; margin-inline: auto; padding: 2rem 1rem; }
.v2-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 1rem; }
.v2-footer__brand { grid-column: 1 / -1; }
.v2-footer__brand p { margin: .5rem 0 0; color: var(--color-text-muted); line-height: 1.6; max-width: 32rem; }
.v2-footer__newsletter { display: grid; gap: .75rem; margin: 0 0 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--color-border); }
.v2-footer__newsletter h2 { margin: 0 0 .25rem; }
.v2-footer__newsletter p { margin: 0; color: var(--color-text-muted); }
.v2-footer__newsletter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; min-width: 0; }
.v2-footer__newsletter-row .v2-input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; color: var(--color-text); }
.v2-footer__newsletter-row .v2-btn { width: auto; min-height: 40px; padding: 8px 14px; }
.v2-footer__logo { display: inline-flex; align-items: center; gap: 9px; color: var(--color-text); text-decoration: none; font-size: 18px; }
.v2-footer h2 { margin: 0 0 .75rem; color: var(--color-text-muted); font-family: var(--font-family-mono, monospace); font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.v2-footer ul { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.v2-footer li a { display: inline-flex; align-items: center; min-height: 36px; color: var(--color-text-muted); text-decoration: none; }
.v2-footer li a:hover, .v2-footer li a:focus-visible { color: var(--color-text); }
@media (min-width: 48rem) {
  .v2-footer > .v2-container { padding: 2rem 1.5rem; }
  .v2-footer__newsletter { grid-template-columns: 1fr 1.2fr; align-items: center; }
  .v2-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
  .v2-footer__brand { grid-column: auto; }
}
@media (max-width: 30rem) {
  .v2-footer__newsletter-row { grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
  .v2-footer__newsletter-row .v2-btn { padding-inline: .65rem; }
}
/* Les pages courtes gardent le footer au bas de l'écran au lieu de laisser un vide après lui. */
body:has(> .v2-header) { min-height: 100vh; display: flex; flex-direction: column; }
body:has(> .v2-header) > main { flex: 1 0 auto; width: 100%; }
body:has(> .v2-header) > .v2-footer { flex-shrink: 0; }

/* 18/11/2026 (propriétaire) : sur téléphone et tablette, la coque app (menu du bas) remplace le pied de page ;
   ses liens sont dans « Plus » (views/app/plus.ejs, partials/visitor-more.ejs). Le HTML reste pour les robots. */
@media (max-width: 1023.98px) {
  html.udc-shell-on .v2-footer { display: none !important; }
}
/* Compte connecté sur une page sans coque app (paiement, réception…) : même règle, pas de pied de page sur téléphone. */
@media (max-width: 1023.98px) {
  .v2-footer.v2-footer--member { display: none !important; }
}
