/* ═══════════════════════════════════════════════════════════════════════
   LA NAVIGATION TÉLÉPHONE, SUR TOUT LE SITE (04/11/2026)

   Celle de la nouvelle landing mobile (cf. landing.css), étendue à toutes
   les pages publiques à la demande de Cassandre : le logo, « Créer
   gratuitement » et le burger flottent sur la page, un voile se fond derrière
   eux dès qu'on descend, et le burger ouvre un menu plein écran.

   Une seule feuille pour trois sortes de pages :
   - la landing mobile (landing-mobile*.html), qui l'écrit dans son HTML ;
   - les pages statiques (tarifs, contact, affiliation…), où /m/nav.js la
     construit ;
   - les pages Next (blog, guides, MCP, /outils, pages légales), où
     src/components/NavMobile.tsx la rend.
   Les trois écrivent le même balisage : toute modification de structure
   se fait dans les trois.

   `.mx-auto` : la navigation ne s'affiche que sous 900 px, la largeur où
   l'ancienne passait au burger ; au-dessus, l'ancienne reste en place tant
   que l'ordinateur n'est pas refait. La landing mobile, servie aux seuls
   téléphones, ne porte pas cette classe.

   Les pages qui l'accueillent ont leurs propres règles sur `a`, `button`
   ou `nav` : tout est donc redéclaré ici plutôt qu'hérité.
   ═══════════════════════════════════════════════════════════════════════ */

.mx-nav, .mx-menu { --mx-haut: 64px; --mx-gouttiere: 20px; font-family: "Figtree", var(--font-figtree, -apple-system), BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.mx-nav *, .mx-menu * { box-sizing: border-box; margin: 0; }
.mx-nav a, .mx-menu a { text-decoration: none; color: inherit; }
.mx-nav button, .mx-menu button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; box-shadow: none; }

/* ─── LA BARRE ──────────────────────────────────────────────────────── */
.mx-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--mx-haut) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--mx-gouttiere) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: none; border: 0; color: #fff; transition: top .25s ease;
  /* LE BURGER NE RÉPONDAIT PLUS (04/11/2026, signalé par Cassandre). Les
     pages statiques posent `nav { pointer-events: none }` pour leur ancienne
     barre en pilule, et la règle touchait aussi celle-ci : le doigt
     traversait la barre et tombait sur la page dessous. Un clic par script
     passe outre, c'est pourquoi les tests ne l'avaient pas vu. */
  pointer-events: auto !important;
}
.mx-nav::before {
  content: ""; position: absolute; inset: 0 0 -34px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(12,13,16,0.96) 0%, rgba(12,13,16,0.82) 55%, rgba(12,13,16,0) 100%);
  opacity: 0; transition: opacity .3s ease;
}
.mx-nav.voile::before { opacity: 1; }
/* Le bandeau d'une campagne (promo-campagne.js) se pose au-dessus. */
body.pr-bar-on .mx-nav { top: var(--pr-bar-h, 42px); }

.mx-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: #fff; }
.mx-logo svg { width: 28px; height: 28px; flex: none; display: block; }
.mx-nav-droite { display: flex; align-items: center; gap: 12px; }
.mx-burger { width: 30px; height: 30px; display: grid; place-content: center; gap: 6px; }
.mx-burger i { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: currentColor; }

