/* Plan de formation — feuille de style commune */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1c2024;
  --muted: #666e7a;
  --accent: #3d5afe;
  --accent-soft: #eef1ff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
/* Colonne pleine hauteur : sans cela, sur une page courte le pied de page
   remonte au milieu de l'écran et laisse un vide gris en dessous. */
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
.site-footer { margin-top: auto; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* Header / fil d'Ariane */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky; top: 0; z-index: 10;
}
.breadcrumb { font-size: .85rem; color: var(--muted); }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 8px; color: var(--border); }

/* Hero */
.hero { padding: 48px 0 32px; }
.hero .wrap { max-width: 960px; }
.hero h1 { font-size: 2rem; margin: 0 0 10px; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--muted); max-width: 70ch; }
.eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}

/* Grille de cartes */
main { padding-bottom: 64px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 10px 24px rgba(61,90,254,.10);
}
.card h2 { font-size: 1.15rem; margin: 0 0 6px; }
.card h3 { font-size: 1rem; margin: 0 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.card .meta { margin-top: 12px; font-size: .8rem; color: var(--muted); }

/* Carte de partie (accueil) : liste des modules pour étoffer la carte */
/* align-items évite que la pastille .eyebrow soit étirée sur toute la largeur */
.part-card { display: flex; flex-direction: column; align-items: stretch; }
.part-card .eyebrow { align-self: flex-start; }
.part-card h2 { margin-bottom: 14px; }
.mini-list {
  list-style: none; margin: 0 0 auto; padding: 0 0 14px;
  border-top: 1px solid var(--border); padding-top: 14px; flex: 1;
}
.mini-list li {
  display: flex; gap: 10px; align-items: baseline;
  font-size: .875rem; padding: 4px 0; color: var(--muted);
}
.mini-list .mod-num {
  flex: 0 0 auto; font-weight: 600; font-size: .72rem; color: var(--accent);
  background: var(--accent-soft); border-radius: 4px; padding: 1px 6px;
}
.part-card .meta {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-top: 1px solid var(--border); padding-top: 12px; margin-top: 0;
}
.part-card .go { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Liste de microressources */
.list { display: grid; gap: 10px; }
.item {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, background .15s;
}
a.item:hover { border-color: var(--accent); background: #fbfcff; }
.item .num {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 600;
}
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 600; margin: 2px 0 3px; }
.item .obj { color: var(--muted); font-size: .875rem; margin: 0; }
.item .tags { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Badges de type */
.badge {
  font-size: .72rem; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; white-space: nowrap;
  background: #eceef1; color: #4a515a;
}
.badge.theorie  { background: #e8f0fe; color: #1a56c4; }
.badge.outil    { background: #e6f6ed; color: #1a7f42; }
.badge.exemple  { background: #fff4e5; color: #a35c00; }
.badge.qcm      { background: #f3e8fd; color: #6b28c4; }
.badge.pratique { background: #fde8ec; color: #b3123c; }
.badge.duree    { background: transparent; color: var(--muted); border: 1px solid var(--border); }

/* Encadré livrable */
.livrable {
  margin-top: 20px; padding: 16px 18px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 6px; font-size: .9rem;
}
.livrable strong { display: block; margin-bottom: 4px; }

/* Fiche microressource (page de contenu) */
.fiche { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 40px 40px; box-shadow: var(--shadow); }
.fiche h1 { margin: 8px 0 12px; font-size: 1.6rem; letter-spacing: -.02em; }
.fiche .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.fiche dl { margin: 0 0 24px; }
.fiche dt { font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-top: 16px; }
.fiche dd { margin: 4px 0 0; }

/* Bandeau de titre d'une fiche : colonne de lecture, pas la pleine largeur */
.fiche-hero { padding: 40px 0 28px; background: var(--surface);
  border-bottom: 1px solid var(--border); }
.fiche-hero .wrap, main:has(.fiche) .wrap { max-width: 800px; }
/* text-wrap: balance évite qu'un titre laisse un mot (ou un « ? ») seul sur la dernière ligne */
.fiche-hero h1 { font-size: 1.8rem; margin: 10px 0 14px; text-wrap: balance; }
.fiche-hero .tags { display: flex; gap: 8px; flex-wrap: wrap; }
main:has(.fiche) { padding-top: 28px; }

/* Objectif pédagogique */
.objectif {
  border: 1px solid var(--border); border-left: 3px solid #1a7f42;
  background: #f4faf6; border-radius: 6px; padding: 14px 18px; margin-bottom: 14px;
}
.objectif .label, .sommaire .label {
  display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-bottom: 4px;
}
.objectif p { margin: 0; font-size: .95rem; }

/* Sommaire ancré */
.sommaire {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 14px 18px; margin-bottom: 26px; background: #fafbfc;
}
.sommaire ol { margin: 0; padding-left: 20px; font-size: .9rem; }
.sommaire li { margin: 3px 0; }
.sommaire a { color: var(--text); text-decoration: none; }
.sommaire a:hover { color: var(--accent); text-decoration: underline; }

/* Le titre visé par le sommaire ne doit pas passer sous l'en-tête collant */
.contenu h2 { scroll-margin-top: 72px; }

/* Petits écrans : les marges généreuses de la fiche mangent la largeur utile */
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .fiche { padding: 22px 18px 28px; border-radius: 0;
           margin: 0 -16px; border-left: none; border-right: none; }
  .fiche-hero { padding: 28px 0 20px; }
  .fiche-hero h1 { font-size: 1.45rem; }
  .contenu { font-size: 1rem; }
  .chaine li { padding-left: 32px; }
}
.contenu-vierge {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px; text-align: center; color: var(--muted); font-size: .9rem;
}

/* ── Contenu rédigé d'une microressource ───────────────────────── */
/* Pas de max-width ici : la colonne de lecture est fixée par .fiche (800px),
   sinon le texte laisse une bande vide sur la droite de la carte. */
.contenu { font-size: 1.02rem; }
.contenu h2 {
  font-size: 1.25rem; margin: 40px 0 12px; padding-top: 24px;
  border-top: 1px solid var(--border); letter-spacing: -.01em;
}
.contenu h3 { font-size: 1.02rem; margin: 28px 0 8px; }
.contenu p { margin: 0 0 14px; }
.contenu code {
  background: #eceef1; padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .85em;
}
.contenu .chapo {
  font-size: 1.05rem; color: var(--muted);
  border-left: 3px solid var(--accent); padding-left: 16px; margin-bottom: 8px;
}

/* Tableau comparatif */
.compare { overflow-x: auto; margin: 20px 0; }
.compare table {
  width: 100%; border-collapse: collapse; font-size: .875rem;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.compare th, .compare td {
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare thead th { background: #f0f2f5; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); }
.compare tbody td:first-child { font-weight: 600; }
.compare tbody tr:last-child td { border-bottom: none; }

/* Encadrés */
.callout {
  margin: 22px 0; padding: 16px 18px; font-size: .92rem;
  background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 6px;
}
/* :first-child : seul le titre de l'encadré passe en bloc. Sans cette précision,
   tout mot en gras du corps du texte saute à la ligne au milieu d'une phrase. */
.callout > strong:first-child { display: block; margin-bottom: 6px; }
.callout.recap { background: #e6f6ed; border-left-color: #1a7f42; }
.callout.alerte { background: #fde8ec; border-left-color: #b3123c; }
.callout ul { margin: 0; padding-left: 20px; }
.callout li { margin-bottom: 4px; }

/* Trio d'outils : 3 colonnes égales, sinon la 3e carte reste seule sur sa ligne */
.grid.trio { grid-template-columns: repeat(3, 1fr); margin: 22px 0; }
.grid.duo { grid-template-columns: repeat(2, 1fr); margin: 22px 0; }
@media (max-width: 640px) {
  .grid.trio, .grid.duo { grid-template-columns: 1fr; }
}

/* Commande à taper dans un terminal */
pre.cmd {
  background: #1c2024; color: #e8eaed;
  padding: 12px 16px; border-radius: 6px; margin: 10px 0 14px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .85rem; line-height: 1.5;
  /* pre-wrap : une commande longue passe à la ligne au lieu d'être coupée hors écran.
     Le retour est visuel seulement — un copier-coller restitue la ligne d'origine. */
  white-space: pre-wrap; word-break: break-word;
}

/* ── Les 4 grandes phases (page d'accueil) ─────────────────────── */
.bloc-phases { margin-bottom: 44px; }
.bloc-phases h2 { font-size: 1.35rem; margin: 0 0 10px; letter-spacing: -.01em; }
.bloc-phases .intro { margin: 0 0 22px; color: var(--muted); max-width: 72ch; }
.bloc-phases .chute {
  margin: 20px 0 0; font-size: .9rem; color: var(--muted);
  border-left: 3px solid var(--accent); padding-left: 14px;
}
.titre-parties { font-size: 1.35rem; margin: 0 0 16px; letter-spacing: -.01em; }

/* 2 colonnes : reflete la matrice local/en ligne x HTML/PHP */
.phases {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  counter-reset: phase;
}
@media (max-width: 700px) { .phases { grid-template-columns: 1fr; } }

.phase {
  display: flex; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.ph-num {
  flex: 0 0 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: .85rem; font-weight: 600;
}
.ph-body { flex: 1; min-width: 0; }
.ph-titre { display: block; font-weight: 600; margin-bottom: 8px; line-height: 1.35; }
.ph-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.phase p { margin: 0 0 10px; font-size: .9rem; color: var(--muted); }
.ph-ou {
  display: block; font-size: .78rem; font-weight: 600;
  color: var(--accent); padding-top: 8px; border-top: 1px solid var(--border);
}

/* Badges des deux axes */
.badge.local     { background: #eceef1; color: #4a515a; }
.badge.enligne   { background: #e6f6ed; color: #1a7f42; }
.badge.tech-html { background: #e8f0fe; color: #1a56c4; }
.badge.tech-php  { background: #f3e8fd; color: #6b28c4; }

/* Arborescence de fichiers */
.tree { margin: 18px 0; }
.tree pre {
  background: #fafbfc; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 16px 18px; margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .85rem; line-height: 1.7; overflow-x: auto;
}

/* Bloc de code avec nom de fichier */
.code { margin: 18px 0; }
.code figcaption {
  background: #2b3038; color: #c9cfd8;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .78rem; padding: 7px 16px;
  border-radius: 6px 6px 0 0; border-bottom: 1px solid #3d444e;
}
.code pre {
  background: #1c2024; color: #e8eaed; margin: 0;
  padding: 14px 16px; border-radius: 0 0 6px 6px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .82rem; line-height: 1.65; overflow-x: auto;
}
/* Coloration : t = balise, c = doctype/commentaire, s = sélecteur, p = propriété */
.code .t { color: #7aa6f0; }
.code .c { color: #8b93a1; }
.code .s { color: #7ddba0; }
.code .p { color: #d8a76a; }

/* ── QCM interactif ────────────────────────────────────────────── */
.qcm { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 18px; }
.q {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
}
.q-txt { font-weight: 600; margin: 0 0 14px; line-height: 1.5; }
.q-num {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: .78rem; font-weight: 600; margin-right: 8px;
  vertical-align: 1px;
}
.reps { display: grid; gap: 8px; }
.reps button {
  font: inherit; font-size: .92rem; text-align: left;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: #fafbfc; color: var(--text); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.reps button:hover:not(:disabled) { border-color: var(--accent); background: #fff; }
.reps button:disabled { cursor: default; opacity: 1; }
.reps button.juste {
  background: #e6f6ed; border-color: #1a7f42; color: #14532d; font-weight: 600;
}
.reps button.juste::after { content: "  ✓"; }
.reps button.faux { background: #fde8ec; border-color: #b3123c; color: #7f1030; }
.reps button.faux::after { content: "  ✗"; }

/* L'explication ne se devoile qu'une fois la question repondue */
.explication { display: none; }
.q.repondu .explication {
  display: block; margin: 14px 0 0; font-size: .9rem;
  padding: 12px 16px; background: var(--accent-soft);
  border-left: 3px solid var(--accent); border-radius: 6px;
}
.score {
  margin: 22px 0 0; padding: 14px 18px; font-size: .92rem; font-weight: 600;
  background: #f0f2f5; border-radius: 8px; color: var(--muted);
}
.score.fini { background: #e6f6ed; color: #14532d; }

/* Liste des documents utiles a deposer dans le dossier */
.contenu h4 { font-size: .95rem; margin: 24px 0 8px; }
.docs { margin: 12px 0 14px; padding-left: 20px; }
.docs li { margin-bottom: 6px; font-size: .92rem; }

/* Modèle de demande à compléter : meme habillage que .prompt, mais multi-lignes.
   Double classe pour passer devant `blockquote.prompt` (italique + chevron). */
.prompt.prompt-modele { font-style: normal; padding: 14px 18px; }
.prompt.prompt-modele::before { content: none; }
.prompt.prompt-modele .label {
  display: block; font-style: normal;
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent); margin-bottom: 10px;
}
.prompt.prompt-modele pre {
  margin: 0; font-style: normal;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .8rem; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
/* Les passages a personnaliser : contour pointille = "a remplir" */
.a-remplir {
  background: #fff4e5; color: #a35c00;
  border: 1px dashed #e0b070; border-radius: 4px;
  padding: 0 4px; font-style: normal;
}

/* Exemple de demande formulée à l'assistant */
blockquote.prompt {
  margin: 12px 0 16px; padding: 12px 16px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 6px; font-style: italic; color: var(--text);
}
blockquote.prompt::before { content: "› "; font-style: normal; color: var(--accent); font-weight: 600; }
.outil-card { padding: 18px 20px; }
.outil-card .pill {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .78rem; font-weight: 600;
  margin-bottom: 10px;
}
.outil-card h3 { margin: 0 0 2px; font-size: 1rem; }
.outil-card .role {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--accent); margin: 0 0 8px;
}
.outil-card p { font-size: .87rem; }

/* Chaîne de production */
.chaine { list-style: none; margin: 22px 0; padding: 0; counter-reset: etape; }
.chaine li {
  position: relative; counter-increment: etape;
  padding: 0 0 22px 44px; border-left: 2px solid var(--border); margin-left: 13px;
}
.chaine li:last-child { border-left-color: transparent; padding-bottom: 0; }
.chaine li::before {
  content: counter(etape); position: absolute; left: -14px; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; font-size: .78rem; font-weight: 600;
}
.chaine .etape { font-weight: 600; display: block; margin: 2px 0 4px; }
.chaine p { margin: 0; font-size: .9rem; color: var(--muted); }

/* Touches clavier */
kbd {
  display: inline-block; font-family: inherit; font-size: .78em; font-weight: 600;
  line-height: 1.4; padding: 1px 6px; margin: 0 1px; white-space: nowrap;
  color: var(--text); background: #f7f8fa;
  border: 1px solid #d6dae0; border-bottom-width: 2px; border-radius: 4px;
}

/* Liste de réglages (quoi + explication) */
.reglages { list-style: none; margin: 18px 0; padding: 0; }
.reglages li {
  padding: 12px 16px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.reglages .quoi { display: block; font-weight: 600; margin-bottom: 2px; }
.reglages p { margin: 0; font-size: .9rem; color: var(--muted); }

/* Liste d'extensions */
.exts { list-style: none; margin: 18px 0; padding: 0; }
.exts li {
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 8px;
}
.ext-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ext-nom { font-weight: 600; }
.ext-ed { font-size: .8rem; color: var(--muted); }
.ext-ed::before { content: "par "; }
.exts p { margin: 0; font-size: .9rem; }
.badge.indisp  { background: #fde8ec; color: #b3123c; }
.badge.confort { background: #eceef1; color: #4a515a; }

/* Zones de l'interface */
.zones { list-style: none; margin: 18px 0; padding: 0; }
.zones li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.zones li:last-child { border-bottom: none; }
.zones .z-num {
  flex: 0 0 26px; height: 26px; border-radius: 50%; margin-top: 2px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: .78rem; font-weight: 600;
}
.zones .z-nom { font-weight: 600; }
.zones .z-ou { color: var(--muted); font-size: .85rem; }
.zones .z-ou::before { content: " — "; }
.zones p { margin: 4px 0 0; font-size: .9rem; }

/* Transition vers la ressource suivante */
.suite {
  margin-top: 36px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.suite .label {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); display: block; margin-bottom: 6px;
}
.suite p { font-size: .9rem; margin: 0 0 12px; }
.next-link {
  display: inline-block; font-weight: 600; font-size: .9rem;
  color: var(--accent); text-decoration: none;
}
.next-link:hover { text-decoration: underline; }
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 20px 0; font-size: .8rem; color: var(--muted);
}

/* Schéma : maquette des blocs sémantiques d'une page */
.schema { margin: 22px 0; }
.schema .bloc {
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); padding: 10px 12px; margin-bottom: 8px;
}
.schema .bloc:last-child { margin-bottom: 0; }
/* Le body est tracé en pointillés : c'est le contenant, pas un bloc visible. */
.schema .b-body { border-style: dashed; background: #fafbfc; padding: 12px; }
.schema .b-main { background: var(--accent-soft); border-color: #c7d0ff; }
.schema .tag {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .78rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 4px; padding: 1px 7px;
}
.schema .b-main > .tag { background: #fff; }
.schema .role { font-size: .82rem; color: var(--muted); margin-left: 8px; }
.schema .interne { margin-top: 10px; }
/* Deux articles côte à côte : montre qu'un article se répète dans une section. */
.schema .cote { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 560px) { .schema .cote { grid-template-columns: 1fr; } }
