/* ============================================================
   static/css/main.css – Noteo · QCM IA Pronote SaaS v2
   Charte Noteo (inspirée Pronote) :
     Primary    : #2D6B2D  (Vert foncé Noteo)
     Secondary  : #4CAF50  (Vert moyen Noteo)
     Accent     : #EDE637  (Jaune Noteo)
     Background : #F4FAF4  (Blanc légèrement vert)
     Text       : #1A2E1A
     Card bg    : #FFFFFF
     Border     : #D6E8D6
   Typography  : Inter (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: #F4FAF4;
  color: #1A2E1A;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Palette CSS vars – Noteo ── */
:root {
  --primary:   #2D6B2D;   /* vert foncé Noteo */
  --primary-d: #1E4D1E;   /* vert très foncé  */
  --primary-l: #E8F5E9;   /* vert très clair  */
  --secondary: #4CAF50;   /* vert moyen Noteo */
  --accent:    #EDE637;   /* jaune Noteo      */
  --accent-d:  #C8C000;   /* jaune foncé      */
  --bg:        #F4FAF4;   /* fond légèrement vert */
  --bg-2:      #E8F5E9;
  --white:     #FFFFFF;
  --text:      #1A2E1A;
  --text-m:    #3D5A3D;
  --text-l:    #7A9E7A;
  --border:    #C8E0C8;
  --danger:    #EF4444;
  --warning:   #F59E0B;
  --success:   #2D6B2D;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(45,107,45,.07);
  --shadow-lg: 0 8px 32px rgba(45,107,45,.15);
}

