/* ============================================
   NUMÉRAL LIVRET — FRONT PREMIUM
   Charte : #00104E / #021C5F / #FBD21C / #FFF
   ============================================ */
.nl-book {
  --navy: #00104E;
  --navy-2: #021C5F;
  --yellow: #FBD21C;
  --yellow-soft: #fff6d6;
  --ink: #00104E;
  --muted: #5a6b85;
  --line: #e6eaf2;
  --bg-soft: #f5f7fb;
  --radius: 20px;
  --shadow-sm: 0 1px 3px rgba(0,16,78,.06);
  --shadow-md: 0 4px 24px rgba(0,16,78,.10);
  --shadow-lg: 0 12px 48px rgba(0,16,78,.16);
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  line-height: 1.6;
}
.nl-book * { box-sizing: border-box; }

/* ADMIN BANNER */
.nl-book .nl-admin-preview-banner {
  background: var(--yellow-soft);
  border: 1px solid var(--yellow);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 600;
  color: #8a6d00;
}

/* ============ HERO ============ */
.nl-book .nl-hero {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(120% 140% at 88% 6%, rgba(251,210,28,.16) 0%, transparent 42%),
    radial-gradient(120% 120% at 0% 100%, rgba(255,255,255,.07) 0%, transparent 46%),
    linear-gradient(135deg, #001a6e 0%, var(--navy) 52%, #000a30 100%);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius);
  padding: 52px 48px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
/* texture pointillée subtile */
.nl-book .nl-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(130% 100% at 82% 0%, #000 0%, transparent 68%);
  mask-image: radial-gradient(130% 100% at 82% 0%, #000 0%, transparent 68%);
  z-index: -1;
}
/* halo lumineux jaune */
.nl-book .nl-hero::after {
  content: '';
  position: absolute;
  top: -130px; right: -90px;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(251,210,28,.22), transparent 68%);
  border-radius: 50%;
  z-index: -1;
}
.nl-book .nl-hero-main { position: relative; z-index: 1; flex: 1; min-width: 0; }

.nl-book .nl-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--yellow);
  background: rgba(251,210,28,.10);
  border: 1px solid rgba(251,210,28,.30);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 22px;
}
.nl-book .nl-kicker-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(251,210,28,.22);
}
.nl-book .nl-hero h1 {
  margin: 0 0 16px;
  line-height: 1.06;
  letter-spacing: -.02em;
  display: flex;
  flex-direction: column;
}
.nl-book .nl-hero-hello {
  font-size: 19px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  -webkit-text-fill-color: rgba(255,255,255,.7);
  letter-spacing: .01em;
  margin-bottom: 4px;
}
.nl-book .nl-hero-name {
  font-size: 44px;
  font-weight: 800;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}
.nl-book .nl-hero-main > p {
  font-size: 15px;
  color: rgba(255,255,255,.78);
  margin: 0;
  max-width: 460px;
  line-height: 1.65;
}

/* bloc méta à droite */
.nl-book .nl-hero-meta {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  padding: 6px;
  backdrop-filter: blur(6px);
}
.nl-book .nl-meta-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 22px;
  border-radius: 11px;
}
.nl-book .nl-meta-item + .nl-meta-item {
  border-top: 1px solid rgba(255,255,255,.09);
}
.nl-book .nl-meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--yellow);
}
.nl-book .nl-meta-value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

/* ============ PROGRESS BAR (interactif) ============ */
.nl-progress-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.nl-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.nl-progress-head strong { font-size: 14px; color: var(--navy); font-weight: 700; }
.nl-progress-head span { font-size: 13px; color: var(--muted); font-weight: 600; }
.nl-progress-track {
  height: 10px;
  background: var(--bg-soft);
  border-radius: 20px;
  overflow: hidden;
}
.nl-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  border-radius: 20px;
  width: 0;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* ============ SECTIONS ============ */
.nl-book .nl-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s;
}
.nl-book .nl-section:hover { box-shadow: var(--shadow-md); }
.nl-book .nl-section h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg-soft);
  letter-spacing: -.01em;
  position: relative;
}
.nl-book .nl-section h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 48px; height: 3px;
  background: var(--yellow);
  border-radius: 2px;
}

