/* Page « Charte graphique » (/charte) seulement. Généré avec la page par scripts/site.mjs (contenu dans scripts/charte.mjs).
   Les éléments du jeu sont copiés de src/styles.css, tous rangés sous .charte-demo pour ne rien changer au reste du site. */

/* ---------- Mise en page de la charte ---------- */
.contenu h3 { font-size: 21px; margin: 26px 0 6px; color: var(--or); }
.contenu .note { font-size: 16px; opacity: 0.85; margin: 0 0 12px; }
.contenu h2[id] { scroll-margin-top: 16px; }
.sommaire { background: var(--fond2); border-radius: 16px; padding: 12px 18px; margin: 18px 0 8px; }
.sommaire ol { margin: 0; padding-left: 22px; columns: 2 200px; column-gap: 24px; }
.sommaire li { break-inside: avoid; }
.sommaire a { display: inline-block; min-height: 32px; padding: 3px 0; }
.typo-titre-petit { font-family: 'Baloo 2', sans-serif; font-weight: 800; color: var(--or); font-size: 1.1em; }

/* Logo */
.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.logo-fond { margin: 0; border-radius: 16px; padding: 20px 12px 12px; display: grid; justify-items: center; align-content: space-between; gap: 10px; min-height: 190px; }
.logo-fond img { width: 120px; height: 120px; display: block; }
.logo-fond figcaption { font-size: 14px; font-weight: 700; }
.logo-sombre { background: #0f2a1d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.logo-clair { background: #fffaf0; color: #2b2420; }
.logo-marque { background: var(--fond2); }
.marque-bloc { display: flex; align-items: center; gap: 10px; align-self: center; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 20px; line-height: 1.1; }
.marque-bloc img { width: 52px; height: 52px; border-radius: 14px; }
.faire { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.faire > div { border-radius: 16px; padding: 12px 16px; background: rgba(255, 255, 255, 0.06); font-size: 16px; }
.faire ul { margin: 0; padding-left: 20px; }
.faire li { margin-bottom: 4px; }
.faire-titre { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 19px; margin: 0 0 6px; }
.oui { border-top: 4px solid #6fd39a; }
.oui .faire-titre { color: #9be7b5; }
.non { border-top: 4px solid #ff9d8f; }
.non .faire-titre { color: #ffb4a8; }
.logo-erreurs { display: flex; flex-wrap: wrap; gap: 14px 18px; margin: 4px 0 10px; }
.logo-erreurs span { display: grid; justify-items: center; gap: 2px; width: 64px; }
.logo-erreurs small { font-size: 13px; opacity: 0.85; }
.telechargements { background: var(--fond2); border-radius: 14px; padding: 10px 16px; }
.telechargements a { display: inline-block; min-height: 32px; padding-top: 2px; }

/* Nuancier (prolonge .nuancier / .nuance de style.css) */
.nuancier-charte { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 6px; }
.nuancier-charte .nuance { font-size: 15px; line-height: 1.35; align-content: start; }
.nuancier-charte .nuance .pastille-couleur { height: 44px; }
.nuancier-charte .nuance b { font-size: 16px; }
.nuancier-charte .nuance .contraste b { font-size: inherit; }
.nuance .contraste { opacity: 1; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, 0.15); color: var(--doux); }

/* Polices */
.specimens { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 14px 0; }
.specimen { background: var(--carte); color: var(--texte-carte); border-radius: 16px; padding: 14px 16px; }
.specimen p { margin: 0 0 8px; }
.specimen .note { font-size: 15px; opacity: 0.8; margin: 0; }
.specimen-nom { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: #267a4c; }
.specimen-alpha { font-size: 17px; overflow-wrap: anywhere; }
.specimen-lettre { background: #f8efd9; color: #3b2a1a; }
.specimen-signature { text-align: right; }
.echelle { display: grid; gap: 8px; }
.echelle-ligne { background: var(--carte); color: var(--texte-carte); border-radius: 14px; padding: 10px 14px; }
.echelle-sombre { background: #0f2a1d; color: #f4f7f2; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.echelle-exemple { margin: 0; overflow-wrap: anywhere; }
.echelle-meta { margin: 4px 0 0; font-size: 14px; opacity: 0.8; }

/* Formes, espaces, ombres */
.formes { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.forme { display: grid; justify-items: center; text-align: center; gap: 2px; font-size: 15px; }
.forme span { display: block; width: 56px; height: 44px; background: var(--carte); margin-bottom: 6px; }
.forme small, .espace small, .ombre-ex small { opacity: 0.8; font-size: 13px; line-height: 1.3; }
.espaces { display: grid; gap: 6px; }
.espace { display: grid; grid-template-columns: 80px 56px 1fr; align-items: center; gap: 8px; font-size: 15px; }
.espace span { display: block; height: 16px; background: var(--or); border-radius: 3px; }
.ombres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px 16px; padding: 18px; background: #fffaf0; border-radius: 16px; color: #2b2420; margin-bottom: 12px; }
.ombre-ex { background: #fff; border-radius: 18px; padding: 14px; display: grid; gap: 2px; }

/* Tableau des mondes */
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; }
.tableau-mondes { min-width: 560px; }
.tableau-mondes td { white-space: nowrap; }
.tableau-mondes td:first-child { white-space: normal; min-width: 170px; }
.puce { display: inline-block; width: 18px; height: 18px; border-radius: 6px; vertical-align: -3px; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.bouton-mini { display: inline-block; padding: 0 8px; border-radius: 8px; font-weight: 700; }

/* Le ton */
.exemples-ton { display: grid; gap: 10px; margin: 14px 0; }
.ton-paire { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ton-paire p { margin: 0; padding: 10px 12px; border-radius: 14px; font-size: 16px; display: flex; gap: 8px; }
.ton-paire span { font-weight: 800; flex: none; }
.ton-oui { background: var(--carte); color: var(--texte-carte); }
.ton-oui span { color: #1f7a45; }
.ton-non { background: rgba(255, 255, 255, 0.06); text-decoration: line-through; text-decoration-color: rgba(255, 180, 168, 0.7); }
.ton-non span { color: #ffb4a8; text-decoration: none; }

@media (max-width: 560px) {
  .faire, .ton-paire { grid-template-columns: 1fr; }
  .logo-marque { grid-column: 1 / -1; min-height: 0; }
  .nuancier-charte { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nuancier-charte .nuance { padding: 10px; font-size: 14px; }
  .espace { grid-template-columns: 74px 48px 1fr; }
}

/* ---------- Les éléments du jeu (copiés de src/styles.css, thème par défaut) ---------- */
.charte-demo {
  --t-fond: #0f2a1d;
  --t-fond2: #1d4a33;
  --t-texte: #2b2420;
  --t-panneau: #fffaf0;
  --t-accent: #267a4c;
  --t-accentTexte: #fff;
  --t-doux: #cdeccf;
  --t-police: 'Baloo 2', system-ui, sans-serif;
  --ombre: 0 6px 20px rgba(0, 0, 0, 0.18);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--t-texte);
  margin: 6px 0 8px;
}
.charte-demo * { box-sizing: border-box; }
.charte-demo.demo-scene { background: linear-gradient(180deg, var(--t-fond2), var(--t-fond)); border-radius: 20px; padding: 18px 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.charte-demo .demo-clair { background: var(--t-panneau); border-radius: 18px; padding: 16px 14px; display: grid; gap: 12px; }

/* Boutons */
.charte-demo .btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 12px 18px; border: 0; border-radius: 18px;
  font-weight: 800; font-size: 18px; text-align: left; line-height: 1.3;
}
.charte-demo .btn-principal { background: var(--t-accent); color: var(--t-accentTexte); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.22); text-align: center; }
.charte-demo .btn-secondaire { background: transparent; color: var(--t-texte); border: 2px solid rgba(0, 0, 0, 0.15); text-align: center; }
.charte-demo .btn-choix { justify-content: flex-start; background: #fff; color: var(--t-texte); border: 2px solid var(--t-accent); box-shadow: 0 4px 0 var(--t-accent); }
.charte-demo .choix-lettre {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--t-accent); color: var(--t-accentTexte); font-family: var(--t-police);
}
.charte-demo .choix { display: grid; gap: 14px; margin-top: 6px; }

/* Tardi et sa bulle */
.charte-demo .tardi { display: block; overflow: visible; }
.charte-demo .tardi-parle { display: flex; align-items: flex-end; gap: 4px; }
.charte-demo .tardi-parle .tardi { flex: none; margin-bottom: -4px; }
.charte-demo .bulle {
  position: relative; flex: 1; min-width: 0; background: #fff; border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px 18px 18px 4px; padding: 10px 14px; box-shadow: var(--ombre); font-size: 17px; color: #2b2420;
}
.charte-demo .bulle-nom {
  display: flex; align-items: center; gap: 4px; font-family: var(--t-police); font-weight: 800; font-size: 14px;
  color: var(--t-accent); text-transform: uppercase; letter-spacing: 0.05em;
}
.charte-demo .btn-voix { font-size: 16px; opacity: 0.75; padding: 0 4px; }

/* Panneau de récit */
.charte-demo.demo-scene-panneau { padding: 40px 0 0; overflow: hidden; background: linear-gradient(180deg, #5aa0b0, #1b4a5a 70%); }
.charte-demo .panneau { background: var(--t-panneau); border-radius: 28px 28px 0 0; padding: 18px 18px 22px; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3); }
.charte-demo .etiquette { font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--t-accent); margin-bottom: 6px; }
.charte-demo .titre-monde { font-family: var(--t-police); font-weight: 800; font-size: 32px; line-height: 1.15; color: var(--t-texte); margin: 0; }
.charte-demo .recit { font-size: 19px; line-height: 1.6; margin: 8px 0 14px; }
.charte-demo .para-num { display: inline-block; font-family: var(--t-police); font-weight: 800; color: var(--t-accent); margin-right: 8px; }
.charte-demo .mot-lu { background: #ffe58a; color: #2b2420; border-radius: 4px; box-shadow: 0 0 0 2px #ffe58a; }

/* Cartes du Vivant */
.charte-demo .demo-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.charte-demo .carte {
  --bord: #3aa58b; --fondcarte: #e7f7f1;
  width: 100%; max-width: 260px; margin: 0 auto; background: var(--fondcarte); color: #2b2420;
  border: 5px solid var(--bord); border-radius: 18px; padding: 10px 12px 14px; box-shadow: var(--ombre); text-align: center;
}
.charte-demo .carte-haut { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--bordtexte, var(--bord)); }
.charte-demo .carte-image { display: grid; place-items: center; min-height: 120px; margin: 6px 0; background: radial-gradient(circle, #fff 30%, transparent 70%); }
.charte-demo .carte-nom { font-family: var(--t-police); font-weight: 800; font-size: 24px; line-height: 1.1; }
.charte-demo .carte-espece { font-style: italic; font-size: 14px; opacity: 0.75; }

/* Quiz */
.charte-demo .question { font-family: var(--t-police); font-weight: 800; font-size: 26px; line-height: 1.15; margin: 0; }
.charte-demo .reponses { display: grid; gap: 10px; }
.charte-demo .reponse {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 16px;
  border: 2px solid rgba(0, 0, 0, 0.12); background: #fff; font-weight: 700; font-size: 18px;
}
.charte-demo .reponse-lettre { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, 0.07); font-family: var(--t-police); }
.charte-demo .reponse.juste { background: #d6f5dd; border-color: #2f9e55; }
.charte-demo .reponse.juste .reponse-lettre { background: #2f9e55; color: #fff; }
.charte-demo .reponse.fausse { background: #fde4e1; border-color: #e2988f; opacity: 0.7; }
.charte-demo .reponse.eteinte { opacity: 0.45; }

/* Onglets */
.charte-demo.demo-scene-onglets { padding: 40px 0 0; overflow: hidden; }
.charte-demo .onglets {
  display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255, 252, 244, 0.97);
  border-top: 1px solid rgba(0, 0, 0, 0.08); box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}
.charte-demo .onglet {
  min-width: 0; min-height: 44px; padding: 8px 2px 10px; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto;
  font-size: 13px; font-weight: 800; color: #6b625a; display: grid; justify-items: center; text-align: center;
}
.charte-demo .onglet.actif { color: var(--t-accent); }
.charte-demo .onglet-icone { position: relative; font-size: 24px; line-height: 1.2; }
.charte-demo .onglet.actif .onglet-icone { transform: scale(1.15); }
.charte-demo .pastille { position: absolute; top: -4px; right: -12px; background: #c4342d; color: #fff; font-size: 12px; border-radius: 10px; padding: 0 6px; line-height: 1.5; }

/* Anneau de focus */
.charte-demo .demo-focus { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; align-items: center; }
.charte-demo .demo-focus .demo-clair { padding: 20px 18px; }
.charte-demo .btn-sombre { color: #f4f7f2; border-color: rgba(255, 255, 255, 0.35); width: auto; margin: 0 9px; }
.charte-demo .focus-exemple { outline: 3px solid #1d4a33; outline-offset: 2px; box-shadow: 0 0 0 7px #ffe58a; }