/* ── Typography ── */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { color: var(--text-m); }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ── */
.navbar {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 800; font-size: 1.2rem; color: var(--primary);
  text-decoration: none;
}
/* Logo Qnoteo dans la navbar (SVG, PNG ou JPG via <img>) */
.navbar-logo {
  height: 44px; width: auto; max-width: 220px; display: block; object-fit: contain;
}
@media (max-width: 768px) {
  .navbar-logo { height: 38px; max-width: 190px; }
}
.navbar-actions { display: flex; align-items: center; gap: 1rem; }
.credits-badge {
  background: var(--primary-l); color: var(--primary);
  padding: .3rem .8rem; border-radius: 20px; font-size: .85rem; font-weight: 600;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.3rem; border-radius: 8px;
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .18s; text-decoration: none;
  white-space: nowrap;
}
.btn-primary   { background: var(--primary);  color: #fff; }
.btn-primary:hover  { background: var(--primary-d); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
/* Jaune Noteo – texte foncé pour le contraste */
.btn-accent    { background: var(--accent);   color: var(--primary-d); }
.btn-accent:hover   { background: var(--accent-d);  color: #fff; transform: translateY(-1px); }
.btn-outline   { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover  { background: var(--primary-l); }
.btn-ghost     { background: transparent; color: var(--text-m); }
.btn-ghost:hover    { background: var(--border); }
.btn-danger    { background: var(--danger);   color: #fff; }
.btn-success   { background: var(--secondary); color: #fff; }
.btn-lg { padding: .8rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: .35rem .8rem; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Cards ── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card-hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); transition: all .2s; }

/* ── Form elements ── */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
.form-control {
  width: 100%; padding: .6rem .9rem;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: .92rem; background: var(--white); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,107,45,.14);
}
select.form-control { cursor: pointer; }

/* ── Alert / Toast ── */
.alert {
  padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem;
  font-size: .88rem; font-weight: 500; border: 1px solid transparent;
}
.alert-error   { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.alert-success { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }
.alert-info    { background: var(--primary-l); color: var(--primary-d); border-color: #A5D6A7; }
.alert-warning { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }

.toast-container {
  position: fixed; top: 80px; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; padding: .9rem 1.2rem; max-width: 360px;
  box-shadow: var(--shadow-lg); animation: slideIn .25s ease;
  font-size: .88rem; display: flex; align-items: flex-start; gap: .6rem;
}
.toast.success { border-left: 4px solid var(--secondary); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--primary); }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: none; } }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; padding: .2rem .65rem;
  border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.badge-primary { background: var(--primary-l); color: var(--primary); }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger  { background: #FEE2E2; color: #991B1B; }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Section helpers ── */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 680px; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .75rem; }
.font-bold { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-success { color: var(--secondary); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-l); }

/* ── Hero Section ── */
.hero {
  background: linear-gradient(135deg, #1E4D1E 0%, #2D6B2D 55%, #43A843 100%);
  color: #fff; padding: 6rem 0 5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero .container { position: relative; }
.hero h1 { color: #fff; margin-bottom: 1.2rem; }
.hero p   { color: rgba(255,255,255,.82); font-size: 1.1rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg); padding: 1.5rem;
  backdrop-filter: blur(8px); max-width: 420px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px; padding: .35rem .9rem; font-size: .85rem;
  margin-bottom: 1.2rem;
}

/* ── Feature grid ── */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.feature-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.8rem;
  box-shadow: var(--shadow); transition: all .2s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}
.icon-blue   { background: var(--primary-l); }
.icon-green  { background: #D1FAE5; }
.icon-amber  { background: #FEF3C7; }
.icon-purple { background: #EDE9FE; }

/* ══ Pricing cards – EdTech Premium ══════════════════════════════════════════ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
  align-items: stretch;
}

/* Grille 4 cartes : responsive 4→2→1 colonnes */
.pricing-grid-four {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  align-items: stretch;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1179px) {
  .pricing-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .pricing-grid-four { grid-template-columns: 1fr; gap: 1rem; }
  .pricing-grid-four .pricing-card { padding: 1.5rem; }
}

.pricing-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
}
.pricing-card:not(.featured):hover {
  box-shadow: 0 6px 24px rgba(45,107,45,.10);
  transform: translateY(-2px);
}

/* Carte mise en avant : barre de couleur en haut + ombre verte */
.pricing-card.featured {
  border: 2px solid var(--primary);
  box-shadow: 0 12px 44px rgba(45,107,45,.2), 0 2px 8px rgba(45,107,45,.08);
}
.pricing-card.featured::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-d), var(--secondary));
  border-radius: 18px 18px 0 0;
}

/* Titre de carte */
.pricing-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .25rem;
  letter-spacing: -.01em;
}

/* Bloc prix */
.pricing-card .price-amount {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  margin: 1rem 0 .35rem;
  letter-spacing: -.05em;
  color: var(--text);
}
.pricing-card.featured .price-amount { color: var(--primary); }

.pricing-card .price-period {
  color: var(--text-l);
  font-size: .83rem;
  line-height: 1.5;
}

/* Liste d'avantages */
.pricing-features {
  list-style: none;
  text-align: left;
  margin: 1.8rem 0 0;
  flex: 1;
}
.pricing-features li {
  padding: .52rem 0;
  border-bottom: 1px solid #F0F7F0;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--text-m);
}
.pricing-features li:last-child { border: none; }
.pricing-features li.unavailable { color: var(--text-l); }

/* Check circulaire */
.pricing-features .check {
  width: 18px; height: 18px; flex-shrink: 0;
  background: #D1FAE5; color: #065F46;
  border-radius: 50%;
  font-size: .65rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: .18rem;
}
/* Croix circulaire */
.pricing-features .cross {
  width: 18px; height: 18px; flex-shrink: 0;
  background: #F3F4F6; color: #9CA3AF;
  border-radius: 50%;
  font-size: .6rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: .18rem;
}

/* Zone CTA : toujours collée en bas */
.pricing-cta { margin-top: 2rem; }

.pricing-cta .btn {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  min-height: 3.1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
/* Bouton primaire avec gradient subtil + ombre verte */
.pricing-cta .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #3A8A3A 100%);
  box-shadow: 0 4px 14px rgba(45,107,45,.28);
}
.pricing-cta .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 100%);
  box-shadow: 0 6px 22px rgba(45,107,45,.38);
  transform: translateY(-1px);
}

.pricing-cta small {
  display: block;
  font-size: .72rem;
  color: var(--text-l);
  text-align: center;
  margin-top: .6rem;
  line-height: 1.45;
}
.pricing-cta .btn:disabled,
.pricing-cta .btn[disabled] {
  cursor: not-allowed;
  font-weight: 700;
}

/* ══ Fin Pricing cards ════════════════════════════════════════════════════════ */

/* ── App Layout ── */
.app-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  min-height: calc(100vh - 64px);
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.main-panel { min-width: 0; }

/* ── Séparateur import XML / flux génération ── */
.import-divider {
  text-align: center;
  font-size: .78rem;
  color: var(--text-l);
  margin: .2rem 0 1.2rem;
  position: relative;
}
.import-divider::before,
.import-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 28%;
  height: 1px;
  background: var(--border);
}
.import-divider::before { left: 0; }
.import-divider::after  { right: 0; }