/* ============ TEAM ============ */
.nl-book .nl-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 14px;
  align-items: stretch;
}
.nl-book .nl-person {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  align-items: center;
  height: 100%;
}
.nl-book .nl-person:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--yellow);
  background: #fff;
}
.nl-book .nl-person img,
.nl-book .nl-person-avatar {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  object-fit: cover !important;
  aspect-ratio: 1 / 1 !important;
}
.nl-book .nl-person img {
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,16,78,.18);
}
.nl-book .nl-person-avatar {
  background: linear-gradient(135deg, var(--navy), var(--navy-2)) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0,16,78,.22);
}
.nl-book .nl-person > div { flex: 1; min-width: 0; }
.nl-book .nl-person span {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--yellow);
  padding: 3px 11px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.nl-book .nl-person h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 0 0 3px; }
.nl-book .nl-person > div > p { font-size: 13px; color: var(--muted); margin: 0 0 8px; padding-bottom: 0; }
.nl-book .nl-person .nl-contact {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  padding-top: 0;
  border-top: none;
}
.nl-book .nl-person .nl-contact a { color: var(--navy-2); text-decoration: none; font-weight: 600; }
.nl-book .nl-person .nl-contact a:hover { text-decoration: underline; }

/* ============ ABOUT / PILLS ============ */
.nl-book .nl-about p { font-size: 15px; color: var(--muted); margin: 0 0 20px; }
.nl-book .nl-pill-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.nl-book .nl-pill-grid span {
  background: var(--bg-soft);
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  transition: transform .2s, background .2s, color .2s;
  cursor: default;
}
.nl-book .nl-pill-grid span:hover {
  transform: translateY(-2px);
  background: var(--yellow);
  color: var(--navy);
  border-color: var(--yellow);
}

/* ============ INFO DOSSIER ============ */
.nl-book .nl-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.nl-book .nl-info-grid > div {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color .2s, background .2s, transform .2s;
}
.nl-book .nl-info-grid > div:hover {
  border-color: var(--yellow);
  background: #fff;
  transform: translateY(-2px);
}
.nl-book .nl-info-grid span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.nl-book .nl-info-grid strong { display: block; font-size: 15px; font-weight: 600; color: var(--navy); word-break: break-word; }

