*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #EDF5FC;
  --bg2:        #D8EBF8;
  --sidebar:    #0D2D5E;
  --blue:       #1E70CB;
  --blue-dark:  #0B3070;
  --orange:     #F07020;
  --white:      #FFFFFF;
  --bubble-me:  #3A7ED8;
  --bubble-bot: #C0DAF0;
  --text:       #0A1E3C;
  --gray:       #4A6A88;
  --shadow-sm:  0 2px 10px rgba(10,30,60,.08);
  --shadow-md:  0 6px 24px rgba(10,30,60,.13);
  --shadow-lg:  0 16px 48px rgba(10,30,60,.2);
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #EDF5FC;
  background-image: linear-gradient(150deg, #E6F2FB 0%, #D4E8F8 60%, #E2EFF9 100%);
  background-attachment: fixed;
  color: var(--text);
}

/* ══════════════════════════════
   LAYOUT
══════════════════════════════ */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 165px;
  flex-shrink: 0;
  background: linear-gradient(175deg, #C4DAF0 0%, #B4CCE4 100%);
  display: flex;
  flex-direction: column;
  padding: 18px 10px 24px;
  gap: 8px;
  box-shadow: 4px 0 20px rgba(10,40,80,.12);
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  text-align: center;
  margin-bottom: 14px;
  padding: 8px 4px 16px;
  border-bottom: 1px solid rgba(255,255,255,.5);
}
.sidebar-logo img {
  width: 120px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  animation: logoFloat 4s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-7px) rotate(1deg); }
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.42);
  border: 1.5px solid rgba(255,255,255,.65);
  border-radius: 18px;
  padding: 14px 8px 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: .76rem;
  font-weight: 700;
  color: var(--blue-dark);
  transition: background .18s, color .15s, transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
  width: 100%;
  text-align: center;
}
.nav-btn:hover {
  background: rgba(255,255,255,.85);
  color: var(--blue-dark);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 22px rgba(10,40,80,.14);
}
.nav-btn.active {
  background: linear-gradient(135deg, var(--orange) 0%, #D85A10 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 22px rgba(240,112,32,.52);
  transform: none;
}
.nav-btn.active .nav-icon { background: rgba(255,255,255,.22) !important; }
.nav-icon {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.nav-btn:hover .nav-icon { transform: scale(1.18) rotate(-5deg); }

/* Couleur d'icône par section */
.sidebar > button:nth-of-type(1) .nav-icon { background: linear-gradient(135deg, #FFF0E6 0%, #FFDBBC 100%); }
.sidebar > button:nth-of-type(2) .nav-icon { background: linear-gradient(135deg, #E6F2FF 0%, #CCDAFF 100%); }
.sidebar > button:nth-of-type(3) .nav-icon { background: linear-gradient(135deg, #E6FFF2 0%, #CCFFE0 100%); }
.sidebar > button:nth-of-type(4) .nav-icon { background: linear-gradient(135deg, #FFF8E0 0%, #FFECB0 100%); }

/* ── CONTENT ── */
.content {
  flex: 1;
  overflow-y: auto;
}

/* ══════════════════════════════
   PAGE SYSTEM
══════════════════════════════ */
.page { display: none; }
.page.active { display: block; }

/* ══════════════════════════════
   PAGE ACCUEIL
══════════════════════════════ */
.accueil-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 5vw;
}
.accueil-card {
  background: transparent;
  max-width: 680px;
  width: 100%;
  text-align: center;
}
.accueil-card h1 {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.15;
  margin-bottom: 10px;
}
.accueil-card h1 span { color: var(--orange); }
.accueil-tagline {
  font-size: .82rem;
  color: var(--orange);
  font-style: italic;
  margin-bottom: 22px;
  letter-spacing: .01em;
}
.accueil-intro {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 28px;
  text-align: center;
}
.accueil-list {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin-bottom: 32px;
  width: 100%;
}
.accueil-list li {
  font-size: 1rem;
  font-weight: 500;
  color: var(--blue-dark);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 14px 20px;
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, border-color .15s;
  border: 1.5px solid rgba(255,255,255,.65);
}
.accueil-list li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--orange);
}
.accueil-list li .arrow { color: var(--orange); font-size: 1.1rem; flex-shrink: 0; }
.accueil-list li strong { color: var(--orange); font-weight: 700; }
.accueil-slogan {
  font-size: .95rem;
  color: var(--orange);
  font-weight: 600;
  font-style: italic;
  margin-bottom: 28px;
}
.accueil-btn {
  display: inline-block;
  background: linear-gradient(135deg, #F07020 0%, #D85A10 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 44px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  animation: ctaPulse 3s ease-in-out infinite;
  transition: transform .15s, box-shadow .15s;
  margin-bottom: 36px;
}
.accueil-btn:hover {
  animation: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(240,112,32,.55);
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(240,112,32,.45); }
  50% { box-shadow: 0 8px 32px rgba(240,112,32,.65), 0 0 0 8px rgba(240,112,32,.1); }
}

/* Stats strip */
.stats-strip {
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 26px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 16px 20px;
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: var(--shadow-sm);
  width: 100%;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; padding: 0 10px;
}
.stat-num {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.45rem; font-weight: 800;
  color: var(--orange); line-height: 1; margin-bottom: 4px;
}
.stat-label {
  font-size: .72rem; color: var(--gray); font-weight: 500;
  text-align: center; line-height: 1.35;
}
.stat-sep { width: 1px; height: 40px; background: rgba(180,210,240,.5); flex-shrink: 0; }

/* Feature grid */
.feat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; width: 100%; margin-top: 8px;
}
.feat-card {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 18px 10px 16px;
  text-align: center; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  display: flex; flex-direction: column; align-items: center;
}
.feat-card:hover { transform: translateY(-5px) scale(1.03); box-shadow: var(--shadow-md); }
.feat-icon {
  font-size: 1.7rem;
  width: 50px; height: 50px; border-radius: 14px;
  display: grid; place-items: center; margin: 0 auto 10px;
}
.feat-quiz { border-top: 3px solid #F07020; }
.feat-quiz .feat-icon { background: linear-gradient(135deg, #FFF0E6 0%, #FFDFCC 100%); }
.feat-chat { border-top: 3px solid #1E70CB; }
.feat-chat .feat-icon { background: linear-gradient(135deg, #E6F2FF 0%, #CCDEFF 100%); }
.feat-info { border-top: 3px solid #22AA66; }
.feat-info .feat-icon { background: linear-gradient(135deg, #E6FFF2 0%, #CCFFE4 100%); }
.feat-res  { border-top: 3px solid #F0B020; }
.feat-res  .feat-icon { background: linear-gradient(135deg, #FFF8E6 0%, #FFEFC0 100%); }
.feat-card h4 {
  font-family: 'Syne', sans-serif;
  font-size: .88rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 4px;
}
.feat-card p { font-size: .76rem; color: var(--gray); line-height: 1.4; }

/* ── QUIZ ── */
.quiz-band {
  margin-top: 40px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 28px 32px;
  text-align: left;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,.65);
}
.quiz-band h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  color: var(--blue-dark);
  margin-bottom: 18px;
}
.quiz-question { font-size: .95rem; font-weight: 600; color: var(--text); margin-bottom: 14px; line-height: 1.55; }
.quiz-options { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-opt {
  background: rgba(237,245,252,.9);
  border: 2px solid rgba(180,210,240,.4);
  border-radius: 10px;
  padding: 9px 18px;
  font-size: .88rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  color: var(--blue-dark);
  transition: all .15s;
}
.quiz-opt:hover, .quiz-opt.selected {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 4px 14px rgba(240,112,32,.35);
  transform: translateY(-1px);
}
.quiz-actions {
  display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap;
}
.quiz-btn-valider {
  background: linear-gradient(135deg, var(--orange) 0%, #D85A10 100%);
  color: #fff; border: none;
  border-radius: 10px; padding: 10px 24px;
  font-family: 'Inter', sans-serif; font-size: .9rem; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(240,112,32,.4);
  transition: transform .13s, opacity .13s, box-shadow .13s;
}
.quiz-btn-valider:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.quiz-btn-valider:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(240,112,32,.55);
}
.quiz-btn-prev {
  background: rgba(255,255,255,.7); color: var(--gray);
  border: 1.5px solid rgba(180,210,240,.5);
  border-radius: 10px; padding: 10px 18px;
  font-family: 'Inter', sans-serif; font-size: .88rem; font-weight: 600;
  cursor: pointer; transition: border-color .13s, color .13s, background .13s;
}
.quiz-btn-prev:hover { border-color: var(--blue); color: var(--blue); background: rgba(30,112,203,.06); }
.quiz-result {
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(237,245,252,.7);
  border-radius: 12px;
  font-size: .92rem;
  color: var(--text);
  line-height: 1.65;
  display: none;
}
.quiz-result.visible { display: block; }
.profil-result {
  margin-top: 18px;
  padding: 18px 22px;
  background: rgba(237,245,252,.65);
  border-radius: 14px;
  border-left: 4px solid var(--orange);
  backdrop-filter: blur(4px);
}
.profil-result strong {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  color: var(--blue-dark);
}
.profil-result p { font-size: .88rem; color: var(--text); margin-top: 8px; line-height: 1.65; }
.profil-goto {
  display: inline-block; margin-top: 14px;
  background: linear-gradient(135deg, var(--orange) 0%, #D85A10 100%);
  color: #fff;
  border: none; border-radius: 10px;
  padding: 9px 22px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: .88rem; font-weight: 600;
  box-shadow: 0 4px 14px rgba(240,112,32,.4);
  transition: transform .13s, box-shadow .13s;
}
.profil-goto:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(240,112,32,.55); }
.quiz-progress {
  font-size: .78rem; color: var(--gray); font-weight: 400; margin-left: 6px;
}
.quiz-adult-wrap {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid rgba(180,210,240,.45);
  display: flex; align-items: center; gap: 12px;
  color: var(--gray); font-size: .83rem; font-family: 'Inter', sans-serif;
}
.quiz-adult-btn {
  background: rgba(30,112,203,.07); border: 1.5px solid rgba(30,112,203,.28); color: var(--blue);
  border-radius: 10px; padding: 6px 16px; font-size: .82rem;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: background .13s, color .13s, border-color .13s;
}
.quiz-adult-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ══════════════════════════════
   PAGE CHATBOT
══════════════════════════════ */
#page-chatbot {
  height: 100vh;
  display: none;
}
#page-chatbot.active {
  display: flex;
  flex-direction: column;
}
.chat-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-topbar {
  background: rgba(237,245,252,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px 24px;
  border-bottom: 1px solid rgba(200,225,245,.5);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-topbar-avatar {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--orange) 0%, #D85A10 100%);
  display: grid; place-items: center; font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(240,112,32,.4);
}
.chat-topbar h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem; font-weight: 700; color: var(--blue-dark);
}
.chat-topbar p { font-size: .78rem; color: var(--gray); }
.online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; margin-right: 4px; display: inline-block;
  box-shadow: 0 0 8px rgba(74,222,128,.7);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(180,210,240,.5); border-radius: 99px; }

/* Bubbles */
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 72%; }
.msg.bot { align-self: flex-start; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.bubble {
  padding: 13px 18px;
  font-size: .95rem;
  line-height: 1.6;
  border-radius: 20px;
}
.msg.bot .bubble {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  color: var(--text);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(200,225,245,.5);
}
.msg.user .bubble {
  background: linear-gradient(135deg, var(--bubble-me) 0%, #2A65C0 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(58,126,216,.3);
}
.bubble ul { padding-left: 16px; margin-top: 6px; }
.bubble li { margin-bottom: 3px; }

/* Typing */
.typing-bubble {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  border-radius: 20px 20px 20px 4px;
  padding: 14px 18px;
  display: flex; gap: 5px; align-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(200,225,245,.5);
}
.typing-bubble span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gray);
  animation: blink .9s infinite;
}
.typing-bubble span:nth-child(2) { animation-delay: .2s; }
.typing-bubble span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{transform:scale(1);opacity:.6} 40%{transform:scale(1.3);opacity:1} }

/* Quick replies */
.quick-replies {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 28px;
  background: rgba(237,245,252,.88);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(200,225,245,.4);
}
.qr-btn {
  background: rgba(255,255,255,.82); color: var(--blue-dark);
  border: 1.5px solid rgba(180,210,240,.45);
  border-radius: 10px; padding: 7px 16px;
  font-size: .84rem; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 500;
  backdrop-filter: blur(4px);
  transition: all .13s;
}
.qr-btn:hover {
  background: var(--orange); border-color: var(--orange); color: #fff;
  box-shadow: 0 4px 14px rgba(240,112,32,.35);
}

/* Layout colonne pour les boutons du quiz */
.quick-replies.quiz-mode {
  flex-direction: column;
  padding: 12px 28px 16px;
  gap: 10px;
}

/* Boutons du quiz inline — plus grands et plus visuels */
.quiz-opt-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: .95rem;
  font-weight: 600;
  text-align: left;
  border-radius: 14px;
  border: 2px solid rgba(30,112,203,.2);
  background: rgba(255,255,255,.92);
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 2px 8px rgba(10,30,80,.06);
}
.quiz-opt-btn::before {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(30,112,203,.35);
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.quiz-opt-btn:hover {
  background: linear-gradient(135deg, rgba(30,112,203,.08) 0%, rgba(30,112,203,.04) 100%);
  border-color: var(--blue);
  color: var(--blue-dark);
  transform: translateX(4px) scale(1.01);
  box-shadow: 0 6px 20px rgba(30,112,203,.18);
}
.quiz-opt-btn:hover::before {
  background: var(--blue);
  border-color: var(--blue);
}
.quiz-opt-btn:hover { box-shadow: 0 6px 20px rgba(30,112,203,.18); }

/* Input row */
.chat-input-row {
  display: flex; gap: 10px;
  padding: 14px 24px 18px;
  background: rgba(237,245,252,.88);
  backdrop-filter: blur(8px);
}
#chat-input {
  flex: 1;
  background: rgba(255,255,255,.88);
  border: 1.5px solid rgba(180,210,240,.45);
  border-radius: 14px;
  padding: 12px 20px;
  font-size: .95rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  color: var(--text);
  resize: none;
  transition: border-color .15s, box-shadow .15s;
}
#chat-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,112,203,.12);
}
#send-btn {
  background: linear-gradient(135deg, var(--orange) 0%, #D85A10 100%);
  border: none; cursor: pointer;
  border-radius: 12px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(240,112,32,.45);
  transition: transform .13s, box-shadow .13s;
}
#send-btn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(240,112,32,.55); }
.restart-link {
  text-align: center; padding: 4px 0 10px;
  background: rgba(237,245,252,.88);
}
.restart-link button {
  background: none; border: none; cursor: pointer;
  font-size: .78rem; color: var(--gray);
  font-family: 'Inter', sans-serif;
  text-decoration: underline;
}
.chat-quiz-btn {
  background: linear-gradient(135deg, var(--orange) 0%, #D85A10 100%);
  color: #fff; border: none; border-radius: 12px;
  padding: 11px 22px; font-family: 'Inter', sans-serif;
  font-size: .9rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(240,112,32,.45);
  transition: transform .13s, box-shadow .13s;
}
.chat-quiz-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(240,112,32,.6);
}

/* Carte ressources auto-détectée */
.chat-resource-hint {
  background: linear-gradient(135deg, rgba(30,112,203,.08) 0%, rgba(30,112,203,.04) 100%);
  border: 1.5px solid rgba(30,112,203,.22);
  border-radius: 16px;
  padding: 14px 18px;
  max-width: 320px;
}
.crh-top {
  font-size: .78rem; font-weight: 700;
  color: var(--blue); letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: 6px;
}
.crh-text {
  font-size: .88rem; color: var(--text);
  line-height: 1.55; margin-bottom: 12px;
}
.crh-actions { display: flex; flex-direction: column; gap: 8px; }
.crh-btn {
  background: linear-gradient(135deg, var(--blue) 0%, #155AAA 100%);
  color: #fff; border: none; border-radius: 10px;
  padding: 9px 18px; font-family: 'Inter', sans-serif;
  font-size: .84rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(30,112,203,.35);
  transition: transform .13s, box-shadow .13s;
  width: 100%; text-align: left;
}
.crh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,112,203,.5);
}
.crh-btn-secondary {
  background: rgba(30,112,203,.08);
  color: var(--blue);
  box-shadow: none;
  border: 1.5px solid rgba(30,112,203,.25);
}
.crh-btn-secondary:hover {
  background: rgba(30,112,203,.15);
  box-shadow: none;
  border-color: var(--blue);
}
body.dark .chat-resource-hint {
  background: rgba(30,112,203,.1);
  border-color: rgba(30,112,203,.3);
}

/* ══════════════════════════════
   PAGE INFORMATIONS
══════════════════════════════ */
.info-page { padding: 40px 32px 60px; max-width: 860px; }
.info-page h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.7rem; font-weight: 800;
  color: var(--blue-dark); margin-bottom: 28px;
}
.info-card {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,.65);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
}
.info-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Bordure colorée par thème */
.info-harcelement { border-top: 3px solid #F07020; }
.info-cyber        { border-top: 3px solid #1E70CB; }
.info-consequences { border-top: 3px solid #CC3333; }
.info-agir         { border-top: 3px solid #22AA66; }

.info-card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(200,225,245,.4);
}
.info-harcelement .info-card-head { background: linear-gradient(135deg, rgba(240,112,32,.08) 0%, rgba(240,112,32,.03) 100%); }
.info-cyber        .info-card-head { background: linear-gradient(135deg, rgba(30,112,203,.08) 0%, rgba(30,112,203,.03) 100%); }
.info-consequences .info-card-head { background: linear-gradient(135deg, rgba(204,51,51,.08) 0%, rgba(204,51,51,.03) 100%); }
.info-agir         .info-card-head { background: linear-gradient(135deg, rgba(34,170,102,.08) 0%, rgba(34,170,102,.03) 100%); }

.info-card-head .ico {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.3rem; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.info-harcelement .ico { background: linear-gradient(135deg, #FFF0E6 0%, #FFDFCC 100%); }
.info-cyber        .ico { background: linear-gradient(135deg, #E6F2FF 0%, #CCDEFF 100%); }
.info-consequences .ico { background: linear-gradient(135deg, #FFE8E8 0%, #FFCCCC 100%); }
.info-agir         .ico { background: linear-gradient(135deg, #E6FFF2 0%, #CCFFE4 100%); }
.info-card-head h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem; font-weight: 700; color: var(--blue-dark);
}
.info-card-body { padding: 20px 24px; }
.info-card-body p { font-size: .93rem; color: #2A4A6A; margin-bottom: 14px; line-height: 1.7; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
  padding: 3px 10px; border-radius: 4px; font-size: .8rem; font-weight: 400;
  user-select: none; pointer-events: none;
}
.tag.blue   { background: #E8F2FC; color: #4A7AA0; }
.tag.orange { background: #FEF3E8; color: #B07040; }
.tag.gray   { background: #EEF2F6; color: #6A8AA4; }
.tag-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); font-weight: 600; margin-bottom: 6px; }

.cons-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 8px;
  margin-top: 10px;
}
.cons-card {
  background: rgba(237,245,252,.65); border-radius: 8px;
  padding: 10px 14px; font-size: .85rem; font-weight: 400;
  color: var(--text); border-left: 2px solid #A8C4DC;
  pointer-events: none; user-select: none;
}
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 12px; }
.action-card {
  background: rgba(237,245,252,.65); border-radius: 10px; padding: 16px;
  border-top: 2px solid #D4A882;
  pointer-events: none; user-select: none;
}
.action-card h4 { font-family: 'Syne', sans-serif; font-size: .92rem; color: #B07040; margin-bottom: 6px; }
.action-card p { font-size: .84rem; color: #2A4A6A; line-height: 1.6; }

.banner-3018 {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(135deg, #0B3070 0%, #071E48 100%);
  color: #fff;
  border-radius: 16px; padding: 20px 24px; margin-top: 22px;
  box-shadow: 0 8px 28px rgba(10,30,80,.22);
}
.big-num { font-family: 'Syne', sans-serif; font-size: 2.8rem; font-weight: 800; color: var(--orange); flex-shrink: 0; }
.banner-3018 p { font-size: .88rem; color: rgba(255,255,255,.85); line-height: 1.6; }
.banner-3018 strong { color: #fff; }

/* ══════════════════════════════
   PAGE L'ESSENTIEL (RESSOURCES)
══════════════════════════════ */
.essentiel-page { padding: 40px 32px 60px; max-width: 960px; }
.essentiel-page h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.7rem; font-weight: 800;
  color: var(--blue-dark); margin-bottom: 6px;
}
.essentiel-page .sub { color: var(--gray); margin-bottom: 24px; font-size: .95rem; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter-btn {
  background: rgba(255,255,255,.78); border: 1.5px solid rgba(180,210,240,.45);
  color: var(--blue-dark); border-radius: 99px;
  padding: 8px 20px; font-family: 'Inter', sans-serif;
  font-size: .84rem; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
}
.filter-btn:hover {
  background: rgba(30,112,203,.1); border-color: var(--blue); color: var(--blue);
  transform: translateY(-1px);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--blue) 0%, #155AAA 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 16px rgba(30,112,203,.4);
  transform: translateY(-1px);
}
.resources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 18px; }
.resource-card {
  background: rgba(255,255,255,.82); border-radius: 16px;
  padding: 0; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,.65);
  text-decoration: none; color: inherit;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s;
  overflow: hidden; cursor: pointer;
}
.resource-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow-lg);
}

.res-card-top { padding: 16px 20px 0; }
.res-badge {
  display: inline-block; font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 6px; width: fit-content;
}
.res-badge.victime { background: #FDEBD6; color: var(--orange); }
.res-badge.parent  { background: #D6E8FA; color: var(--blue); }
.res-badge.prof    { background: #DFF5EA; color: #1A7A45; }
.res-badge.cpe     { background: #E8EEF4; color: #3A5A78; }
.res-badge.temoin  { background: #F0E8FF; color: #6A28C4; }
.res-badge.tous    { background: #E8F5E9; color: #2E7D32; }

.resource-card h3 {
  font-family: 'Syne', sans-serif; font-size: 1rem;
  font-weight: 700; color: var(--blue-dark);
  padding: 10px 20px 0; margin: 0;
}
.resource-card p {
  font-size: .86rem; color: var(--gray); line-height: 1.6;
  flex: 1; padding: 8px 20px 0; margin: 0;
}
.res-card-foot {
  padding: 14px 20px 16px; font-size: .83rem;
  font-weight: 600; color: var(--orange);
  display: flex; align-items: center; gap: 4px;
  border-top: 1px solid rgba(0,0,0,.05); margin-top: 14px;
}
.res-card-foot .res-arrow { transition: transform .18s; }
.resource-card:hover .res-arrow { transform: translateX(5px); }

/* ── SETTINGS BUTTON ── */
.settings-wrap {
  margin-top: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.settings-btn {
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 12px;
  width: 44px; height: 44px;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .35s;
  flex-shrink: 0;
}
.settings-btn:hover { background: rgba(255,255,255,.9); transform: rotate(45deg); }
.settings-panel {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 175px;
  width: 220px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 16px 48px rgba(10,30,80,.22);
  border: 1px solid rgba(255,255,255,.8);
  z-index: 9999;
}
.settings-panel.open { display: block; }
.settings-panel h4 {
  font-size: .82rem; font-weight: 700;
  color: var(--blue-dark); margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: .06em;
}
.toggle-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
}
.toggle-label { font-size: .88rem; color: var(--text); }
.toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #bbb; border-radius: 99px;
  cursor: pointer; transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .3s;
}
.toggle input:checked + .toggle-slider { background: var(--orange); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── DARK MODE ── */
html.dark, body.dark {
  --bg:         #0E1E2E;
  --bg2:        #0A1824;
  --white:      #142030;
  --text:       #C8DFF0;
  --gray:       #7AACC8;
  --blue:       #5BA3E0;
  --blue-dark:  #A8D0F0;
  --bubble-me:  #2A5A8A;
  --bubble-bot: #1E3A52;
}
html.dark { background-image: linear-gradient(150deg, #0E1E2E 0%, #0A1624 60%, #0C1A28 100%); }
body.dark  { background-image: linear-gradient(150deg, #0E1E2E 0%, #0A1624 60%, #0C1A28 100%); }
body.dark .sidebar { background: linear-gradient(175deg, #142030 0%, #0E1A2A 100%); }
body.dark .nav-btn { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); color: rgba(200,223,240,.75); }
body.dark .nav-btn:hover { background: rgba(255,255,255,.14); color: var(--text); }
body.dark .nav-btn.active { background: var(--orange); color: #fff; border-color: transparent; }
body.dark .nav-icon { background: rgba(255,255,255,.1); }
body.dark .settings-panel { background: rgba(14,30,48,.96); box-shadow: 0 16px 48px rgba(0,0,0,.5); border-color: rgba(255,255,255,.08); }
body.dark .settings-panel h4 { color: var(--blue); }
body.dark .settings-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); }
body.dark .settings-btn:hover { background: rgba(255,255,255,.2); }
body.dark .accueil-list li { background: rgba(20,38,56,.7); border-color: rgba(255,255,255,.07); }
body.dark .quiz-band { background: rgba(14,30,48,.82); border-color: rgba(255,255,255,.07); }
body.dark .quiz-opt { background: rgba(14,30,48,.6); color: var(--text); border-color: rgba(255,255,255,.08); }
body.dark .quiz-btn-prev { background: rgba(255,255,255,.05); }
body.dark .profil-result { background: rgba(14,30,48,.6); }
body.dark .tag.blue   { background: #182E44; color: #6A9CC0; }
body.dark .tag.orange { background: #2E1A0A; color: #A07040; }
body.dark .tag.gray   { background: #1A2A3A; color: #7AACC8; }
body.dark .res-badge.victime { background: #3A2010; }
body.dark .res-badge.parent  { background: #0F2A42; }
body.dark .res-badge.prof    { background: #0F2A1F; color: #4ADE80; }
body.dark .res-badge.cpe     { background: #1A2A3A; color: #7AACC8; }
body.dark .res-badge.temoin  { background: #1E1040; color: #B08AFF; }
body.dark .res-badge.tous    { background: #0F2A1F; color: #4ADE80; }
body.dark .resource-card     { background: rgba(14,30,48,.82); border-color: rgba(255,255,255,.06); box-shadow: 0 2px 12px rgba(0,0,0,.35); }
body.dark .res-card-foot     { border-top-color: rgba(255,255,255,.08); }
body.dark .info-card         { background: rgba(14,30,48,.82); border-color: rgba(255,255,255,.06); }
body.dark .info-card-head    { background: rgba(10,24,38,.5); border-color: rgba(255,255,255,.06); }
body.dark .info-card-head h3 { color: var(--blue-dark); }
body.dark .filter-btn        { background: rgba(14,30,48,.65); color: var(--gray); border-color: rgba(255,255,255,.1); }
body.dark .filter-btn.active { background: var(--orange); border-color: var(--orange); color: #fff; }
body.dark .info-card-body p  { color: var(--text); }
body.dark .action-card p     { color: var(--text); }
body.dark .banner-3018       { background: linear-gradient(135deg, #0A1A38 0%, #060F1C 100%); }
body.dark #chat-input        { background: rgba(14,30,48,.72); border-color: rgba(255,255,255,.1); color: var(--text); }
body.dark .msg.bot .bubble   { background: rgba(20,38,56,.88); border-color: rgba(255,255,255,.06); }
body.dark .typing-bubble     { background: rgba(20,38,56,.88); border-color: rgba(255,255,255,.06); }
body.dark .qr-btn            { background: rgba(14,30,48,.65); border-color: rgba(255,255,255,.1); color: var(--text); }

/* ── POLICE DYSLEXIE ── */
body.dyslexie,
body.dyslexie button,
body.dyslexie input,
body.dyslexie p,
body.dyslexie li,
body.dyslexie span,
body.dyslexie h1,
body.dyslexie h2,
body.dyslexie h3,
body.dyslexie label {
  font-family: 'Lexend', sans-serif !important;
  letter-spacing: 0.04em;
  word-spacing: 0.12em;
  line-height: 1.85;
}
body.dyslexie .nav-btn {
  font-size: .7rem;
  white-space: normal;
  line-height: 1.25;
  padding: 12px 6px 10px;
}
body.dyslexie .nav-icon {
  width: 36px; height: 36px;
  font-size: 1.1rem;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 600px) {
  .sidebar { width: 64px; }
  .nav-btn span.nav-label { display: none; }
  .sidebar-logo { font-size: .7rem; }
}
