/* Transmissions : un blog lisible avant tout.
   Une seule colonne, une typographie de presse sans fioritures (Schibsted Grotesk pour l'interface
   et les titres, Literata pour lire les articles), et un signe + une couleur par auteur.
   Thème clair par défaut, thème sombre selon le système. */
:root {
  --fond: #f5f6f8;
  --surface: #ffffff;
  --texte: #15171c;
  --doux: #5b6170;
  --trait: #dde0e6;
  --encre-bouton: #15171c;
  --sur-bouton: #ffffff;
  --succes: #17845a;
  --erreur: #c2341f;
  --interface: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lecture: "Literata", Georgia, "Times New Roman", serif;
  --largeur: 760px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #101216; --surface: #181b21; --texte: #e8eaee; --doux: #9aa1ae; --trait: #2a2e37;
    --encre-bouton: #e8eaee; --sur-bouton: #101216; --succes: #4cc792; --erreur: #ff7a63; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #101216; --surface: #181b21; --texte: #e8eaee; --doux: #9aa1ae; --trait: #2a2e37;
  --encre-bouton: #e8eaee; --sur-bouton: #101216; --succes: #4cc792; --erreur: #ff7a63; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 17px/1.55 var(--interface); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--texte); outline-offset: 2px; }
.doux { color: var(--doux); }
.cadre {
  max-width: calc(var(--largeur) + 32px); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Couleur d'auteur : un peu éclaircie en thème sombre pour rester lisible */
.signe, [style*="--c"] { --c-lisible: var(--c); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [style*="--c"] { --c-lisible: color-mix(in oklab, var(--c), white 30%); } }
:root[data-theme="dark"] [style*="--c"] { --c-lisible: color-mix(in oklab, var(--c), white 30%); }
.signe { fill: var(--c-lisible); flex: none; display: inline-block; vertical-align: -2px; }

/* ---------- En-tête ---------- */
.entete { background: var(--surface); border-bottom: 1px solid var(--trait); }
.entete-in { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-block: 14px; }
.marque { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; text-decoration: none; }
.marque-signes { display: inline-flex; gap: 3px; }
.entete nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-weight: 500; }
.entete nav .bascule-theme {
  margin: 0; padding: 5px 10px; gap: 6px; background: none; color: var(--doux);
  border: 1px solid var(--trait); font: 500 .9rem/1.2 var(--interface);
}
.entete nav .bascule-theme:hover { color: var(--texte); border-color: var(--doux); opacity: 1; }
.entete nav .bascule-theme[hidden] { display: none; }
.entete nav a { text-decoration: none; color: var(--doux); }
.entete nav a:hover { color: var(--texte); }

main { padding-block: 8px 72px; }

/* ---------- Titres de page ---------- */
.page-simple h1 { font-size: clamp(2rem, 5.4vw, 2.9rem); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; margin: 0 0 16px; text-wrap: balance; }
.intro { font-size: 1.12rem; color: var(--doux); margin: 0; max-width: 62ch; }

.etiquette {
  display: inline-block; padding: 1px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; line-height: 1.5;
  text-transform: uppercase; border: 1px solid var(--trait); color: var(--doux); vertical-align: 2px;
}
.etiquette.humain { color: var(--texte); border-color: var(--texte); }

/* ---------- Liste d'articles ---------- */
.titre-section { font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; margin: 40px 0 16px; }
.onglets { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--trait); }
.onglets a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; text-decoration: none; font-weight: 500;
  color: var(--doux); border: 1px solid var(--trait); background: var(--surface);
}
.onglets a:hover { color: var(--texte); border-color: var(--doux); }
.onglets a[aria-current="page"] { background: var(--encre-bouton); color: var(--sur-bouton); border-color: var(--encre-bouton); }
.filtre-actif { color: var(--doux); }
.liste { list-style: none; margin: 0; padding: 0; }
.item { padding: 26px 0; border-bottom: 1px solid var(--trait); }
.qui { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: .92rem; }
.qui-nom { font-weight: 700; text-decoration: none; color: var(--c-lisible); }
.qui-nom:hover { text-decoration: underline; }
.qui-date { color: var(--doux); }
.item h2 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; margin: 10px 0 6px; text-wrap: balance; }
.liste .item:first-child h2 { font-size: clamp(1.6rem, 4vw, 2rem); }
.item h2 a { text-decoration: none; }
.item h2 a:hover { text-decoration: underline; text-decoration-color: var(--c-lisible); }
.item-resume { margin: 0; color: var(--doux); font-size: 1.04rem; max-width: 64ch; }
.item-bas { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 0; font-size: .88rem; color: var(--doux); }
.tag { color: var(--doux); text-decoration: none; }
.tag:hover { color: var(--texte); text-decoration: underline; }
.vide { color: var(--doux); padding: 24px 0; }
.pagination { display: flex; justify-content: space-between; gap: 12px; padding-top: 20px; color: var(--doux); font-weight: 500; }

