/* GI-FORMATION : feuille de styles écrite à la main, sans bibliothèque ni police externe. */

:root {
  --fond: #ffffff;
  --texte: #1b1f24;
  --doux: #4a5360;
  --trait: #c9d0d8;
  --zone: #f3f5f7;
  --accent: #0b4f8a;
  --accent-fonce: #083b67;
  --juste: #1d6b35;
  --juste-fond: #e7f4ea;
  --faux: #a4211b;
  --faux-fond: #fbeaea;
  --avertir: #7a4b00;
  --avertir-fond: #fff4d6;
  --focus: #f0a500;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  line-height: 1.55;
}

a { color: var(--accent); }
a:hover { color: var(--accent-fonce); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.evitement { position: absolute; left: -999px; top: 0; background: var(--fond); padding: .5rem; }
.evitement:focus { left: .5rem; z-index: 10; }

.entete {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1rem; padding: .75rem 1rem; background: var(--accent); color: #fff;
}
.entete a, .entete .lien { color: #fff; }
.marque { font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.entete ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.entete li { margin: 0; }

main { max-width: 52rem; margin: 0 auto; padding: 1rem; }
main:focus { outline: none; }

.pied { max-width: 52rem; margin: 2rem auto 0; padding: 1rem; color: var(--doux); font-size: .9rem;
  border-top: 1px solid var(--trait); }

h1 { font-size: 1.6rem; line-height: 1.25; margin: .5rem 0 1rem; }
h2 { font-size: 1.25rem; margin: 1.75rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }

.en-ligne { display: inline; margin: 0; }

button, .bouton {
  display: inline-block; font: inherit; font-weight: 600; padding: .6rem 1rem; min-height: 44px;
  border: 2px solid var(--accent); border-radius: 6px; background: var(--accent); color: #fff;
  cursor: pointer; text-decoration: none;
}
button:hover, .bouton:hover { background: var(--accent-fonce); color: #fff; }
.bouton.second, button.second { background: var(--fond); color: var(--accent); }
button.lien { background: none; border: none; padding: 0; min-height: 0; text-decoration: underline;
  font-weight: inherit; }

label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
input[type="email"], input[type="password"], input[type="search"], input[type="text"], select {
  width: 100%; max-width: 30rem; font: inherit; padding: .55rem .6rem; min-height: 44px;
  border: 1px solid var(--doux); border-radius: 6px; background: #fff; color: var(--texte);
}
.helptext, .aide { display: block; color: var(--doux); font-size: .9rem; }
.errorlist { color: var(--faux); padding-left: 1.2rem; }

fieldset { border: 1px solid var(--trait); border-radius: 8px; padding: .75rem 1rem; margin: 1rem 0; }
legend { font-weight: 600; padding: 0 .25rem; }
.option { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; font-weight: 400;
  margin: 0; }
.option input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; flex: none; }

.carte { border: 1px solid var(--trait); border-radius: 8px; padding: .9rem 1rem; margin: .75rem 0;
  background: var(--fond); }
.carte h2, .carte h3 { margin-top: 0; }
.liste-nue { list-style: none; padding: 0; margin: 0; }

.bandeau { background: var(--avertir-fond); color: var(--avertir); border-left: 5px solid var(--avertir);
  padding: .6rem .9rem; margin: .75rem 0; font-weight: 600; }
.marque-a-valider { display: inline-block; background: var(--avertir-fond); color: var(--avertir);
  border: 1px solid var(--avertir); border-radius: 4px; padding: 0 .4rem; font-size: .85rem;
  font-weight: 600; }
.marque-valide { display: inline-block; color: var(--juste); font-size: .85rem; }

.message { padding: .6rem .9rem; border-radius: 6px; background: var(--zone); }
.message.success { background: var(--juste-fond); color: var(--juste); }
.message.error { background: var(--faux-fond); color: var(--faux); }

.correction { border-radius: 8px; padding: .75rem 1rem; margin: 1rem 0; border-left: 6px solid; }
.correction.juste { background: var(--juste-fond); border-color: var(--juste); }
.correction.faux { background: var(--faux-fond); border-color: var(--faux); }
.correction .verdict { font-weight: 700; font-size: 1.1rem; margin: 0 0 .5rem; }

.illustration { background: var(--zone); border-radius: 8px; padding: .75rem 1rem; margin: 1rem 0; }
.illustration .source { color: var(--doux); font-size: .9rem; }

.progression { color: var(--doux); }
progress { width: 100%; max-width: 30rem; height: 1rem; }

.texte-fiche table, .texte table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.defilement { overflow-x: auto; }
.texte-fiche th, .texte-fiche td, .texte th, .texte td {
  border: 1px solid var(--trait); padding: .35rem .5rem; vertical-align: top; text-align: left; }
.texte-fiche th, .texte th { background: var(--zone); }
.texte-fiche { overflow-wrap: anywhere; }

.extrait { color: var(--doux); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; align-items: center; }

.tableau-simple { border-collapse: collapse; width: 100%; }
.tableau-simple th, .tableau-simple td { border-bottom: 1px solid var(--trait); padding: .4rem .3rem;
  text-align: left; }

/* Bibliothèque d'exemples */
.montant { white-space: nowrap; }
.lead { font-size: 1.1rem; }
blockquote { margin: .25rem 0; padding-left: .75rem; border-left: 4px solid var(--trait); }

@media (max-width: 30rem) {
  h1 { font-size: 1.35rem; }
  main { padding: .75rem; }
  .texte-fiche table, .texte table { display: block; overflow-x: auto; }
}