/* ── Bannières vérification email ── */
.verify-banner {
  display: flex; align-items: center; gap: .75rem;
  background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F;
  border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1rem;
  font-size: .875rem;
}
.verify-banner-success {
  background: #F0FDF4; border-color: #BBF7D0; color: #14532D;
}

/* ── Sidebar ── */
.sidebar-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
}
.sidebar-card + .sidebar-card { margin-top: 1rem; }
.sidebar-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-l); margin-bottom: 1rem;
}

/* ── Questions list ── */
.questions-container { display: flex; flex-direction: column; gap: 1rem; }
.question-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.3rem;
  box-shadow: var(--shadow); transition: border-color .15s;
}
.question-card:hover { border-color: var(--primary); }
.question-header {
  display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem;
}
.question-number {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.question-text { font-weight: 600; font-size: .95rem; }
.answers-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.answer-item {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .4rem .6rem; border-radius: 6px; font-size: .87rem;
}
.answer-item.correct { background: #F0FDF4; color: #15803D; }
.answer-item.incorrect { background: #F8FAFC; color: var(--text-m); }
.answer-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center; font-size: .7rem;
}
.answer-dot.correct   { background: var(--secondary); color: #fff; }
.answer-dot.incorrect { background: var(--border); }

/* ── XML Preview ── */
.xml-preview-container {
  background: #1E293B; border-radius: var(--radius);
  overflow: hidden;
}
.xml-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1);
}
.xml-preview-header span { color: #94A3B8; font-size: .82rem; font-weight: 600; }
.xml-preview-code {
  padding: 1rem; overflow: auto; max-height: 350px;
  font-family: 'Fira Code', 'Courier New', monospace; font-size: .78rem;
  line-height: 1.6; color: #E2E8F0; white-space: pre;
}

/* ── Stats bar ── */
.stats-bar {
  display: flex; gap: 1rem; flex-wrap: wrap;
  background: var(--primary-l); border-radius: var(--radius);
  padding: 1rem 1.5rem; border: 1px solid #A5D6A7;
}
.stat-item { display: flex; flex-direction: column; gap: .1rem; }
.stat-value { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: .75rem; color: var(--text-m); font-weight: 500; }

/* ── Loader overlay ── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(248,250,252,.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 500; backdrop-filter: blur(4px);
}
.loading-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem; text-align: center;
  box-shadow: var(--shadow-lg); max-width: 320px;
}
.loading-spinner-lg {
  width: 52px; height: 52px; border: 4px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 1.2rem;
}
.loading-steps { list-style: none; text-align: left; margin-top: 1rem; }
.loading-steps li {
  padding: .3rem 0; font-size: .85rem; color: var(--text-m);
  display: flex; align-items: center; gap: .5rem;
}
.loading-steps li.active { color: var(--primary); font-weight: 600; }
.loading-steps li.done   { color: var(--secondary); }

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4rem 2rem; text-align: center;
  background: var(--white); border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .5; }

/* ── Auth page ── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #E8F5E9 0%, #F4FAF4 60%, #FAFFF4 100%);
  padding: 2rem;
}
.auth-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo .logo-mark {
  display: inline-block; margin-bottom: .8rem;
}
.auth-tabs {
  display: flex; background: var(--bg); border-radius: 8px;
  padding: 4px; gap: 4px; margin-bottom: 1.8rem;
}
.auth-tab {
  flex: 1; padding: .5rem; text-align: center; border-radius: 6px;
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: none; background: transparent; color: var(--text-m);
  transition: all .2s;
}
.auth-tab.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow); }

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: .8rem;
  margin: 1.2rem 0; color: var(--text-l); font-size: .82rem;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* ── Footer ── */
.footer {
  background: #1E293B; color: #94A3B8;
  padding: 2.5rem 0; text-align: center; font-size: .85rem; margin-top: auto;
}
.footer a { color: #94A3B8; }
.footer a:hover { color: #fff; }

/* ── Steps ── */
.steps { display: flex; gap: 0; margin: 3rem 0; }
.step {
  flex: 1; text-align: center; position: relative;
  padding: 0 1rem;
}
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 20px; right: 0;
  width: 100%; height: 2px; background: var(--border); z-index: 0;
}
.step-number {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin: 0 auto .8rem; position: relative; z-index: 1;
}
.step-label { font-size: .82rem; font-weight: 600; color: var(--text-m); }

/* ── Accordion / Collapsible ── */
.accordion-item {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: .5rem;
}
.accordion-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.1rem; cursor: pointer; font-weight: 600; font-size: .9rem;
  background: var(--white);
}
.accordion-header:hover { background: var(--bg); }
.accordion-body { padding: 1rem 1.1rem; background: var(--bg); display: none; }
.accordion-item.open .accordion-body { display: block; }
.accordion-item.open .chevron { transform: rotate(180deg); }
.chevron { transition: transform .2s; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; overflow-y: visible; }
}
@media (max-width: 640px) {
  .hero { padding: 3rem 0; }
  .hero-actions { flex-direction: column; }
  /* Sur mobile : 1 colonne, pas de scale, padding réduit */
  .pricing-grid { grid-template-columns: 1fr; gap: 1rem; }
  .pricing-card { padding: 1.5rem; }
  .pricing-card .price-amount { font-size: 2.2rem; }
  .steps { flex-direction: column; gap: 1rem; }
  .step::after { display: none; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-l); }

/* ══════════════════════════════════════════════════════════════════════════════
   SÉLECTION EN CASCADE – Niveau → Classe → Catégorie → Matière
   ══════════════════════════════════════════════════════════════════════════════ */

/* Conteneur du bloc en cascade */
.edu-cascade {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

/* Séparateur visuel entre les selects */
.edu-cascade .form-group {
  position: relative;
}

/* Flèche de cascade entre les selects */
.edu-cascade .form-group:not(:last-of-type)::after {
  content: "↓";
  display: block;
  text-align: center;
  font-size: .75rem;
  color: var(--text-l);
  margin: .1rem 0 0;
  line-height: 1;
}

/* Select désactivé (en attente d'une sélection parent) */
.edu-cascade select:disabled,
.edu-cascade select option[value=""]:only-child {
  color: var(--text-l);
  background: var(--bg);
}

/* Badge de résumé de sélection */
.edu-status-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .85rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 500;
  margin-top: .4rem;
  border: 1px solid transparent;
  transition: all .2s;
}

.edu-status-ok {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #15803D;
}

.edu-status-partial {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}

/* Indicateur de cascade actif */
.edu-cascade select:not([data-empty]) {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 107, 45, .10);
}