/* ============ MISSIONS ============ */
.nl-book .nl-mission-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 14px; }
.nl-book .nl-mission-list article {
  position: relative;
  padding: 18px 20px 18px 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.nl-book .nl-mission-list article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--yellow);
}
.nl-book .nl-mission-list article::before {
  content: '✓';
  position: absolute;
  left: 16px; top: 18px;
  width: 24px; height: 24px;
  background: var(--navy);
  color: var(--yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.nl-book .nl-mission-list strong { display: block; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.nl-book .nl-mission-list p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ============ TOOLS ============ */
.nl-book .nl-tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.nl-book .nl-tool-grid > div {
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--bg-soft), #fff);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  border-top: 3px solid var(--yellow);
}
.nl-book .nl-tool-grid > div:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.nl-book .nl-tool-grid strong { display: block; font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.nl-book .nl-tool-grid p { font-size: 13px; color: var(--muted); margin: 0; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .nl-book .nl-hero { flex-direction: column; align-items: flex-start; padding: 34px 26px; gap: 26px; }
  .nl-book .nl-hero-name { font-size: 32px; }
  .nl-book .nl-hero-meta { width: 100%; flex-direction: row; }
  .nl-book .nl-meta-item { flex: 1; }
  .nl-book .nl-meta-item + .nl-meta-item { border-top: none; border-left: 1px solid rgba(255,255,255,.09); }
  .nl-book .nl-section { padding: 24px 20px; }
  .nl-book .nl-team-grid { grid-template-columns: 1fr; }
  .nl-book .nl-mission-list { grid-template-columns: 1fr; }
  .nl-book .nl-info-grid { grid-template-columns: 1fr 1fr; }
  .nl-book .nl-tool-grid { grid-template-columns: 1fr; }
  .nl-book .nl-person .nl-contact { overflow-wrap: anywhere; word-break: break-word; }
}
@media (max-width: 480px) {
  .nl-book .nl-info-grid { grid-template-columns: 1fr; }
  .nl-book .nl-hero { padding: 28px 22px; }
  .nl-book .nl-hero-name { font-size: 28px; }
  .nl-book .nl-hero-meta { flex-direction: column; }
  .nl-book .nl-meta-item + .nl-meta-item { border-left: none; border-top: 1px solid rgba(255,255,255,.09); }
  .nl-front { padding: 40px 16px; }
  .nl-auth-card { padding: 34px 24px 30px; border-radius: 20px; }
  .nl-auth-card h1 { font-size: 21px; }
}

/* ============ PAGE CONNEXION (AUTH) ============ */
.nl-front {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.nl-front * { box-sizing: border-box; }

.nl-auth-card {
  background: #fff;
  border-radius: 24px;
  padding: 42px 38px 38px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 18px 50px rgba(0,16,78,.13);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.nl-auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, #00104E 0%, #021C5F 55%, #FBD21C 100%);
}
.nl-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #00104E;
  background: rgba(251,210,28,.18);
  border: 1px solid rgba(251,210,28,.55);
  padding: 6px 13px;
  border-radius: 999px;
  margin: 0 0 18px;
}
.nl-auth-badge svg { width: 13px; height: 13px; }
.nl-logo-img {
  display: block;
  max-width: 166px;
  height: auto;
  margin: 0 auto 20px;
}
.nl-auth-icon {
  width: 58px; height: 58px;
  margin: 4px auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,16,78,.06);
  color: #00104E;
}
.nl-auth-icon svg { width: 27px; height: 27px; }
.nl-auth-card h1 {
  font-size: 23px;
  font-weight: 800;
  color: #00104E;
  margin: 0 0 12px;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.nl-auth-card .nl-muted {
  font-size: 14px;
  color: #5a6b85;
  margin: 0 0 26px;
  line-height: 1.6;
}
.nl-front-form { display: flex; flex-direction: column; gap: 6px; }
.nl-front-form label {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #5a6b85;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}
.nl-front-form input {
  width: 100%;
  height: 52px;
  border: 1.5px solid #d8e0ec;
  border-radius: 13px;
  padding: 0 16px;
  font-size: 16px;
  color: #00104E;
  text-align: center;
  background: #fafbfd;
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-family: inherit;
}
.nl-front-form input::placeholder { color: #aab4c6; font-weight: 500; letter-spacing: normal; }
.nl-front-form input:focus {
  outline: none;
  border-color: #00104E;
  box-shadow: 0 0 0 4px rgba(0,16,78,.10);
  background: #fff;
}
.nl-front-form input[name="code"] {
  letter-spacing: 10px;
  font-size: 26px;
  font-weight: 800;
  padding-left: 26px;
}
.nl-front-form button {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #001a6e, #00104E);
  color: #fff;
  border: none;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s;
  font-family: inherit;
  margin-top: 4px;
}
.nl-front-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,16,78,.32);
  filter: brightness(1.06);
}
.nl-front-form button:active { transform: translateY(0); }
.nl-link-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eef1f6;
}
.nl-link-form button {
  background: none;
  border: none;
  color: #021C5F;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.nl-link-form button:hover { color: #00104E; }
.nl-front-alert {
  border-radius: 13px;
  padding: 13px 18px;
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 22px;
  text-align: center;
  line-height: 1.5;
}
.nl-front-alert.error {
  background: #fdecec;
  color: #c0392b;
  border: 1px solid #f3b6b0;
}
.nl-front-alert.success {
  background: #e8f5ef;
  color: #1a7a55;
  border: 1px solid #b3e0c8;
}

/* ============ BOUTON TÉLÉCHARGER PDF ============ */
.nl-book .nl-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.nl-book .nl-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--navy);
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.nl-book .nl-pdf-btn svg { display: block; }
.nl-book .nl-pdf-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.04);
}
.nl-book .nl-pdf-btn:active { transform: translateY(0); }

/* ============ IMPRESSION / EXPORT PDF ============ */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; }
  .nl-book {
    max-width: none;
    margin: 0;
    padding: 0;
    font-size: 11.5px;
    line-height: 1.5;
  }
  /* Masquer l'interface non imprimable */
  .nl-book .nl-actions,
  .nl-book .nl-admin-preview-banner { display: none !important; }

  /* Forcer le rendu des couleurs de marque */
  .nl-book *,
  .nl-book .nl-hero {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .nl-book .nl-hero {
    box-shadow: none;
    padding: 30px 34px;
    margin-bottom: 20px;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .nl-book .nl-hero-name { font-size: 32px; }

  /* Ne pas couper les blocs en plein milieu */
  .nl-book .nl-section,
  .nl-book .nl-person,
  .nl-book .nl-mission-list article,
  .nl-book .nl-tool-grid > div,
  .nl-book .nl-info-grid > div {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .nl-book .nl-section { margin-bottom: 18px; }
  .nl-book h2 { page-break-after: avoid; }
}
