/* IAHelp — feuille de style commune à toutes les pages
   Concept : un album de photos lisible. Grandes lettres, fort contraste,
   photos présentées comme des tirages, le prompt mis en avant comme une note surlignée. */
:root {
  --papier: #f6f7f9;       /* fond de page */
  --carte: #ffffff;        /* fond des blocs */
  --encre: #17212e;        /* texte principal */
  --encre-douce: #46536a;  /* texte secondaire */
  --bleu: #1f4fa3;         /* liens et boutons */
  --bleu-fonce: #163b7d;
  --surligneur: #fff1b8;   /* fond des prompts */
  --surligneur-bord: #e2c24a;
  --trait: #d9dee7;
  --ombre: 0 1px 2px rgba(23,33,46,.08), 0 6px 18px rgba(23,33,46,.08);
  /* fonds pastel, alternés de section en section */
  --pastel-ciel: #e8f1fb;
  --pastel-rose: #fbeef1;
  --pastel-menthe: #e8f6ee;
  --pastel-peche: #fdf0e3;
  --pastel-lavande: #efedfa;

  --titre: "Young Serif", Georgia, "Times New Roman", serif;
  --texte: "Atkinson Hyperlegible", Verdana, Arial, sans-serif;

  --taille: 1.2rem;         /* environ 19 px : texte courant */
  color-scheme: light;  /* le site reste toujours en clair, avec ses pastels */
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: var(--taille);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bleu); text-underline-offset: .18em; }
a:hover { color: var(--bleu-fonce); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 4px; }

.conteneur { max-width: 68rem; margin: 0 auto; padding-inline: 1.25rem; }
.lecture { max-width: 42rem; }

h1, h2, h3 { font-family: var(--titre); font-weight: 400; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }

/* ---------- En-tête et menu ---------- */
.entete { background: var(--carte); border-bottom: 1px solid var(--trait); }
.entete .conteneur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: 1rem; }
.logo { text-decoration: none; color: var(--encre); display: flex; flex-direction: column; }
.logo strong { font-family: var(--titre); font-weight: 400; font-size: 1.9rem; line-height: 1; }
.logo strong span { color: var(--bleu); }
.logo small { font-size: 1rem; color: var(--encre-douce); }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.menu a {
  display: block; padding: .55rem .9rem; border-radius: 8px;
  text-decoration: none; color: var(--encre); font-weight: 700; font-size: 1.05rem;
}
.menu a:hover { background: var(--papier); color: var(--bleu); }
.menu a[aria-current="page"] { background: var(--bleu); color: var(--carte); }

/* ---------- Sections ---------- */
main section { padding-block: 3.5rem; }
main section:nth-child(5n+1) { background: var(--pastel-ciel); }
main section:nth-child(5n+2) { background: var(--pastel-rose); }
main section:nth-child(5n+3) { background: var(--pastel-peche); }
main section:nth-child(5n+4) { background: var(--pastel-lavande); }
main section:nth-child(5n+5) { background: var(--pastel-menthe); }
.section-entete { display: grid; gap: .75rem; margin-bottom: 2rem; }
.chapeau { font-size: 1.3rem; color: var(--encre-douce); }

/* ---------- Bandeau d'accueil ---------- */
.bandeau { padding-block: 4rem 3.5rem; }
.bandeau .lecture { display: grid; gap: 1.5rem; }
.bouton {
  display: inline-block; justify-self: start;
  background: var(--bleu); color: var(--carte); text-decoration: none; font-weight: 700;
  font-size: 1.2rem; padding: .9rem 1.6rem; border-radius: 10px; border: 0; cursor: pointer;
}
.bouton:hover { background: var(--bleu-fonce); color: var(--carte); }

/* ---------- Listes ---------- */
.liste-coches { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .6rem; }
.liste-coches li { padding-left: 2rem; position: relative; }
.liste-coches li::before { content: "✓"; position: absolute; left: 0; color: var(--bleu); font-weight: 700; }

