/* ============================================================
   PSYCHOFACILE.FR — Design system
   Police : Inter (corps) + Playfair Display (titres)
   Palette : violet profond + blanc + accents teal
   ============================================================ */

:root {
  --purple:      #534AB7;
  --purple-dark: #3C3489;
  --purple-light:#EEEDFE;
  --purple-mid:  #AFA9EC;
  --teal:        #1D9E75;
  --teal-light:  #E1F5EE;
  --gray-50:     #F8F8F6;
  --gray-100:    #F1EFE8;
  --gray-200:    #D3D1C7;
  --gray-400:    #888780;
  --gray-700:    #444441;
  --gray-900:    #1A1A19;
  --white:       #FFFFFF;
  --font-body:   'Inter', system-ui, sans-serif;
  --font-display:'Playfair Display', Georgia, serif;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- NAV ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--gray-200);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 18px;
}
.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--purple);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
}
.logo-text { color: var(--gray-900); }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--gray-400);
}
.nav-links a:hover { color: var(--purple); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--gray-900); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-burger { display: flex; }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    border-bottom: 0.5px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .2s ease;
    z-index: 100;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { padding: 12px 4px; border-bottom: 0.5px solid var(--gray-100); font-size: 15px; }
  .nav-links a.btn { text-align: center; margin-top: 8px; }
}

/* ---- HERO ---- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px 80px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--teal);
  background: var(--teal-light);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  font-weight: 500;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: italic;
  color: var(--purple);
}
.hero-sub {
  font-size: 17px;
  color: var(--gray-400);
  margin-bottom: 32px;
  line-height: 1.7;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-disclaimer {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .15s;
}
.btn-primary {
  background: var(--purple);
  color: white;
}
.btn-primary:hover { background: var(--purple-dark); }
.btn-outline {
  background: white;
  color: var(--gray-700);
  border: 0.5px solid var(--gray-200);
}
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }

/* ---- PSYCHE CARD (hero) ---- */
.psyche-card {
  background: white;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.psyche-avatar {
  width: 48px;
  height: 48px;
  background: var(--purple);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 16px;
}
.psyche-bubble {
  background: var(--purple-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.psyche-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 4px;
}
.psyche-msg { font-size: 14px; color: var(--gray-700); line-height: 1.5; }
.demo-questions { display: flex; flex-direction: column; gap: 8px; }
.demo-q {
  text-align: left;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  transition: all .15s;
}
.demo-q:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-light); }

/* ---- STATS ---- */
.stats {
  background: var(--gray-50);
  border-top: 0.5px solid var(--gray-200);
  border-bottom: 0.5px solid var(--gray-200);
  padding: 32px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--purple);
  font-weight: 700;
}
.stat-label {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 4px;
  display: block;
}

/* ---- SECTIONS COMMUNES ---- */
section { padding: 80px 0; }
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 12px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  color: var(--gray-900);
  margin-bottom: 12px;
}
.section-header p { color: var(--gray-400); max-width: 520px; margin: 0 auto; }

/* ---- PARCOURS ---- */
.parcours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.parcours-card {
  position: relative;
  background: white;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  transition: box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.parcours-free:hover {
  border-color: var(--purple-mid);
  box-shadow: var(--shadow-md);
}
.parcours-soon { opacity: .6; cursor: default; }
.parcours-icon {
  font-size: 24px;
  color: var(--purple);
}
.parcours-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.parcours-badge.free { background: var(--teal-light); color: var(--teal); }
.parcours-badge.soon { background: var(--gray-100); color: var(--gray-400); }
.parcours-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
}
.parcours-card p { font-size: 14px; color: var(--gray-400); }
.parcours-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.parcours-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-700);
}
.parcours-list .ti-check { color: var(--teal); }
.parcours-list .ti-clock { color: var(--gray-400); }
.parcours-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  margin-top: auto;
  padding-top: 8px;
}
.parcours-link.muted { color: var(--gray-400); }

