/* Le Répétiteur — feuille de style unique, sans framework.
   Couleurs reprises du thème de l'application (vert et orange, fond crème). */
:root {
  --vert: #0b7a55;
  --vert-fonce: #075c40;
  --vert-clair: #ddf1e8;
  --orange: #f07f13;
  --orange-clair: #fdebd8;
  --orange-texte: #8a4300;
  --fond: #fbf8f3;
  --surface: #ffffff;
  --texte: #1d2826;
  --texte-doux: #4f5c58;
  --bordure: #e8e2d9;
  --alerte: #c2410c;
  --ombre: 0 1px 2px rgba(29, 40, 38, .06), 0 4px 16px rgba(29, 40, 38, .06);
  --rayon: 16px;
  --largeur: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --vert: #4cc898;
    --vert-fonce: #7fdcb6;
    --vert-clair: #12382b;
    --orange: #f7a04d;
    --orange-clair: #3a2614;
    --orange-texte: #f7b878;
    --fond: #111816;
    --surface: #18221f;
    --texte: #e9efed;
    --texte-doux: #a9b7b2;
    --bordure: #2a3733;
    --alerte: #fb8a5c;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 112px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 6vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.55rem, 4.5vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

a { color: var(--vert); text-underline-offset: 3px; }
a:hover { color: var(--vert-fonce); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

.lien-evitement {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--surface); padding: 8px 14px; border-radius: 8px;
}
.lien-evitement:focus { left: 8px; }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .conteneur { padding: 0 28px; } }