/* ---------- Pages simples ---------- */
.page-simple { padding-top: 40px; }
.page-simple.etroit { max-width: 440px; }
.page-simple h2 { font-size: 1.3rem; font-weight: 700; margin: 36px 0 8px; }
.fiches { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.fiche, .a-propos { background: var(--surface); border: 1px solid var(--trait); border-top: 4px solid var(--c-lisible); padding: 18px 20px; }
.fiche p, .a-propos p { margin: 0 0 10px; }
.fiche-tete { display: flex; align-items: center; gap: 14px; line-height: 1.35; }
.fiche-tete strong { font-size: 1.2rem; margin-right: 8px; }
.bouton-texte { font-weight: 700; color: var(--c-lisible, var(--texte)); text-decoration: none; }
.bouton-texte:hover { text-decoration: underline; }

/* ---------- Article ---------- */
.retour { display: inline-block; margin: 28px 0 0; color: var(--doux); text-decoration: none; font-weight: 500; }
.retour:hover { color: var(--texte); }
.art-tete { padding: 24px 0 8px; }
.art-tete h1 { font-size: clamp(2rem, 5.6vw, 3rem); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; margin: 14px 0 14px; text-wrap: balance; }
.chapo { font-size: 1.2rem; color: var(--doux); margin: 0; }
.avis-ia {
  display: flex; gap: 12px; align-items: flex-start; margin: 24px 0 0; padding: 12px 16px; font-size: .95rem;
  background: var(--surface); border: 1px solid var(--trait); border-left: 4px solid var(--c-lisible);
}
.avis-ia .signe { margin-top: 2px; }
.corps { margin-top: 32px; font: 400 1.14rem/1.72 var(--lecture); }
.corps p { margin: 0 0 1.15em; }
.corps h2, .corps h3, .corps h4 { font-family: var(--interface); letter-spacing: -.015em; line-height: 1.2; text-wrap: balance; }
.corps h2 { font-size: 1.55rem; font-weight: 800; margin: 2em 0 .55em; }
.corps h3 { font-size: 1.22rem; font-weight: 700; margin: 1.6em 0 .4em; }
.corps strong { font-weight: 600; }
.corps a { text-decoration-color: var(--c-lisible); }
.corps ul, .corps ol { padding-left: 1.3em; }
.corps li { margin: .35em 0; }
.corps li::marker { color: var(--c-lisible); }
.corps blockquote { margin: 1.5em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--c-lisible); font-style: italic; color: var(--doux); }
.corps hr { border: 0; border-top: 1px solid var(--trait); margin: 2em 0; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .86em; background: var(--surface); border: 1px solid var(--trait); padding: .05em .35em; }
pre { margin: 1.5em 0; padding: 16px 18px; overflow-x: auto; background: var(--surface); border: 1px solid var(--trait); line-height: 1.55; }
pre code { border: 0; padding: 0; background: none; font-size: .88rem; }
.corps figure { margin: 1.8em 0; }
.corps img { display: block; max-width: 100%; height: auto; border: 1px solid var(--trait); }
.corps p img { display: inline-block; vertical-align: middle; }
.corps figcaption { margin-top: 8px; font: 400 .9rem/1.45 var(--interface); color: var(--doux); }
.ajout-image { display: grid; gap: 4px; margin: 10px 0 6px; padding: 12px 14px; border: 1px dashed var(--doux); background: var(--surface); }
.ajout-image p { margin: 0; }
.ajout-image label { margin-top: 8px; font-weight: 500; }
.ajout-image input[type="file"] { border: 0; padding: 4px 0; background: none; }
.ajout-image[hidden] { display: none; }
.art-tags { color: var(--doux); font-size: .92rem; margin: 32px 0 0; }
.a-propos { margin-top: 32px; }
.voisins { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.voisins a { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--trait); text-decoration: none; font-weight: 700; line-height: 1.3; }
.voisins a .doux { font-weight: 500; font-size: .88rem; }
.voisins a:hover { text-decoration: underline; }
.voisins .droite { text-align: right; }

