@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   LevelStream — Guide interactif
   Charte reprise du site iot-link.io
   ============================================================ */

:root {
  --navy:        #173d56;
  --navy-deep:   #0f2c40;
  --orange:      #ffa558;
  --orange-dark: #e88632;
  --btn-dark:    #1a2027;
  --blue:        #60a1c9;
  --blue-light:  #75beee;
  --text:        #3a4a5a;
  --muted:       #6a7886;
  --line:        #e4e9ee;
  --bg-soft:     #f4f7fa;
  --white:       #ffffff;
  --radius:      14px;
  --shadow:      0 14px 36px rgba(23, 61, 86, 0.12);
  --shadow-sm:   0 6px 18px rgba(23, 61, 86, 0.08);
  --maxw:        1200px;
  --font:        'Poppins', 'Segoe UI', Roboto, -apple-system, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-dark); text-decoration: none; }
a:hover { color: var(--orange); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.brandword .pfx { color: var(--blue); font-weight: 600; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 40px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: var(--white); border-color: var(--orange); }
.btn-primary:hover:not(:disabled) { background: var(--btn-dark); border-color: var(--btn-dark); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-outline:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.btn-lg { font-size: 1rem; padding: 15px 32px; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--orange-dark);
  margin-bottom: 12px;
}

/* ============================================================
   HEADER
   ============================================================ */
.g-header {
  background: var(--navy-deep);
  position: sticky;
  top: 0;
  z-index: 60;
}
.g-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
}
.g-logo img { height: 46px; width: auto; }
.g-header-title {
  color: #cddae3;
  font-weight: 600;
  font-size: 0.95rem;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}
.g-back {
  margin-left: auto;
  color: #9fb2c0;
  font-size: 0.88rem;
  font-weight: 600;
}
.g-back:hover { color: var(--white); }

/* ============================================================
   COVER
   ============================================================ */
.cover {
  background: linear-gradient(125deg, var(--navy-deep) 0%, var(--navy) 60%, #1f4f6e 100%);
  color: #cddae3;
  padding: 70px 0 78px;
}
.cover-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 26px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}
.cover h1 {
  color: var(--white);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.cover-lead { font-size: 1.06rem; color: #b9c8d3; margin-bottom: 28px; max-width: 540px; }
.cover-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cover-meta { font-size: 0.86rem; color: #8ba0b0; }
.cover-visual {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
}
.cover-visual img { margin: 0 auto; max-height: 320px; width: auto; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.5)); }

/* cartes chapitres dans la cover */
.cover-chapters {
  max-width: var(--maxw);
  margin: 46px auto 0;
  padding: 0 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.chap-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: background 0.18s ease, transform 0.15s ease;
  cursor: pointer;
}
.chap-card:hover { background: rgba(255, 255, 255, 0.11); transform: translateY(-3px); }
.chap-card .chap-tag {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--orange);
}
.chap-card h3 { color: var(--white); font-size: 1.05rem; margin: 8px 0 5px; }
.chap-card p { font-size: 0.85rem; color: #93a7b6; }

/* bandeau "contenu d'exemple" */
.demo-note {
  max-width: var(--maxw);
  margin: 26px auto 0;
  padding: 0 26px;
}
.demo-note-inner {
  background: rgba(255, 165, 88, 0.12);
  border: 1px solid rgba(255, 165, 88, 0.4);
  border-radius: 10px;
  padding: 13px 18px;
  font-size: 0.86rem;
  color: #f1d9c4;
}
.demo-note-inner strong { color: var(--orange); }

/* ============================================================
   GUIDE SHELL — sidebar + contenu
   ============================================================ */
.guide-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 26px 70px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 30px;
  align-items: start;
}

/* ---------- Sidebar ---------- */
.guide-sidebar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 22px;
  position: sticky;
  top: 90px;
}
.sidebar-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.progress-summary { margin-bottom: 22px; }
.progress-track {
  height: 8px;
  background: var(--bg-soft);
  border-radius: 8px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  border-radius: 8px;
  transition: width 0.4s ease;
}
.progress-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
  font-weight: 600;
}