/* ---- PSYCHE SECTION ---- */
.psyche-section { background: var(--gray-50); }
.psyche-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.psyche-text h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  margin: 12px 0 16px;
}
.psyche-text > p { color: var(--gray-400); margin-bottom: 24px; }
.psyche-features { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.pf {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--gray-700);
}
.pf i { color: var(--purple); font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.disclaimer-box {
  display: flex;
  gap: 10px;
  background: var(--purple-light);
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}
.disclaimer-box i { color: var(--purple); flex-shrink: 0; font-size: 16px; margin-top: 2px; }

/* ---- CHAT WINDOW ---- */
.chat-window {
  background: white;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 0.5px solid var(--gray-200);
  background: var(--gray-50);
}
.chat-avatar {
  width: 36px;
  height: 36px;
  background: var(--purple);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  flex-shrink: 0;
}
.chat-name { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.chat-status {
  font-size: 11px;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 4px;
}
.dot {
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  display: inline-block;
}
.chat-body {
  padding: 16px;
  min-height: 180px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  max-width: 88%;
}
.chat-msg.assistant {
  background: var(--purple-light);
  color: var(--gray-700);
  align-self: flex-start;
}
.chat-msg.user {
  background: var(--purple);
  color: white;
  align-self: flex-end;
}
.chat-msg.typing { color: var(--gray-400); font-style: italic; }
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 0.5px solid var(--gray-200);
  background: var(--gray-50);
}
.chat-input-row input, .psyche-panel-footer input {
  flex: 1;
  padding: 9px 14px;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  background: white;
}
.chat-input-row input:focus, .psyche-panel-footer input:focus {
  border-color: var(--purple);
}
.chat-send {
  width: 36px;
  height: 36px;
  background: var(--purple);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background .15s;
  flex-shrink: 0;
}
.chat-send:hover { background: var(--purple-dark); }

/* ---- PARRAINAGE ---- */
.parrainage { background: var(--purple); }
.parrainage .section-header h2,
.parrainage .eyebrow { color: white; }
.parrainage .section-header p { color: rgba(255,255,255,.7); }
.parrainage .eyebrow { color: var(--purple-mid); }
.parrainage-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.para-step {
  background: rgba(255,255,255,.1);
  border: 0.5px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  flex: 1;
  min-width: 180px;
  max-width: 240px;
}
.para-num {
  width: 36px;
  height: 36px;
  background: white;
  color: var(--purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin: 0 auto 12px;
}
.para-step h4 { font-size: 15px; color: white; margin-bottom: 6px; }
.para-step p { font-size: 13px; color: rgba(255,255,255,.7); }
.para-arrow { color: rgba(255,255,255,.4); font-size: 20px; padding-top: 30px; }
.parrainage-cta {
  display: flex;
  gap: 10px;
  max-width: 540px;
  margin: 0 auto 12px;
}
.parrainage-cta input {
  flex: 1;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 0.5px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  color: white;
  font-size: 13px;
  font-family: var(--font-body);
}
.parrainage-note {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.5);
}

/* ---- FOOTER ---- */
.footer {
  background: var(--gray-900);
  padding: 60px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}
.footer-brand .logo-mark { background: var(--purple); }
.footer-brand .logo-text { color: white; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand p { font-size: 13px; color: var(--gray-400); max-width: 380px; line-height: 1.6; }
.footer-links { display: flex; gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h5 { font-size: 12px; font-weight: 600; color: var(--gray-200); letter-spacing: .08em; text-transform: uppercase; }
.footer-col a { font-size: 13px; color: var(--gray-400); }
.footer-col a:hover { color: white; }
.footer-bottom {
  border-top: 0.5px solid rgba(255,255,255,.08);
  padding: 20px 0;
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
}

/* ---- PSYCHE FLOATING ---- */
.psyche-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--purple);
  color: white;
  border-radius: 28px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(83,74,183,.4);
  z-index: 200;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.psyche-float:hover { background: var(--purple-dark); transform: translateY(-2px); }
.psyche-float-icon { font-family: var(--font-display); font-size: 18px; }
.psyche-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 360px;
  background: white;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 200;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.psyche-panel.open { display: flex; }
.psyche-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--gray-50);
  border-bottom: 0.5px solid var(--gray-200);
}
.psyche-panel-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.psyche-panel-footer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 0.5px solid var(--gray-200);
  background: var(--gray-50);
}
.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 18px;
  display: flex;
  align-items: center;
}
.close-btn:hover { color: var(--gray-900); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .parcours-grid { grid-template-columns: 1fr; }
  .psyche-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .parrainage-grid { flex-direction: column; align-items: center; }
  .para-arrow { transform: rotate(90deg); padding: 0; }
  .psyche-panel { width: calc(100vw - 32px); right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- CALENDRIER ANNEE ---- */
.calendrier-annee { background: var(--gray-50); }
.cal-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 920px;
  margin: 0 auto 40px;
}
.cal-step {
  background: white;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .15s, border-color .15s;
}
.cal-step:hover { box-shadow: var(--shadow-md); border-color: var(--purple-mid); }
.cal-dot {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: white; }
.cal-dot.cal-rentree { background: var(--teal); }
.cal-dot.cal-cours { background: var(--purple); }
.cal-dot.cal-exam { background: #DC2626; }
.cal-dot.cal-rattrapage { background: #D97706; }
.cal-content { flex: 1; }
.cal-month {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cal-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin: 4px 0 6px;
}
.cal-content p {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.6;
}

.cal-glossaire {
  max-width: 720px;
  margin: 0 auto;
  background: white;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.cal-glossaire h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal-glossaire h3 i { color: var(--purple); }
.cal-terms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.cal-term {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}
.cal-term strong { color: var(--purple); }
.cal-note {
  display: flex;
  gap: 8px;
  background: var(--purple-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--purple-dark);
  line-height: 1.5;
}
.cal-note i { flex-shrink: 0; margin-top: 1px; }

@media (max-width: 700px) {
  .cal-timeline { grid-template-columns: 1fr; }
  .cal-terms { grid-template-columns: 1fr; }
}