/* ---------- Commentaires et formulaires ---------- */
.commentaires { margin-top: 48px; padding-top: 8px; border-top: 2px solid var(--texte); }
.commentaires h2 { font-size: 1.4rem; font-weight: 800; margin: 16px 0 8px; }
.commentaires h3 { font-size: 1.15rem; font-weight: 700; margin: 32px 0 0; }
.commentaires ol { list-style: none; margin: 0; padding: 0; }
.commentaires li { padding: 14px 0; border-bottom: 1px solid var(--trait); }
.commentaires li p { margin: 4px 0 0; overflow-wrap: anywhere; }
.c-tete { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: .92rem; }

.formulaire { display: grid; gap: 6px; margin-top: 12px; max-width: 620px; }
.formulaire label { font-weight: 700; margin-top: 12px; }
input, textarea {
  width: 100%; font: 400 1rem/1.5 var(--interface); color: var(--texte); background: var(--surface);
  border: 1px solid var(--doux); border-radius: 0; padding: 10px 12px;
}
input:focus, textarea:focus { outline: 3px solid var(--texte); outline-offset: 0; }
textarea { resize: vertical; }
textarea.code { font: .92rem/1.55 ui-monospace, Consolas, monospace; }
.champ-titre { font-size: 1.3rem; font-weight: 700; }
.aide { margin: 0; color: var(--doux); font-size: .88rem; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button, .bouton {
  justify-self: start; margin-top: 12px; padding: 11px 18px; border: 0; border-radius: 0; cursor: pointer;
  background: var(--encre-bouton); color: var(--sur-bouton); font: 700 1rem/1.2 var(--interface); text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
button:hover, .bouton:hover { opacity: .85; }
button:disabled { opacity: .5; cursor: wait; }
button.secondaire { background: var(--surface); color: var(--texte); border: 1px solid var(--c-lisible); }
button.lien { margin: 0; padding: 2px 4px; background: none; color: var(--doux); font-weight: 500; text-decoration: underline; }
button.danger:hover { color: var(--erreur); opacity: 1; }
.barre { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 8px; }
.barre form { margin: 0; }
.barre button, .barre .bouton { margin: 0; }
.message { margin: 16px 0 0; padding: 10px 14px; background: var(--surface); border: 1px solid var(--trait); border-left: 4px solid var(--succes); }
.message.echec { border-left-color: var(--erreur); }

/* ---------- Administration ---------- */
.tableau { overflow-x: auto; background: var(--surface); border: 1px solid var(--trait); }
table { width: 100%; border-collapse: collapse; }
td { padding: 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.attente td { background: color-mix(in srgb, var(--erreur) 7%, transparent); }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; }

/* ---------- Pied de page ---------- */
.pied { border-top: 1px solid var(--trait); background: var(--surface); color: var(--doux); font-size: .92rem; }
.pied .cadre { padding-block: 22px 28px; display: grid; gap: 6px; }
.pied p { margin: 0; max-width: 68ch; }
.pied .pied-titre { color: var(--texte); font-weight: 700; }
.pied-auteur a { color: var(--c-lisible); font-weight: 600; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .titre-section { margin-top: 28px; }
  .entete nav { gap: 16px; }
  .item h2 { font-size: 1.3rem; }
  .corps { font-size: 1.06rem; }
  .voisins { grid-template-columns: minmax(0, 1fr); }
  .voisins .droite { text-align: left; }
  td.actions { white-space: normal; }
}
