/* ==============================================================================================
   NAOMI — MENU COMMUN (naomi-nav.css), créé le 12/10/2026 (LOT MENU COMMUN, validé par Laurence).
   Seule feuille de style du menu principal "Espace abonné" : remplace les copies qui vivaient
   dans le <style> de chaque page (identité visuelle reprise telle quelle de ces copies — mêmes
   couleurs, tailles, cartes dorées). Chargée dans le <head> de chaque page, le HTML et le JS du
   menu étant fournis par naomi-nav.js.

   Variantes de présentation (classe posée sur <html> par naomi-nav.js, jamais une copie du menu) :
   - nn-mode-overlay : menu affiché par défaut à partir de 861px, PAR-DESSUS le contenu ; flèche
                       pour le replier/réafficher (choix mémorisé) ; tiroir en dessous de 861px.
   - nn-mode-push    : idem, mais le contenu est décalé de 292px quand le menu est affiché.
   - nn-mode-drawer  : tiroir à toutes les largeurs (ouvert par une flèche).
   - nn-mode-rail    : assistant.html — rail de 56px + panneau superposé de 300px à partir de
                       1101px ; tiroir en dessous (flèche dans la barre de marque de la page).
   - naomi-nav-embedded : page affichée dans une iframe ou avec ?embed=1 — aucun menu, aucun
                       bouton, aucun espace réservé.
   Les couleurs de base (--panel-2, --border, --ink, --muted, --gold) restent celles de chaque
   page (variables :root déjà définies partout), avec une valeur de repli.
   ============================================================================================== */