/* Le bouton d'action : la pilule bleue en relief de la landing. */
.mx-nav-cta, .mx-menu-cta {
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; font-weight: 700; letter-spacing: -0.01em; color: #fff !important; white-space: nowrap;
  background:
    radial-gradient(120% 160% at 22% -10%, rgba(255,255,255,0.42) 0%, rgba(255,255,255,0) 46%),
    linear-gradient(100deg, #2a5ee6 0%, #3b74f5 45%, #5b8cff 80%, #3b74f5 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -3px 8px rgba(8,28,82,0.45), 0 10px 34px rgba(59,116,245,0.38);
  transition: transform .15s ease, filter .15s ease; -webkit-tap-highlight-color: transparent;
}
.mx-nav-cta:active, .mx-menu-cta:active { transform: scale(0.98); filter: brightness(1.08); }
.mx-nav-cta { height: 40px; padding: 0 16px; font-size: 14.5px; }

/* Thème clair des pages Next : texte sombre, voile clair. Le menu, lui,
   reste sombre dans les deux thèmes. */
[data-theme="light"] .mx-nav { color: #10131c; }
[data-theme="light"] .mx-nav .mx-logo { color: #10131c; }
[data-theme="light"] .mx-nav::before { background: linear-gradient(180deg, rgba(245,247,251,0.97) 0%, rgba(245,247,251,0.85) 55%, rgba(245,247,251,0) 100%); }

/* ─── LE MENU PLEIN ÉCRAN ───────────────────────────────────────────── */
.mx-menu {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) 0 calc(20px + env(safe-area-inset-bottom));
  color: #fff;
  background:
    radial-gradient(60% 30% at 80% 0%, rgba(59,116,245,0.22) 0%, rgba(59,116,245,0) 100%),
    radial-gradient(50% 25% at 15% 4%, rgba(139,92,246,0.14) 0%, rgba(139,92,246,0) 100%),
    #0c0d10;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s .25s;
}
body.menu-ouvert .mx-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease; }
.mx-menu-tete { height: var(--mx-haut); padding: 0 28px 0 32px; display: flex; align-items: center; justify-content: space-between; flex: none; }
.mx-fermer { width: 34px; height: 34px; display: grid; place-items: center; }
.mx-fermer svg { width: 26px; height: 26px; }
.mx-menu-liste { flex: 1; overflow-y: auto; padding: 18px 32px 10px; }
.mx-menu-liste a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 0; font-size: 22px; font-weight: 500; line-height: 1.2; color: #fff;
}
.mx-menu-liste a svg { width: 20px; height: 20px; opacity: 0.85; flex: none; }
.mx-langues { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 24px 14px; flex: none; }
.mx-langues a {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,0.18); font-size: 15px; font-weight: 700; color: #a6a9b6;
}
.mx-langues a.actif { color: #fff; border-color: #3b74f5; background: rgba(59,116,245,0.16); }
.mx-langues svg { width: 22px; height: 15px; border-radius: 2px; flex: none; }
.mx-menu-actions { display: grid; gap: 12px; padding: 0 22px; flex: none; }
.mx-menu-cta { width: 100%; height: 54px; font-size: 18px; }
.mx-menu-connexion {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 54px;
  border-radius: 999px; font-size: 17px; font-weight: 600; color: #fff !important;
  background:
    radial-gradient(90% 120% at 50% 120%, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #17181d 0%, #050506 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 0 0 1px rgba(255,255,255,0.08), 0 8px 24px rgba(0,0,0,0.5);
}

@media (max-width: 360px) {
  .mx-nav-cta { padding: 0 14px; font-size: 14px; }
}

/* ─── QUI S'AFFICHE OÙ ──────────────────────────────────────────────── */
@media (min-width: 901px) {
  .mx-nav.mx-auto, .mx-menu.mx-auto { display: none; }
}
@media (max-width: 900px) {
  /* L'ancienne barre et son tiroir : celle des pages statiques (un <nav>
     posé directement dans <body>) et celle des pages Next (.site-nav). */
  body > nav:not(.mx-nav), .site-nav, .nav-drawer { display: none !important; }
}

/* Le menu ouvert bloque le défilement de la page dessous. */
body.menu-ouvert { overflow: hidden; }

/* ─── LA BARRE À L'ORDINATEUR (02/11/2026) ──────────────────────────────
   `.pc-nav` : la même barre fondue, sur les pages déjà refaites pour le
   grand écran (landing-ordi*.html, tarifs-mobile*.html). Au-dessus de
   900 px elle grandit et gagne « Connexion » ; à partir de 1080 px, les
   liens au centre et la langue remplacent le burger. Écrite dans le HTML
   de la landing, construite par nav.js ailleurs (`data-ordi`). */
.pc-liens, .pc-langue, .pc-connexion { display: none; }
@media (min-width: 900px) {
  .pc-nav { --mx-haut: 76px; --mx-gouttiere: max(32px, calc((100% - 1320px) / 2)); }
  .pc-nav .mx-logo { font-size: 19px; }
  .pc-nav .mx-logo svg { width: 30px; height: 30px; }
  .pc-nav .mx-nav-droite { gap: 22px; }
  .pc-connexion { display: inline-flex; font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.86) !important; transition: color .2s; }
  .pc-connexion:hover { color: #fff !important; }
  .pc-nav .mx-nav-cta { height: 44px; padding: 0 20px; font-size: 15px; }
  .pc-nav .mx-nav-cta:hover { filter: brightness(1.08); }
}
/* Les liens prennent la place libre entre le logo et les boutons, centrés
   dedans : jamais par-dessus l'un ou l'autre, quelle que soit la largeur.
   Réseaux et Marques (`.pc-large-seul`) n'y tiennent qu'à partir de 1280 px. */
@media (min-width: 1080px) {
  .pc-liens { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 26px; }
  .pc-liens a { font-size: 15px; font-weight: 600; white-space: nowrap; color: rgba(255,255,255,0.78); transition: color .2s; }
  .pc-liens a:hover, .pc-liens a[aria-current="page"] { color: #fff; }
  .pc-langue {
    display: inline-grid; place-items: center; height: 32px; padding: 0 10px; border-radius: 999px;
    font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em; color: rgba(255,255,255,0.78);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); transition: color .2s, box-shadow .2s;
  }
  .pc-langue:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4); }
  .pc-nav .mx-burger { display: none; }
}
@media (max-width: 1279px) {
  .pc-large-seul { display: none; }
}
/* Le thème clair des pages Next : mêmes liens, en encre sombre. */
[data-theme="light"] .pc-liens a, [data-theme="light"] .pc-connexion { color: rgba(16,19,28,0.72) !important; }
[data-theme="light"] .pc-liens a:hover, [data-theme="light"] .pc-liens a[aria-current="page"], [data-theme="light"] .pc-connexion:hover { color: #10131c !important; }
[data-theme="light"] .pc-langue { color: rgba(16,19,28,0.72); box-shadow: inset 0 0 0 1px rgba(16,19,28,0.2); }
/* Le bouton de thème des pages Next, rangé à côté de la langue. */
.pc-theme { display: none; }
@media (min-width: 1080px) { .pc-theme { display: inline-flex; } }