/* Optgroup styling dans le select matière */
#fSubject optgroup {
  font-weight: 700;
  color: var(--text-d);
  font-size: .8rem;
}

#fSubject option {
  padding-left: .5rem;
  font-size: .88rem;
}


/* ═══════════════════════════════════════════════════════════════════════
   TYPE DE QUESTION – sélecteur v3.1
   ═══════════════════════════════════════════════════════════════════════ */

/* Icône d'info dans le label */
.form-label-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: .35rem;
  font-size: .72rem;
  font-style: normal;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  cursor: help;
  vertical-align: middle;
  line-height: 1;
}

/* Indice contextuel sous le select */
.qtype-hint {
  margin-top: .35rem;
  padding: .28rem .55rem;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--primary-d, #3730a3);
  background: var(--primary-l, #eef2ff);
  border-left: 3px solid var(--primary, #6366f1);
  border-radius: 0 .3rem .3rem 0;
  min-height: 1.6rem;
  transition: background .2s, color .2s;
}

/* Couleurs variantes selon le type sélectionné (optionnel – JS peut ajouter data-qtype) */
#fQtype[value="matching"]        ~ .qtype-hint { border-color: #f59e0b; color: #92400e; background: #fffbeb; }
#fQtype[value="numerical"]       ~ .qtype-hint { border-color: #10b981; color: #065f46; background: #ecfdf5; }
#fQtype[value="shortanswer"]     ~ .qtype-hint { border-color: #3b82f6; color: #1e3a8a; background: #eff6ff; }
#fQtype[value="spellanswer"]     ~ .qtype-hint { border-color: #8b5cf6; color: #4c1d95; background: #f5f3ff; }
#fQtype[value="multichoice_multi"] ~ .qtype-hint { border-color: #06b6d4; color: #164e63; background: #ecfeff; }

/* ═══════════════════════════════════════════════════════════════════════
   MULTI-TYPE CHECKBOXES v4.0
   ═══════════════════════════════════════════════════════════════════════ */

.qtype-checkboxes {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-top: .25rem;
}

.qtype-cb-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .32rem .55rem;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: .4rem;
  cursor: pointer;
  font-size: .82rem;
  color: var(--text-m, #475569);
  background: #fff;
  transition: background .15s, border-color .15s, color .15s;
  user-select: none;
}

.qtype-cb-item:hover {
  background: var(--primary-l, #eef2ff);
  border-color: var(--primary, #6366f1);
}

.qtype-cb-item.active {
  background: var(--primary-l, #eef2ff);
  border-color: var(--primary, #6366f1);
  color: var(--primary-d, #3730a3);
  font-weight: 500;
}

/* Cacher la checkbox native et utiliser l'icône */
.qtype-cb-item input[type="checkbox"] {
  width: 0;
  height: 0;
  opacity: 0;
  position: absolute;
}

/* Checkbox CSS-only (pas d'emoji ni de Lucide) */
.qtype-cb-icon {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  position: relative;
}

.qtype-cb-item.active .qtype-cb-icon {
  background: var(--primary);
  border-color: var(--primary);
}

.qtype-cb-item.active .qtype-cb-icon::after {
  content: '';
  width: 4px;
  height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

.qtype-cb-label {
  flex: 1;
}

/* Responsive : grille 2 colonnes sur écrans plus larges */
@media (min-width: 1200px) {
  .qtype-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .3rem;
  }
}

/* ── Recommandations Pronote ────────────────────────────────────────────── */
.pronote-reco {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.reco-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, var(--primary-l) 0%, #F0FFF0 100%);
  border-bottom: 1px solid var(--border);
}

.reco-title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--primary);
}

.reco-subtitle {
  font-size: .78rem;
  color: var(--text-l);
  margin-top: .1rem;
}

.reco-close {
  margin-left: auto;
  flex-shrink: 0;
  font-size: .85rem;
  color: var(--text-l);
}

.reco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.reco-item {
  display: flex;
  gap: .8rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.reco-item:nth-child(even) {
  border-right: none;
}

.reco-item:nth-last-child(-n+2):not(.reco-item--wide) {
  border-bottom: none;
}

/* Item pleine largeur (ex : barème) */
.reco-item--wide {
  grid-column: 1 / -1;
  border-right: none;
  border-bottom: none;
}

.reco-item--highlight {
  background: linear-gradient(135deg, #FFFBEB 0%, #FFF 100%);
}

.reco-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reco-item-body {
  flex: 1;
  min-width: 0;
}

.reco-item-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-l);
  margin-bottom: .25rem;
}

.reco-item-value {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .2rem;
}

.reco-item-hint {
  font-size: .75rem;
  color: var(--text-l);
  line-height: 1.5;
}

.reco-checklist {
  list-style: none;
  padding: 0;
  margin: .3rem 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.reco-checklist li {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  color: var(--text-m);
}

.reco-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: .1rem .45rem;
  border-radius: 20px;
  background: var(--primary-l);
  color: var(--primary);
  vertical-align: middle;
}

.reco-barem {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: .4rem 0 .2rem;
}

.barem-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: var(--text-m);
  padding: .25rem 0;
  border-bottom: 1px dashed var(--border);
}

.barem-row:last-child {
  border-bottom: none;
}

.barem-pts {
  font-weight: 700;
  color: var(--primary);
  font-size: .82rem;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .reco-grid { grid-template-columns: 1fr; }
  .reco-item { border-right: none; }
  .reco-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .reco-item:last-child { border-bottom: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   FAQ Pronote
   ══════════════════════════════════════════════════════════════════════════ */

.faq-pronote {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.faq-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, var(--primary-l) 0%, #F0FFF0 100%);
  border-bottom: 1px solid var(--border);
}

/* Version bouton toggle (cliquable pour ouvrir/fermer) */
button.faq-header {
  width: 100%;
  border: none;
  cursor: pointer;
  align-items: center;
  border-bottom: none;
  border-radius: 12px;
  transition: background .15s;
}

button.faq-header[aria-expanded="true"] {
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid var(--border);
}

button.faq-header:hover {
  background: linear-gradient(135deg, #d6f0d6 0%, #e8ffe8 100%);
}

.faq-subtitle-full {
  font-size: .82rem;
  color: var(--text-m);
  line-height: 1.5;
  padding: .8rem 1.4rem .4rem;
  background: #FAFAFA;
  border-bottom: 1px solid var(--border);
}

.faq-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: .2rem;
}

.faq-subtitle {
  font-size: .82rem;
  color: var(--text-m);
  line-height: 1.5;
}

.faq-categories {
  display: flex;
  flex-direction: column;
}

/* Catégorie */
.faq-cat {
  border-bottom: 1px solid var(--border);
}

.faq-cat:last-child {
  border-bottom: none;
}

.faq-cat-label {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.4rem .5rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-l);
  background: #FAFAFA;
  border-bottom: 1px solid var(--border);
}

/* Accordéon item */
.faq-item {
  border-bottom: 1px solid #F1F5F9;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1.4rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}

.faq-item > summary::-webkit-details-marker { display: none; }

.faq-item > summary::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-l);
  flex-shrink: 0;
  transition: transform .2s;
  line-height: 1;
}

.faq-item[open] > summary::after {
  content: "−";
}

.faq-item > summary:hover {
  background: #F8FFF8;
  color: var(--primary);
}

.faq-item[open] > summary {
  background: #F0FFF4;
  color: var(--primary);
  font-weight: 600;
}

.faq-answer {
  padding: .1rem 1.4rem 1rem 1.4rem;
  font-size: .85rem;
  color: var(--text-m);
  line-height: 1.65;
  animation: faq-open .15s ease;
}

.faq-answer strong {
  color: var(--text);
}

.faq-highlight {
  display: block;
  background: var(--primary-l);
  border-left: 3px solid var(--primary);
  padding: .6rem .9rem;
  border-radius: 0 6px 6px 0;
  font-size: .86rem;
  color: var(--text-m);
  line-height: 1.6;
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .faq-header { padding: 1rem; gap: .7rem; }
  .faq-item > summary { padding: .75rem 1rem; }
  .faq-answer { padding: .1rem 1rem .9rem 1rem; }
  .faq-cat-label { padding: .6rem 1rem .45rem; }
}

/* ── Lucide icons – tailles utilitaires ─────────────────────────────────── */
.lucide, [data-lucide] { display: inline-block; vertical-align: middle; }
.icon-xs  svg, .icon-xs  { width: 14px; height: 14px; }
.icon-sm  svg, .icon-sm  { width: 16px; height: 16px; }
.icon-md  svg, .icon-md  { width: 20px; height: 20px; }
.icon-lg  svg, .icon-lg  { width: 24px; height: 24px; }
.icon-xl  svg, .icon-xl  { width: 36px; height: 36px; }
.icon-2xl svg, .icon-2xl { width: 48px; height: 48px; }
.btn i[data-lucide], .btn svg.lucide { vertical-align: middle; }
.form-label i[data-lucide], .form-label svg.lucide { vertical-align: middle; margin-right: .25rem; }
.sidebar-title i[data-lucide], .sidebar-title svg.lucide { vertical-align: middle; margin-right: .3rem; }

/* ══════════════════════════════════════════════════════════════════════════
   SECTION CONTENU PÉDAGOGIQUE SOURCE — Premium
   ══════════════════════════════════════════════════════════════════════════ */

/* Carte principale — halo vert subtil + filet coloré en haut */
#courseSection {
  border-color: #A5D6A7;
  border-top: 3px solid var(--primary);
  background: linear-gradient(160deg, #F6FFF6 0%, #ffffff 55%);
  box-shadow: 0 2px 18px rgba(45,107,45,.11), 0 1px 4px rgba(0,0,0,.05);
}

/* Médaillon icône titre */
.course-icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--primary-l);
  border: 1px solid #A5D6A7;
}
.course-icon-wrap [data-lucide] { color: var(--primary); }

/* Titre et sous-titre de section */
.course-title    { font-size: 1.08rem; font-weight: 700; color: var(--text); margin-bottom: .15rem; line-height: 1.3; }
.course-subtitle { font-size: .83rem; color: var(--text-m); margin: 0; line-height: 1.5; }

/* Badge Recommandé — version renforcée */
.badge-recommended {
  display: inline-flex; align-items: center;
  padding: .28rem .8rem;
  border-radius: 20px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  background: #FEF3C7; color: #78350F;
  border: 1.5px solid #FCD34D;
  flex-shrink: 0; white-space: nowrap;
}

/* Onglets cours — premium */
.course-tabs {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px; gap: 4px;
  margin-bottom: 1.2rem;
}
.course-tab {
  flex: 1; padding: .5rem .5rem;
  text-align: center; border-radius: 7px;
  font-size: .88rem; font-weight: 600;
  cursor: pointer; border: none;
  background: transparent; color: var(--text-m);
  transition: all .18s;
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
}
.course-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 5px rgba(45,107,45,.14), 0 0 0 1px rgba(45,107,45,.07);
}
.course-tab:hover:not(.active) { background: rgba(45,107,45,.06); color: var(--text); }

/* Dropzone — présence renforcée */
.course-dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--bg);
}

