/* ============================================================
   STORYBUL — NAVBAR + FOOTER PARTAGÉS
   Utilisée par toutes les pages du site
   ============================================================ */

/* ─── FOOTER COMMUN ─── */
footer.site-footer {
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 0 48px;
  height: 44px;
  display: flex;
  align-items: center;
  margin-top: auto;
}
.footer-inner {
  width: 100%; max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a {
  font-size: 11px; color: rgba(100,70,40,.75);
  text-decoration: none; transition: color .15s;
}
.footer-links a:hover { color: rgba(80,50,25,1); }
.footer-copy { font-size: 11px; color: rgba(100,70,40,.55); }
@media (max-width: 767px) {
  footer.site-footer { padding: 16px 24px; height: auto; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
}

/* Variables si non définies par la page hôte */
:root {
  --sb-ink:        #111827;
  --sb-ink-soft:   #6B7280;
  --sb-vert:       #059669;
  --sb-orange:     #FF6B4A;
  --sb-orange-fonce: #E55339;
  --sb-rose:       #F48F82;
}

/* ── Barre de navigation ── */
.main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 251, 243, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

/* ── Logo ── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 20px;
}
.logo-icon {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 10px;
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: #059669;
  letter-spacing: -0.5px;
  display: inline-block;
}
.logo-text .u { color: var(--sb-rose); }

/* ── CTA navbar ── */
.nav-cta {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #FF6B4A 0%, #E55339 100%);
  color: white;
  padding: 12px 40px;
  border-radius: 100px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px -2px rgba(255, 107, 74, 0.45);
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -4px rgba(255, 107, 74, 0.55);
}
.nav-cta-full  { display: inline; }
.nav-cta-short { display: none; }

/* ── Burger (mobile) ── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: rgba(17, 24, 39, 0.06);
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 10px;
  transition: background .2s;
}
.nav-burger:hover { background: rgba(17, 24, 39, 0.12); }
.nav-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #111827;
  transition: transform .3s, opacity .2s, width .3s;
}
.nav-burger span:nth-child(3) { width: 65%; }

/* ── Gauche / Droite (desktop) ── */
.nav-left  { display: flex; align-items: center; }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-links     { display: none; }
.nav-connexion { display: none; }

/* ── Dropdowns : cachés par défaut (tous écrans) ── */
.nb-dd         { display: none; }
.nb-dd-overlay { display: none; }

/* ── Overlay menu ── */
.sb-menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(160deg, #1a2744 0%, #0d1627 100%);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s cubic-bezier(.4, 0, .2, 1);
}
.sb-menu-overlay.sb-open { opacity: 1; pointer-events: all; }

.sb-menu-inner {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 0 28px;
  overflow: hidden;
}
.sb-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  flex-shrink: 0;
}
.sb-menu-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: -0.4px;
}
.sb-menu-logo-text { color: #fff; }
.sb-menu-logo-text span { color: var(--sb-rose); }
.sb-menu-close {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none; color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.sb-menu-close:hover { background: rgba(255, 255, 255, 0.18); }

.sb-menu-nav {
  flex: 1;
  min-height: 0;
  padding: 12px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sb-menu-nav::-webkit-scrollbar { display: none; }
.sb-menu-group-lbl {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .3);
  padding: 14px 0 6px;
}
.sb-menu-group-sep {
  height: 1px;
  background: rgba(255, 255, 255, .08);
  margin: 8px 0;
}
.sb-menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
  transition: gap .2s;
}
.sb-menu-item:last-child { border-bottom: none; }
.sb-menu-item:hover { gap: 22px; }
.sb-num {
  font-size: 11px; font-weight: 700;
  color: rgba(255, 255, 255, 0.28);
  width: 22px; flex-shrink: 0;
}
.sb-lbl {
  font-size: 22px; font-weight: 800;
  color: #fff; letter-spacing: -0.3px;
}
.sb-menu-item.sb-active .sb-lbl { color: #34D399; }
.sb-menu-item.sb-active .sb-num { color: #34D399; opacity: .6; }

/* Cascade d'entrée */
.sb-menu-overlay.sb-open .sb-menu-item { animation: sbItemIn .4s cubic-bezier(.4,0,.2,1) both; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(1) { animation-delay: .05s; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(2) { animation-delay: .10s; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(3) { animation-delay: .15s; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(4) { animation-delay: .20s; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(5) { animation-delay: .25s; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(6) { animation-delay: .30s; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(7) { animation-delay: .35s; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(8)  { animation-delay: .40s; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(9)  { animation-delay: .45s; }
.sb-menu-overlay.sb-open .sb-menu-item:nth-child(10) { animation-delay: .50s; }
@keyframes sbItemIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sb-menu-bottom { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; padding: 12px 0 36px; }

.sb-menu-connexion {
  display: block; text-align: center;
  color: #fff; text-decoration: none;
  font-weight: 800; font-size: 15px; padding: 16px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, #FF6B4A 0%, #E55339 100%);
  box-shadow: 0 8px 28px rgba(255, 107, 74, 0.4);
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}
.sb-menu-connexion:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 107, 74, 0.55);
}
.sb-menu-overlay.sb-open .sb-menu-connexion { animation: sbItemIn .4s cubic-bezier(.4,0,.2,1) .35s both; }
.sb-menu-overlay.sb-open .sb-menu-cta      { animation: sbItemIn .4s cubic-bezier(.4,0,.2,1) .42s both; }

.sb-menu-cta {
  display: block;
  background: linear-gradient(135deg, #FF6B4A 0%, #E55339 100%);
  color: #fff; text-align: center;
  font-weight: 800; font-size: 15px; padding: 16px;
  border-radius: 18px; text-decoration: none;
  box-shadow: 0 8px 28px rgba(255, 107, 74, 0.4);
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}
.sb-menu-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 107, 74, 0.55);
}

/* ── Page génération : swap CTA orange → bouton "Se connecter" ── */
.nav-cta-generate { display: none !important; }
.page-generate .nav-cta { display: none !important; }
.page-generate .nav-cta-generate {
  display: inline-flex !important;
  background: linear-gradient(135deg, #FF6B4A 0%, #E55339 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 12px -2px rgba(255,107,74,0.45);
  padding: 9px 20px;
  font-size: 13px;
}
.page-generate .nav-cta-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -4px rgba(255,107,74,0.55);
}

/* ── Mobile ── */
@media (max-width: 767px) {
  /* Forcer nav-right visible même si style.css global le cache avec !important */
  .main-nav .nav-right { display: flex !important; }
  .nav-burger   { display: flex !important; }
  .nav-cta-full { display: none; }
  .nav-cta-short{ display: inline; }
  .nav-cta      { padding: 9px 28px; font-size: 13px; }
}

/* ── Desktop ── */
@media (min-width: 768px) {
  .main-nav {
    height: 64px;
    padding: 0 2.5rem !important;
  }
  .nav-burger      { display: none !important; }
  .sb-menu-overlay { display: none !important; }

  .nav-left { gap: 8px; }

  /* ── Liens desktop : maintenant des boutons dropdown ── */
  .nav-links {
    display: flex;
    align-items: center;
    gap: .1rem;
    flex: 1;
    justify-content: center;
  }

  /* Bouton trigger dropdown */
  .nb-dd-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    background: transparent;
    border: none;
    padding: .45rem .85rem;
    border-radius: .6rem;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: background .15s, color .15s;
    user-select: none;
  }
  .nb-dd-btn:hover,
  .nb-dd-btn.nb-open { background: #f3f4f6; color: #1a1a2e; }

  .nb-chev {
    font-size: .6rem;
    opacity: .45;
    transition: transform .2s;
    display: inline-block;
    margin-left: .05rem;
  }
  .nb-dd-btn.nb-open .nb-chev { transform: rotate(180deg); opacity: .7; }

  .nav-connexion {
    display: inline-flex;
    align-items: center;
    color: var(--sb-ink);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 100px;
    border: 1.5px solid rgba(17, 24, 39, 0.14);
    background: transparent;
    transition: background .18s, border-color .18s;
    white-space: nowrap;
    cursor: pointer;
  }
  .nav-connexion:hover {
    background: rgba(17, 24, 39, 0.04);
    border-color: rgba(17, 24, 39, 0.24);
  }

  .nav-cta      { padding: 10px 20px; font-size: 1rem; }
  .nav-cta-full { display: inline; }
  .nav-cta-short{ display: none; }

  .logo-icon { width: 36px !important; height: 36px !important; }
  .logo-text { font-size: 1.2rem; }
}

/* ══════════════════════════════════════════
   DROPDOWNS PLEINE LARGEUR — VARIANTE A3
   (desktop uniquement, position:fixed)
══════════════════════════════════════════ */
@media (min-width: 768px) {

  /* Overlay sombre derrière les dropdowns */
  .nb-dd-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .18);
    z-index: 9998;
  }
  .nb-dd-overlay.nb-open { display: block; }

  /* Panneau dropdown */
  .nb-dd {
    position: fixed;
    left: 0; right: 0;
    top: 64px; /* hauteur de la navbar */
    background: #fff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 2px solid #f3f4f6;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .1);
    z-index: 9999;
    display: none;
  }
  .nb-dd.nb-open { display: block; }

  /* Contenu intérieur (même padding que la navbar) */
  .nb-dd-inner {
    padding: 1.35rem 2.5rem 1.5rem;
  }
  .nb-dd-inner--chips {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: .55rem;
  }

  /* ── Cards riches (Mon espace) ── */
  .nb-dd-cards {
    display: flex;
    gap: .85rem;
    align-items: stretch;
  }
  .nb-dd-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .8rem 1rem;
    border-radius: .9rem;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    transition: all .2s;
  }
  .nb-dd-card:hover {
    border-color: #FF6B4A;
    background: #fffaf9;
    box-shadow: 0 2px 14px rgba(255, 107, 74, .12);
  }
  .nb-dd-card-icon {
    width: 46px; height: 46px;
    border-radius: .7rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
  }
  .nb-dd-card-label {
    font-size: 1rem;
    font-weight: 900;
    color: #1a1a2e;
    line-height: 1.2;
  }
  .nb-dd-card-sub {
    font-size: .88rem;
    color: #9ca3af;
    font-weight: 600;
    margin-top: .18rem;
    line-height: 1.4;
  }

  /* ── Chips légers (Découvrir) ── */
  .nb-dd-chip {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem 1.1rem;
    border-radius: .75rem;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    transition: all .15s;
    white-space: nowrap;
  }
  .nb-dd-chip:hover { border-color: #FF6B4A; background: #fffaf9; }
  .nb-dd-chip-icon  { font-size: 1.2rem; flex-shrink: 0; }
  .nb-dd-chip-label { font-size: 1rem; font-weight: 800; color: #1a1a2e; }
  .nb-dd-chip-sub   { font-size: .85rem; color: #9ca3af; font-weight: 600; margin-top: .1rem; }

  /* ── Tout Storybul : 2 lignes ── */
  .nb-dd-ts-title {
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #c4b5a5;
    margin-bottom: .55rem;
  }
  .nb-dd-ts-row1 { margin-bottom: .85rem; }
  .nb-dd-ts-row2 {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    border-top: 1.5px solid #f3f4f6;
    padding-top: .8rem;
  }
  .nb-dd-ts-group { display: flex; flex-direction: column; }
  .nb-dd-ts-chips { display: flex; gap: .5rem; margin-top: .5rem; }
  .nb-dd-ts-sep   { width: 1px; background: #f3f4f6; align-self: stretch; flex-shrink: 0; }
  .nb-dd-ts-spacer { flex: 1; }

  /* Cards réduites pour Tout Storybul */
  .nb-dd-card-sm {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .85rem;
    border-radius: .8rem;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    transition: all .2s;
  }
  .nb-dd-card-sm:hover {
    border-color: #FF6B4A;
    background: #fffaf9;
    box-shadow: 0 2px 10px rgba(255, 107, 74, .1);
  }
  .nb-dd-card-sm-icon {
    width: 38px; height: 38px;
    border-radius: .6rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
  }
  .nb-dd-card-sm-label { font-size: .95rem; font-weight: 900; color: #1a1a2e; line-height: 1.2; }
  .nb-dd-card-sm-sub   { font-size: .82rem; color: #9ca3af; font-weight: 600; margin-top: .12rem; }

  /* Chips compacts pour Tout Storybul */
  .nb-dd-chip-sm {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .9rem;
    border-radius: .65rem;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    transition: all .15s;
    white-space: nowrap;
  }
  .nb-dd-chip-sm:hover { border-color: #FF6B4A; background: #fffaf9; }
  .nb-dd-chip-sm-icon  { font-size: 1.1rem; flex-shrink: 0; }
  .nb-dd-chip-sm-label { font-size: .95rem; font-weight: 800; color: #1a1a2e; }
}