/* ---------- Prompt (la note surlignée) ---------- */
.prompt {
  background: var(--surligneur); border: 2px solid var(--surligneur-bord); border-radius: 10px;
  padding: 1rem 1.2rem; display: grid; gap: .6rem;
}
.prompt-etiquette { font-size: .9rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-douce); }
.prompt-texte { font-size: 1.25rem; font-weight: 700; }
.prompt-bas { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.outil { font-size: 1rem; color: var(--encre-douce); }
.copier {
  font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  background: var(--carte); color: var(--bleu); border: 2px solid var(--bleu); border-radius: 8px; padding: .35rem .9rem;
}
.copier:hover { background: var(--bleu); color: var(--carte); }
.exemples-prompts { display: grid; gap: 1rem; margin-block: 1.5rem; }

/* ---------- Cartes de catégories ---------- */
.categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; }
.categorie {
  background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; overflow: hidden;
  text-decoration: none; color: var(--encre); display: flex; flex-direction: column; box-shadow: var(--ombre);
}
.categorie img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.categorie div { padding: 1rem 1.1rem 1.2rem; display: grid; gap: .35rem; }
.categorie p { color: var(--encre-douce); font-size: 1.05rem; }
.categorie .voir { color: var(--bleu); font-weight: 700; }
.categorie:hover { border-color: var(--bleu); }
.categorie:hover h3 { color: var(--bleu); }

/* ---------- Avant / après ---------- */
.exemple { display: grid; gap: 1.5rem; }
.avant-apres { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tirage { margin: 0; background: var(--carte); padding: .6rem .6rem .8rem; border-radius: 6px; box-shadow: var(--ombre); }
.tirage img { width: 100%; border-radius: 3px; }
.tirage figcaption { text-align: center; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem; padding-top: .6rem; color: var(--encre-douce); }
.tirage.apres figcaption { color: var(--bleu); }
.apport { display: grid; gap: .4rem; }
.apport h3 { font-size: 1.2rem; font-family: var(--texte); font-weight: 700; }

/* ---------- Pied de page ---------- */
.pied { background: var(--carte); border-top: 1px solid var(--trait); }
.pied .conteneur { padding-block: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; font-size: 1.05rem; color: var(--encre-douce); }
.pied nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }

@media (max-width: 560px) {
  :root { --taille: 1.125rem; }
  .avant-apres { gap: .6rem; }
  .tirage { padding: .35rem .35rem .5rem; }
  main section { padding-block: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Pages intérieures ---------- */
.titre-page { display: grid; gap: .75rem; }
.fil { font-size: 1rem; color: var(--encre-douce); }
.fil a { color: var(--encre-douce); }
.prose { display: grid; gap: 1rem; }
.prose h3 { margin-top: .5rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.5rem; display: grid; gap: .5rem; }

/* Encadrés */
.encadre { border-radius: 12px; padding: 1.4rem 1.5rem; display: grid; gap: .8rem; border: 2px solid; background: var(--carte); }
.encadre h3 { font-size: 1.4rem; }
.encadre ul, .encadre ol { margin: 0; padding-left: 1.5rem; display: grid; gap: .45rem; }
.encadre.or { border-color: var(--surligneur-bord); background: var(--surligneur); }
.encadre.vert { border-color: #6fbf8e; }
.encadre.bleu { border-color: var(--bleu); }
.encadre.gris { border-color: var(--trait); }
.grille-encadres { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem; align-items: start; }
.a-eviter, .a-faire { border-radius: 10px; padding: 1rem 1.2rem; display: grid; gap: .5rem; border: 2px solid; }
.a-eviter { border-color: #d98a8a; background: var(--carte); }
.a-faire { border-color: #6fbf8e; background: var(--carte); }

/* Tableaux */
.tableau-cadre { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--carte); border-radius: 10px; overflow: hidden; font-size: 1.1rem; }
th, td { text-align: left; vertical-align: top; padding: .8rem 1rem; border-bottom: 1px solid var(--trait); }
th { background: var(--papier); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* Exemples */
.exemples { display: grid; gap: 3rem; }
.exemple + .exemple { padding-top: 3rem; border-top: 2px dashed var(--trait); }
.exemple-entete { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.niveau { font-size: .95rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; border: 2px solid; }
.niveau.facile { border-color: #4f9e6d; color: #2f7a4a; }
.niveau.moyen { border-color: #d0902e; color: #9a6413; }
.niveau.avance { border-color: #c45a5a; color: #a33d3d; }
.astuce { border-left: 5px solid var(--bleu); background: var(--carte); padding: .9rem 1.1rem; border-radius: 0 10px 10px 0; }
.credit { font-size: 1rem; color: var(--encre-douce); font-style: italic; }
.detail-exemple { display: grid; gap: 1.25rem; max-width: 46rem; }

/* Navigation entre pages */
.suite { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.suite a { font-weight: 700; font-size: 1.15rem; }