/* En-tête */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--fond) 92%, transparent);
  border-bottom: 1px solid var(--bordure);
  backdrop-filter: blur(8px);
}
@supports not (background: color-mix(in srgb, red, blue)) { .entete { background: var(--fond); } }
.entete .conteneur { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.marque {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; color: var(--texte); text-decoration: none;
}
.marque svg { width: 36px; height: 36px; flex: none; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--texte); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav a:hover { background: var(--vert-clair); color: var(--vert-fonce); }
@media (max-width: 759px) {
  .entete .conteneur { padding-top: 8px; }
  .nav { margin: 0 -16px; width: calc(100% + 32px); overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav ul { padding: 0 10px 8px; }
  .nav a { padding: 6px 11px; font-size: .9rem; white-space: nowrap; }
}

/* Boutons et badges */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: 14px;
  font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent;
}
.bouton-principal { background: var(--vert); color: #fff; }
.bouton-principal:hover { background: var(--vert-fonce); color: #fff; }
@media (prefers-color-scheme: dark) {
  .bouton-principal, .bouton-principal:hover { color: #0b1f18; }
}
.bouton-secondaire { border-color: var(--vert); color: var(--vert); background: transparent; }
.bouton-secondaire:hover { background: var(--vert-clair); }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  background: var(--orange-clair); color: var(--orange-texte);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }

/* Sections */
section { padding: 56px 0; }
@media (min-width: 900px) { section { padding: 84px 0; } }
.section-alt { background: var(--surface); border-block: 1px solid var(--bordure); }
.chapeau { max-width: 720px; margin-bottom: 32px; }
.chapeau p { color: var(--texte-doux); font-size: 1.1rem; }
.surtitre {
  display: block; color: var(--orange-texte); font-weight: 800; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px;
}

/* Héros */
.heros { padding: 40px 0 56px; }
.heros .conteneur { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .heros { padding: 72px 0 88px; }
  .heros .conteneur { grid-template-columns: 1.1fr .9fr; }
}
.heros h1 span { color: var(--vert); }
.heros .intro { font-size: 1.2rem; color: var(--texte-doux); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.actions .bouton { flex: 1 1 200px; }
@media (min-width: 600px) { .actions .bouton { flex: 0 0 auto; } }
.petit { font-size: .92rem; color: var(--texte-doux); }

/* Maquette de téléphone (dessinée en HTML, pas d'image) */
.telephone {
  width: 100%; max-width: 320px; margin: 0 auto;
  background: var(--texte); border-radius: 36px; padding: 12px;
  box-shadow: 0 20px 50px rgba(11, 122, 85, .18);
}
@media (prefers-color-scheme: dark) { .telephone { background: #000; } }
.ecran {
  background: #fbf8f3; color: #1d2826; border-radius: 26px; padding: 18px 16px 20px;
  display: grid; gap: 12px; font-size: .9rem; line-height: 1.4;
}
.ecran-haut { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.ecran-haut small { font-weight: 600; color: #5e6b67; }
.carte-app { background: #fff; border: 1px solid #e8e2d9; border-radius: 16px; padding: 12px 14px; }
.carte-app .etiquette { color: #5e6b67; font-size: .8rem; }
.moyenne { font-size: 2.2rem; font-weight: 800; color: #0b7a55; line-height: 1.1; }
.moyenne small { font-size: 1rem; color: #5e6b67; font-weight: 600; }
.ligne-matiere { display: flex; justify-content: space-between; padding: 4px 0; border-top: 1px solid #f0ebe3; }
.ligne-matiere:first-of-type { border-top: 0; }
.ligne-matiere b { color: #0b7a55; }
.ligne-matiere b.bas { color: #c2410c; }
.alerte-app { background: #fdebd8; color: #7a3a00; border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.compte-rebours { background: #ddf1e8; color: #075c40; border-radius: 12px; padding: 10px 12px; font-weight: 600; }

/* Grilles de cartes */
.grille { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grille-2, .grille-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grille-3 { grid-template-columns: repeat(3, 1fr); } }
.carte {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon);
  padding: 22px; box-shadow: var(--ombre);
}
.section-alt .carte { background: var(--fond); box-shadow: none; }
.carte p:last-child, .carte ul:last-child { margin-bottom: 0; }
.carte p { color: var(--texte-doux); }
.icone {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--vert-clair); color: var(--vert); margin-bottom: 14px;
}
.icone svg { width: 26px; height: 26px; }
.icone-orange { background: var(--orange-clair); color: var(--orange-texte); }

/* Problèmes résolus */
.probleme { display: flex; gap: 14px; align-items: flex-start; }
.probleme .icone { flex: none; margin: 0; }
.probleme h3 { margin-bottom: .25em; }

/* Comment ça marche */
.parcours ol { list-style: none; counter-reset: etape; margin: 0; padding: 0; display: grid; gap: 14px; }
.parcours li { counter-increment: etape; position: relative; padding-left: 44px; color: var(--texte-doux); }
.parcours li::before {
  content: counter(etape); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--vert); color: var(--surface); font-weight: 800; font-size: .9rem;
}
.parcours li strong { color: var(--texte); }
.parcours .qui { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.parcours .qui .icone { margin: 0; }
.parcours .qui h3 { margin: 0; }

/* Exercices */
.chiffre-cle {
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; margin-bottom: 28px;
}
.chiffre-cle strong { font-size: clamp(2.4rem, 9vw, 3.6rem); color: var(--vert); line-height: 1; }
.matieres { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .matieres { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .matieres { grid-template-columns: repeat(3, 1fr); } }
.matieres li {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  background: var(--surface); border: 1px solid var(--bordure); border-radius: 12px; padding: 12px 16px;
}
.section-alt .matieres li { background: var(--fond); }
.matieres span { color: var(--texte-doux); font-size: .92rem; text-align: right; }

/* Tarifs */
.tarifs { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 900px) { .tarifs { grid-template-columns: repeat(3, 1fr); } }
.offre { display: flex; flex-direction: column; position: relative; }
.offre h3 { font-size: 1.35rem; margin-bottom: 4px; }
.offre .pour { color: var(--texte-doux); margin-bottom: 16px; }
.offre-vedette { border: 2px solid var(--vert); }
.offre-vedette .ruban {
  position: absolute; top: -13px; left: 22px; background: var(--vert); color: var(--surface);
  font-size: .8rem; font-weight: 800; padding: 3px 12px; border-radius: 999px;
}
.prix { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 6px; }
.prix li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--vert-clair); }
.prix li b { font-size: 1.1rem; color: var(--vert-fonce); white-space: nowrap; }
.carte .prix-gratuit { font-size: 2rem; font-weight: 800; color: var(--vert); margin-bottom: 18px; line-height: 1.1; }
.coches { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.coches li { position: relative; padding-left: 30px; }
.coches li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--vert-clair) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%230b7a55' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .coches li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%234cc898' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}
.encadre {
  margin-top: 24px; padding: 18px 20px; border-radius: var(--rayon);
  background: var(--orange-clair); color: var(--texte);
}
.encadre p:last-child { margin: 0; }
.encadre strong { color: var(--orange-texte); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: 14px; padding: 0 18px;
}
.section-alt .faq details { background: var(--fond); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 700; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--vert);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--texte-doux); }

/* Contact */
.contact { text-align: center; }
.contact .chapeau { margin: 0 auto 24px; }
.contact .bouton { word-break: break-all; }

/* Pied de page */
.pied { padding: 36px 0 48px; border-top: 1px solid var(--bordure); color: var(--texte-doux); font-size: .95rem; }
.pied .conteneur { display: grid; gap: 18px; }
@media (min-width: 760px) { .pied .conteneur { grid-template-columns: 1fr auto; align-items: center; } }
.pied ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; }
.pied p { margin: 0; }

/* Pages de texte (confidentialité, conditions, 404) */
.page-texte { padding: 40px 0 64px; }
.page-texte .conteneur { max-width: 780px; }
.page-texte h2 { font-size: 1.35rem; margin-top: 2em; }
.page-texte ul { padding-left: 1.2em; }
.page-texte li { margin-bottom: .4em; }
.provisoire {
  border-left: 5px solid var(--orange); background: var(--orange-clair);
  padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 0 0 28px;
}
.provisoire p { margin: 0; }
.retour { display: inline-block; margin-bottom: 20px; font-weight: 600; }
.introuvable { text-align: center; padding: 72px 0 96px; }
.introuvable .code { font-size: 5rem; font-weight: 900; color: var(--vert); line-height: 1; }
.introuvable .actions { justify-content: center; }
.note-exercices { margin-top: 18px; }
@media (min-width: 760px) { html { scroll-padding-top: 76px; } }