/* --- Bouton flèche (ouverture du tiroir) --- */
.nav-toggle {
  position: fixed;
  top: 22px;
  left: 18px;
  z-index: 150;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  background: var(--panel-2, #171c27);
  border: 1px solid var(--border, #232a38);
  color: var(--ink, #e8e6df);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.nav-toggle:hover { border-color: var(--gold, #e8a33d); }
#navOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 140;
}
#navOverlay.show { display: block; }

/* --- Panneau --- */
.nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 292px;
  background: #000000;
  border-right: 1px solid #241f14;
  box-shadow: 10px 0 35px rgba(0,0,0,.32);
  z-index: 145;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  padding: 20px 0 18px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #4a4030 transparent;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}
.nav-panel::-webkit-scrollbar { width: 4px; }
.nav-panel::-webkit-scrollbar-thumb { background: #4a4030; border-radius: 4px; }
.nav-panel::-webkit-scrollbar-track { background: transparent; }
.nav-panel.show { transform: translateX(0); }
/* Tiroir ouvert : au-dessus des barres d'icônes fixes des pages (z-index 150, ex. musique/podcast/
   langue en haut à droite), qui recouvraient sinon l'en-tête du menu sur petit écran. */
.nav-panel.show { z-index: 155; }
.nav-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 20px;
  border-bottom: 1px solid #2a2419;
  margin-bottom: 16px;
}
.nav-panel-header-inner { display: flex; align-items: center; gap: 12px; }
.nav-brand-mark {
  position: relative;
  width: 55px; height: 55px; flex-shrink: 0;
  border: 1px solid var(--gold, #e8a33d); border-radius: 14px;
  background: rgba(232,163,61,.04);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 28px;
  background-image: linear-gradient(135deg, #a9781f 0%, #f4c368 35%, #fff6d5 55%, #e8a33d 80%, #a9781f 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #f4c368;
}
.nav-panel-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 25px;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--ink, #e8e6df);
}
.nav-panel-title-accent { color: var(--gold, #e8a33d); }
.nav-panel-sub {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
  letter-spacing: .5px;
  white-space: nowrap;
  text-transform: uppercase;
  color: #968c78;
}
.nav-close {
  width: 30px; height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 1px solid #2a2419;
  border-radius: 9px;
  color: var(--muted, #8b93a3);
  cursor: pointer;
  transition: .2s;
}
.nav-close:hover { color: var(--gold, #e8a33d); border-color: rgba(232,163,61,.45); background: none; filter: none; }
.nav-chevron { width: 15px; height: 15px; flex-shrink: 0; }
.nav-subscribe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  background: radial-gradient(ellipse at center, rgba(232,163,61,.22) 0%, rgba(232,163,61,.08) 50%, #050608 85%);
  color: #f4c368;
  text-decoration: none;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid rgba(232,163,61,.55);
  box-shadow: 0 0 14px rgba(232,163,61,.16), inset 0 0 16px rgba(232,163,61,.15);
  cursor: pointer;
  transition: .2s;
}
.nav-subscribe-btn:hover {
  border-color: var(--gold, #e8a33d);
  box-shadow: 0 0 20px rgba(232,163,61,.28), inset 0 0 20px rgba(232,163,61,.22);
  background: radial-gradient(ellipse at center, rgba(232,163,61,.3) 0%, rgba(232,163,61,.1) 50%, #050608 85%);
  filter: none;
}
.nav-subscribe-icon-box {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 7px;
  background: #000000;
  border: 1px solid rgba(232,163,61,.35);
}
.nav-subscribe-icon { width: 14px; height: 14px; flex-shrink: 0; color: #f4c368; }
.nav-panel-top {
  padding: 0 20px 18px;
  margin: 0 20px 16px;
  border-bottom: 1px solid #2a2419;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.nav-panel-top-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 3px 0;
  background: none;
  color: #ffffff;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  border: none;
  border-radius: 0;
  cursor: pointer;
}
.nav-panel-top-link:hover { color: var(--gold, #e8a33d); filter: none; }
.nav-panel-top-link-icon {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 6px;
  background: #000000;
  border: 1px solid rgba(199,184,150,.2);
  color: #a39a8a;
}
.nav-panel-top-link-icon svg { width: 12px; height: 12px; }
.nav-panel-top-link:hover .nav-panel-top-link-icon { border-color: rgba(232,163,61,.4); color: var(--gold, #e8a33d); }
.nav-panel .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 7px 5px;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  position: relative;
  transition: background .18s ease, border-color .18s ease;
}
.nav-panel .nav-link:hover, .nav-panel .nav-link:active { background: rgba(232,163,61,.06); border-left-color: transparent; color: var(--ink, #e8e6df); }
.nav-panel .nav-lock-badge { margin-left: auto; opacity: 0.6; font-size: 12px; }
.nav-panel .icon {
  width: 28px; height: 28px;
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2a2419;
  border-radius: 8px;
  background: #000000;
  color: #968c78;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  transition: .18s;
}
.nav-panel .nav-link:hover .icon, .nav-panel .nav-link:active .icon {
  color: #f0b348;
  border-color: rgba(232,163,61,.75);
  box-shadow: 0 0 10px rgba(232,163,61,.12);
}
.nav-panel .section-title {
  padding: 3px 6px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  color: #a89a7f;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.nav-menu-list { padding: 15px 8px 0; }
.nav-menu-card {
  border: 1.5px solid transparent;
  border-radius: 11px;
  background: linear-gradient(#16140F, #16140F) padding-box, linear-gradient(135deg, #fff6d5 0%, #f4c368 35%, #c98f2e 70%, #6b4a15 100%) border-box;
  padding: 0 10px 9px;
  overflow: hidden;
}
.nav-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 2px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(232,163,61,.45);
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #e8a33d;
  transition: text-shadow .2s ease;
}
.nav-menu-card--gold-light .nav-card-header { border-bottom-color: rgba(244,195,104,.48); color: #f4c368; }
.nav-menu-card--gold-dark .nav-card-header { border-bottom-color: rgba(169,120,31,.45); color: #c99031; }
.nav-card-icon { font-size: 13px; flex-shrink: 0; }
.nav-card-icon svg { width: 13px; height: 13px; display: block; color: inherit; }
.nav-card-body { display: flex; flex-direction: column; gap: 2px; }
.nav-menu-card--gold-light .icon { border-color: rgba(244,195,104,.4); }
.nav-menu-card--gold-dark .icon { border-color: rgba(169,120,31,.4); }
.nav-panel .nav-menu-card--gold-light .nav-link:hover, .nav-panel .nav-menu-card--gold-light .nav-link:active {
  background: rgba(244,195,104,.10); border-left-color: transparent;
}
.nav-panel .nav-menu-card--gold-light .nav-link:hover .icon, .nav-panel .nav-menu-card--gold-light .nav-link:active .icon {
  color: #f4c368; border-color: #f4c368; box-shadow: 0 0 10px rgba(244,195,104,.35);
}
.nav-panel .nav-menu-card--gold-dark .nav-link:hover, .nav-panel .nav-menu-card--gold-dark .nav-link:active {
  background: rgba(169,120,31,.10); border-left-color: transparent;
}
.nav-panel .nav-menu-card--gold-dark .nav-link:hover .icon, .nav-panel .nav-menu-card--gold-dark .nav-link:active .icon {
  color: #a9781f; border-color: #a9781f; box-shadow: 0 0 10px rgba(169,120,31,.35);
}
.nav-account-stack {
  border: 1px solid #2a2419;
  border-radius: 14px;
  padding: 3px;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #4a4030 transparent;
}
.nav-account-stack::-webkit-scrollbar { width: 4px; }
.nav-account-stack::-webkit-scrollbar-thumb { background: #4a4030; border-radius: 4px; }
.nav-account-stack::-webkit-scrollbar-track { background: transparent; }
/* Accordéon des 4 cartes : au survol/focus à la souris… */
@media (hover: hover) and (pointer: fine) {
  .nav-account-stack { display: flex; flex-direction: column; }
  .nav-account-stack .nav-menu-card {
    max-height: 56px;
    overflow: hidden;
    transition: max-height .45s cubic-bezier(.22,.8,.32,1), box-shadow .35s ease;
  }
  .nav-account-stack .nav-menu-card:not(:first-child) { border-top: 1px solid #2a2419; }
  .nav-account-stack .nav-menu-card:hover,
  .nav-account-stack .nav-menu-card:focus-within {
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 10px 22px rgba(0,0,0,.35);
  }
}
/* … et au toucher (tap sur l'en-tête d'une carte, une seule ouverte à la fois — classe is-open
   posée par naomi-nav.js). Correctif du 04/09/2026 déjà présent sur index/mon-compte/
   creer-video, désormais commun à toutes les pages. */
@media (hover: none) {
  .nav-account-stack {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .nav-account-stack .nav-menu-card {
    display: block !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    max-height: 56px;
    overflow: hidden;
    transition: max-height .45s cubic-bezier(.22,.8,.32,1), box-shadow .35s ease;
  }
  .nav-account-stack .nav-card-header { cursor: pointer; }
  .nav-account-stack .nav-menu-card:not(:first-child) { border-top: 1px solid #2a2419; }
  .nav-account-stack .nav-menu-card.is-open {
    max-height: 2000px !important;
    overflow-y: visible;
    box-shadow: 0 10px 22px rgba(0,0,0,.35);
  }
}

/* --- Vignettes (Accueil, FAQ, Protection des contenus, Une amélioration, Parrainage) --- */
.nav-panel .hero-feature { max-width: none; width: 100%; box-sizing: border-box; }
.nav-panel .hero-feature-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.nav-panel .hero-feature-icon {
  width: 38px; height: 38px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 10px;
  background: #000000;
  border: 1px solid var(--border, #232a38);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold, #e8a33d);
}
.nav-panel .hero-feature-icon svg { width: 18px; height: 18px; }
.nav-panel .hero-feature-icon-logo { font-family: 'Fraunces', serif; font-weight: 700; font-size: 15px; }
.nav-panel .hero-feature h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 14px;
  margin: 0;
  color: var(--ink, #e8e6df);
}
.nav-panel .hero-feature p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted, #8b93a3);
  margin: 0;
  margin-left: 50px;
}
.nav-panel a.hero-feature { text-decoration: none; color: inherit; display: block; }
.nav-feature-list {
  padding: 12px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-feature-list .hero-feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: linear-gradient(#16140F, #16140F) padding-box, linear-gradient(135deg, #fff6d5 0%, #f4c368 35%, #c98f2e 70%, #6b4a15 100%) border-box;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.nav-feature-list .hero-feature:hover, .nav-feature-list .hero-feature:focus-visible {
  border-color: rgba(232,163,61,.5);
  background: rgba(232,163,61,.045);
}
.nav-feature-list .hero-feature-head { width: 100%; margin-bottom: 0; }
.nav-feature-list .hero-feature-icon { width: 32px; height: 32px; flex: 0 0 32px; border-color: rgba(232,163,61,.35); }
.nav-feature-list .hero-feature h3 { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13.5px; color: #ffffff; }
.nav-feature-list .hero-feature p {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0 0 0 46px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted, #8b93a3);
  transition: max-height .35s ease, opacity .3s ease .05s, margin-top .35s ease;
}
.nav-feature-list .hero-feature:hover p, .nav-feature-list .hero-feature:focus-visible p {
  max-height: 120px;
  opacity: 1;
  margin-top: 6px;
}
.nav-divider { height: 1px; flex-shrink: 0; background: #2e2818; margin: 8px 12px 0; }
.nav-divider--gold { background: linear-gradient(90deg, transparent, rgba(232,163,61,.6), transparent); margin: 10px 12px; height: 1px; }
.nav-help-card {
  margin: 10px 8px 0;
  padding: 11px 10px 10px;
  border: 1.5px solid transparent;
  border-radius: 11px;
  background: linear-gradient(#16140F, #16140F) padding-box, linear-gradient(135deg, #fff6d5 0%, #f4c368 35%, #c98f2e 70%, #6b4a15 100%) border-box;
}
.nav-help-title { display: flex; align-items: center; gap: 8px; color: #f0b348; font-size: 12px; font-weight: 700; }
.nav-help-icon { color: #f0b348; font-size: 12px; }
.nav-help-sub { margin: 3px 0 9px 0; color: #968c78; font-size: 11px; }
.nav-help-btn {
  min-height: 32px; padding: 6px 9px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid rgba(232,163,61,.45); border-radius: 8px;
  background: rgba(232,163,61,.045); color: #e8a33d;
  text-decoration: none; font-size: 11px; font-weight: 700;
}
.nav-help-btn:hover { background: rgba(232,163,61,.10); border-color: #e8a33d; }

/* --- Rappel "Sauvegarder mes créations" intégré à la carte "Mon espace" (naomi-folder.js,
   option inline) : jamais flottant, jamais superposé au contenu. Masqué tant qu'il est vide. --- */
#navSaveReminderSlot[hidden], #navSaveReminderSlot:empty { display: none !important; }
#navSaveReminderSlot #naomiSaveReminder {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  box-sizing: border-box;
  width: 100%;
  margin: 8px 0 12px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
}

/* --- Flèche de réaffichage (menu replié sur grand écran, modes overlay/push) --- */
.nav-reopen-btn {
  display: none;
  position: fixed;
  top: 22px;
  left: 18px;
  z-index: 146;
  width: 42px; height: 42px;
  padding: 0;
  border-radius: 10px;
  background: var(--panel-2, #171c27);
  border: 1px solid var(--gold, #e8a33d);
  color: var(--gold, #e8a33d);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
.nav-reopen-btn:hover { box-shadow: 0 0 0 3px rgba(232,163,61,.28); }

/* --- Modes overlay et push : menu affiché par défaut à partir de 861px --- */
@media (min-width: 861px) {
  html.nn-mode-overlay .nav-toggle,
  html.nn-mode-push .nav-toggle { display: none; }
  html.nn-mode-overlay #navOverlay,
  html.nn-mode-push #navOverlay { display: none !important; }
  html.nn-mode-overlay .nav-panel,
  html.nn-mode-push .nav-panel { transform: translateX(0); }
  html.nn-mode-overlay body.nav-desktop-collapsed .nav-panel,
  html.nn-mode-push body.nav-desktop-collapsed .nav-panel { transform: translateX(-100%); }
  html.nn-mode-overlay body.nav-desktop-collapsed .nav-reopen-btn,
  html.nn-mode-push body.nav-desktop-collapsed .nav-reopen-btn { display: flex; }
  html.nn-mode-push body { padding-left: 292px; transition: padding-left 0.2s ease; }
  html.nn-mode-push .nav-panel { box-shadow: none; }
  html.nn-mode-push body.nav-desktop-collapsed { padding-left: 0; }
}

/* --- Mode rail (assistant.html) --- */
.nav-rail {
  display: none;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 56px;
  background: #000000;
  border-right: 1px solid #241f14;
  z-index: 146;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 14px;
  box-sizing: border-box;
}
.nav-rail-logo {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #a9781f 0%, #f4c368 35%, #fff6d5 55%, #e8a33d 80%, #a9781f 100%);
  color: #1a1305; font-family: 'Fraunces', serif; font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.nav-rail-toggle {
  width: 32px; height: 32px; border-radius: 8px; padding: 0;
  background: none; border: 1px solid var(--border, #332c1c); color: var(--ink, #ffffff);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; line-height: 1; transition: border-color .15s, color .15s;
}
.nav-rail-toggle:hover, .nav-rail-toggle:focus-visible { border-color: var(--gold, #e8a33d); color: var(--gold, #e8a33d); background: none; filter: none; }
.nav-rail-toggle[aria-expanded="true"] { border-color: var(--gold, #e8a33d); color: var(--gold, #e8a33d); }
html.nn-mode-rail .nav-panel { width: 300px; }
@media (min-width: 1101px) {
  html.nn-mode-rail body { padding-left: 56px; }
  html.nn-mode-rail .nav-rail { display: flex; }
  html.nn-mode-rail #navToggleBtn { display: none !important; }
}
/* Le rail disparaît tant que le panneau est ouvert (il en masquait le coin supérieur gauche). */
html.nn-mode-rail body.nav-panel-open .nav-rail { display: none !important; }

/* --- Page intégrée (iframe ou ?embed=1) : aucun menu ni espace réservé --- */
html.naomi-nav-embedded body { padding-left: 0 !important; }
html.naomi-nav-embedded .nav-toggle,
html.naomi-nav-embedded #navToggleBtn,
html.naomi-nav-embedded #navOverlay,
html.naomi-nav-embedded .nav-reopen-btn,
html.naomi-nav-embedded .nav-rail,
html.naomi-nav-embedded #navPanel { display: none !important; }