/* Médaillon icône upload */
.course-drop-icon {
  display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--primary-l);
  border: 1px solid #A5D6A7;
  margin: 0 auto .75rem;
}
.course-drop-icon [data-lucide] { color: var(--primary); }

/* Textes dropzone */
.course-drop-title    { font-weight: 700; font-size: .95rem; color: var(--text); margin-bottom: .3rem; }
.course-drop-subtitle { font-size: .78rem; color: var(--text-l); }

/* ── Support Chat Widget ────────────────────────────────────────────────── */
#scw {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
}

/* Bouton flottant */
#scw-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem 1.2rem;
  background: var(--primary); color: #fff;
  border: none; border-radius: 50px;
  font-family: inherit; font-size: .86rem; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(45,107,45,.38);
  transition: background .18s, transform .18s, box-shadow .18s;
}
#scw-btn:hover {
  background: var(--primary-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(45,107,45,.46);
}

/* Panneau */
#scw-panel {
  display: none;
  flex-direction: column;
  width: 370px;
  max-height: 540px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
#scw-panel.scw-open { display: flex; }

/* En-tête vert */
#scw-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem;
  padding: 1rem 1.1rem .8rem;
  background: var(--primary); color: #fff;
}
#scw-title { font-weight: 700; font-size: 1rem; }
#scw-sub   { font-size: .77rem; opacity: .85; margin-top: .2rem; line-height: 1.4; }
#scw-close {
  background: rgba(255,255,255,.18); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: .88rem; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