.chapter-group { margin-bottom: 18px; }
.chapter-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.step-list { list-style: none; }
.step-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  transition: background 0.15s ease;
}
.step-link:hover { background: var(--bg-soft); }
.step-link.active { background: #fff3e8; color: var(--navy); font-weight: 700; }
.step-dot {
  width: 20px; height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--line);
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-link.active .step-dot { border-color: var(--orange); color: var(--orange-dark); }
.step-link.done .step-dot {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ---------- Contenu principal ---------- */
.guide-main {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.step-topbar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 14px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}
.step-topbar .step-counter { color: var(--orange-dark); }

.step-body { padding: 40px 34px 30px; }
.guide-step { display: none; }
.guide-step.is-active { display: block; animation: stepIn 0.35s ease; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-head h2 {
  color: var(--navy);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 6px 0 4px;
  letter-spacing: -0.3px;
}
.step-layout {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 34px;
  margin-top: 22px;
  align-items: start;
}
.step-layout.full { grid-template-columns: 1fr; }
.step-text p { margin-bottom: 14px; }
.step-text h3 { color: var(--navy); font-size: 1.05rem; margin: 20px 0 8px; }

.check-list { list-style: none; margin: 12px 0; }
.check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 10px;
}
.check-list li strong { color: var(--navy); }
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0; top: 3px;
  width: 21px; height: 21px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  line-height: 21px;
}

/* encadrés astuce / attention */
.callout {
  border-radius: 10px;
  padding: 14px 18px 14px 16px;
  margin: 18px 0;
  font-size: 0.92rem;
  border-left: 4px solid;
}
.callout strong { display: block; margin-bottom: 2px; }
.callout.tip { background: #fff3e8; border-color: var(--orange); }
.callout.tip strong { color: var(--orange-dark); }
.callout.warn { background: #eef5fa; border-color: var(--blue); }
.callout.warn strong { color: var(--navy); }

/* zone illustration */
.step-illu {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.step-illu img { margin: 0 auto; max-height: 290px; width: auto; }
.illu-placeholder {
  border: 2px dashed #c4d2dd;
  border-radius: 12px;
  padding: 46px 22px;
  color: var(--muted);
}
.illu-placeholder .illu-num {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--orange);
  color: var(--orange-dark);
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.illu-placeholder span { font-size: 0.85rem; }
.illu-caption { font-size: 0.8rem; color: var(--muted); margin-top: 12px; }

/* ---------- pied de navigation ---------- */
.step-nav {
  border-top: 1px solid var(--line);
  padding: 20px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
}

/* écran final */
.finish-card { text-align: center; padding: 30px 0 10px; }
.finish-badge {
  width: 84px; height: 84px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2.4rem;
  font-weight: 800;
}
.finish-card h2 { font-size: 1.8rem; }
.finish-card p { max-width: 560px; margin: 12px auto 0; color: var(--muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.g-footer {
  background: var(--navy-deep);
  color: #76899a;
  text-align: center;
  padding: 28px 26px;
  font-size: 0.85rem;
}
.g-footer a { color: #9fb2c0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .cover-grid { grid-template-columns: 1fr; gap: 30px; }
  .cover-visual { order: -1; }
  .cover-chapters { grid-template-columns: 1fr 1fr; }
  .guide-shell { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
  .step-layout { grid-template-columns: 1fr; }
  .cover h1 { font-size: 2.05rem; }
}
@media (max-width: 560px) {
  .cover-chapters { grid-template-columns: 1fr; }
  .g-header-title { display: none; }
  .step-body { padding: 28px 20px; }
  .step-topbar, .step-nav { padding-left: 20px; padding-right: 20px; }
  .step-nav .btn { padding: 12px 18px; font-size: 0.85rem; }
}
