:root {
  --bg: #faf7f0;
  --ink: #182038;
  --muted: #5a6278;
  --accent: #e65c3c;
  --blue: #3468c4;
  --green: #28966e;
  --board: #1c3430;
  --wood: #966840;
  --card: #ffffff;
  --line: #ebe5d8;
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.topband { height: 8px; background: var(--accent); }

/* NAV */
.nav {
  max-width: 1150px; margin: 0 auto; padding: 22px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.brand { font-family: "Fraunces", serif; font-weight: 800; font-size: 1.6rem; text-decoration: none; }
.brand span { color: var(--accent); }
.nav nav { display: flex; gap: 26px; align-items: center; }
.nav nav a { text-decoration: none; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.nav .nav-cta { background: var(--ink); color: var(--bg) !important; padding: 8px 18px; border-radius: 999px; }

/* HERO */
.hero {
  max-width: 1150px; margin: 0 auto; padding: 40px 24px 80px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.pill {
  display: inline-block; background: var(--ink); color: var(--bg);
  padding: 7px 18px; border-radius: 999px; font-weight: 600; font-size: .85rem;
  letter-spacing: .06em; text-transform: uppercase;
}
.pill.dark { background: var(--accent); }
h1 { margin: 0 0 6px; font-family: "Fraunces", serif; font-weight: 800; line-height: .98; font-size: clamp(3.2rem, 8vw, 5.6rem); }
.subj { display: block; opacity: 0; transform: translateY(18px); animation: rise .7s forwards; }
.subj.maths { color: var(--blue); }
.subj.phys  { color: var(--green); animation-delay: .15s; }
.subj.nsi   { color: var(--accent); animation-delay: .3s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.level { font-weight: 700; font-size: 1.35rem; margin-bottom: 14px; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 28px; }
.price-tag {
  font-family: "Fraunces", serif; font-weight: 800; font-size: 1.7rem;
  background: #fff; border: 2px dashed var(--accent); color: var(--accent);
  padding: 4px 18px; border-radius: 14px; transform: rotate(-2deg);
}
.price-tag small { font-size: 1rem; }
.badge-ai { margin-top: 18px; color: var(--green); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 600 1rem "Inter", sans-serif; text-decoration: none;
  padding: 13px 24px; border-radius: 14px; border: 2px solid transparent;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 0 #b8432a; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #b8432a; }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 2px 0 #b8432a; }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* BOARD */
.board-wrap { perspective: 900px; }
.board {
  position: relative; background: var(--board); border: 16px solid var(--wood);
  border-radius: var(--radius); padding: 18px 14px 30px;
  box-shadow: 14px 18px 0 #d7d0c0, inset 0 0 60px rgba(0,0,0,.35);
  transform: rotateY(-6deg) rotateX(2deg); transition: transform .4s;
}
.board:hover { transform: none; }
.chalk { width: 100%; height: auto; overflow: visible; }
.chalk path, .chalk ellipse { fill: none; stroke-width: 3; stroke-linecap: round; }
.chalk .hand { font-family: "Caveat", cursive; font-size: 22px; font-weight: 700; }
.chalk .hand.big { font-size: 28px; }
.chalk .code { font-family: ui-monospace, "DejaVu Sans Mono", monospace; font-size: 13px; fill: #ecf0e8; font-weight: 700; }
.chalk .draw { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.4s .4s ease-out forwards; }
.chalk .draw.slow { animation-duration: 2.2s; animation-delay: 1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chalk text { opacity: 0; animation: fade .8s forwards; }
.chalk text:nth-of-type(1) { animation-delay: 1.2s; }
.chalk text:nth-of-type(2) { animation-delay: 1.3s; }
.chalk text:nth-of-type(3) { animation-delay: 1.6s; }
.chalk text:nth-of-type(4) { animation-delay: 1.9s; }
.chalk text:nth-of-type(5) { animation-delay: 2.2s; }
.chalk text:nth-of-type(6) { animation-delay: 2.5s; }
.chalk text:nth-of-type(7) { animation-delay: 2.7s; }
.chalk text:nth-of-type(8) { animation-delay: 2.9s; }
@keyframes fade { to { opacity: 1; } }
.electron { offset-path: path("M -52 0 A 52 18 0 1 0 52 0 A 52 18 0 1 0 -52 0"); animation: orbit 3s linear infinite; }
@keyframes orbit { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.chalks { position: absolute; right: 22px; bottom: 10px; display: flex; gap: 10px; }
.chalks span { width: 44px; height: 8px; border-radius: 4px; background: #ecf0e8; }
.chalks span + span { background: #f6d66e; }

/* SECTIONS */
.section { max-width: 1150px; margin: 0 auto; padding: 70px 24px; }
.section h2 { font-family: "Fraunces", serif; font-weight: 800; font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 28px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; border-top: 6px solid var(--c);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(24,32,56,.09); }
.c-maths { --c: var(--blue); } .c-phys { --c: var(--green); } .c-nsi { --c: var(--accent); }
.card-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font: 700 1.5rem "Fraunces", serif; color: #fff; background: var(--c); margin-bottom: 18px;
}
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card p { color: var(--muted); }
.levels { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.levels span { background: #fff; border: 1px solid var(--line); padding: 6px 16px; border-radius: 999px; font-weight: 500; font-size: .95rem; }

.pricing-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center;
  background: var(--ink); color: var(--bg); border-radius: 28px; padding: 48px;
  position: relative; overflow: hidden;
}
.pricing-box::after {
  content: "€"; position: absolute; right: -20px; bottom: -90px;
  font: 800 18rem "Fraunces", serif; color: rgba(255,255,255,.04);
}
.pricing-box h2 { margin-bottom: 8px; }
.big-price { font: 800 3.4rem "Fraunces", serif; color: #f6d66e; line-height: 1.1; margin-bottom: 10px; }
.big-price small { font-size: 1.2rem; color: var(--bg); }
.pricing-box p { color: #c9cbd6; }
.ai-box { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 28px; position: relative; z-index: 1; }
.ai-box h3 { color: #8cc8f0; margin-bottom: 8px; font-size: 1.3rem; }
.ai-box strong { color: #fff; }

.profile {
  display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 40px;
}
.profile img {
  width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: center 20%;
  border-radius: 50%; border: 8px solid var(--bg); box-shadow: 0 0 0 4px var(--accent);
}
.name { margin: 14px 0 10px !important; }
.name .last { color: var(--accent); }
.bio { color: var(--muted); font-size: 1.08rem; margin-bottom: 24px; max-width: 32em; }
.mail-row { display: flex; flex-wrap: wrap; gap: 14px; }

footer { text-align: center; padding: 40px 24px 50px; color: var(--muted); font-size: .9rem; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 120px);
  background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 12px;
  font-weight: 600; transition: transform .3s;
}
.toast.show { transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero, .pricing-box { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .board { transform: none; }
  .profile { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 30px 20px; }
  .profile img { max-width: 220px; }
  .mail-row { justify-content: center; }
  .pricing-box { padding: 32px 22px; }
}
@media (max-width: 520px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .hero { padding: 20px 16px 50px; gap: 36px; }
  .section { padding: 50px 16px; }
  .btn { font-size: .92rem; padding: 12px 16px; word-break: break-all; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .subj, .chalk text, .reveal { opacity: 1; transform: none; }
  .chalk .draw { stroke-dashoffset: 0; }
}

/* Cartes matières compactes */
.card { display: flex; align-items: center; gap: 18px; padding: 24px 26px; }
.card .card-icon { margin-bottom: 0; flex-shrink: 0; }
.card h3 { margin: 0; font-size: 1.5rem; }
.bio .bac { color: var(--accent); }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

/* Tarifs sur une colonne, texte justifié */
.pricing-box { grid-template-columns: 1fr; }
.lead, .bio, .pricing-box p:not(.big-price) { text-align: justify; hyphens: auto; }

/* Pastille dans le H1 (SEO : le mot-clé fait partie du titre principal) */
.h1-pill { font-family: "Inter", system-ui, sans-serif; line-height: 1.6; margin-bottom: 22px; }