#scw-close:hover { background: rgba(255,255,255,.35); }

/* Suggestions rapides */
#scw-chips {
  display: flex; flex-wrap: wrap; gap: .35rem;
  padding: .7rem .9rem .5rem;
  border-bottom: 1px solid var(--border);
}
.scw-chip {
  background: var(--primary-l); color: var(--primary);
  border: 1px solid #c0dac0; border-radius: 20px;
  padding: .25rem .7rem;
  font-size: .76rem; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: background .14s;
}
.scw-chip:hover { background: #c8e0c8; }

/* Zone réponse */
#scw-resp {
  flex: 1; overflow-y: auto;
  padding: .85rem .95rem;
  min-height: 60px;
  font-size: .875rem;
}
.scw-answer { color: var(--text); line-height: 1.65; }
.scw-sources {
  margin-top: .55rem;
  font-size: .74rem; color: var(--text-l);
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem;
}
.scw-stag {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 5px; padding: .1rem .4rem;
}
.scw-err {
  color: #B91C1C; font-size: .84rem;
  background: #FEF2F2; border: 1px solid #FECACA;
  border-radius: 8px; padding: .55rem .8rem;
}
.scw-loading {
  display: flex; align-items: center; gap: .5rem;
  color: var(--text-l); font-size: .84rem;
}
.scw-dots { display: flex; gap: 3px; }
.scw-dots span {
  width: 7px; height: 7px;
  background: var(--primary); border-radius: 50%;
  animation: scwBounce .9s ease-in-out infinite;
}
.scw-dots span:nth-child(2) { animation-delay: .16s; }
.scw-dots span:nth-child(3) { animation-delay: .32s; }
@keyframes scwBounce {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50%       { transform: translateY(-5px); opacity: 1; }
}

/* Pied — saisie */
#scw-foot {
  display: flex; align-items: flex-end; gap: .45rem;
  padding: .55rem .7rem .65rem;
  border-top: 1px solid var(--border);
}
#scw-input {
  flex: 1;
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: .45rem .7rem;
  font-size: .875rem; font-family: inherit; color: var(--text);
  background: var(--bg); resize: none; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
#scw-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,107,45,.12);
}
#scw-send {
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
#scw-send:hover:not(:disabled) { background: var(--primary-d); }
#scw-send:disabled { opacity: .45; cursor: not-allowed; }

/* Disclaimer bas */
#scw-note {
  padding: .35rem .85rem .5rem;
  font-size: .7rem; color: var(--text-l);
  text-align: center; line-height: 1.4;
  border-top: 1px solid var(--border);
}

/* Mobile */
@media (max-width: 480px) {
  #scw {
    bottom: 1rem; left: 1rem; right: 1rem;
    align-items: stretch;
  }
  #scw-btn { align-self: flex-end; }
  #scw-panel { width: 100%; max-height: 72vh; }
}
