/* blog.css – toute liste chronologique d'articles : actualités, sorties, bulletins…
   Une même structure HTML, produite par <aveg-blog> :
     ol.blog > li.post > p.post-meta, h2.post-title, .post-body, p.post-link */

.blog { list-style: none; margin: 1rem 0 0; padding: 0; }
.post { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.post-meta { margin: 0; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-image { display: block; width: 100%; max-width: 40rem; max-height: 18rem; object-fit: cover; border-radius: var(--radius); margin: .5rem 0 .25rem; }
.post-title { font-size: 1.2rem; margin: .3rem 0 0; max-width: 40ch; }
.post-body { margin: .5rem 0 0; max-width: 68ch; }
.post-body p { margin: 0 0 .5rem; }
ul.post-body { padding-left: 1.1rem; }
ul.post-body li { margin: .2rem 0; }
.post-link { margin: .6rem 0 0; font-size: .9rem; }
.blog-more { padding: 1.5rem 0 0; }

@media (min-width: 52rem) {
  /* Grand écran : la date dans une colonne à gauche, le contenu à droite */
  .post { display: grid; grid-template-columns: 11rem 1fr; column-gap: 1.5rem; }
  .post-meta { grid-row: 1 / span 4; padding-top: .2rem; }
  .post-title, .post-meta + .post-body { margin-top: 0; }
  .post > :not(.post-meta) { grid-column: 2; }
}

/* ---- Variante « cartes » : <aveg-blog layout="cards"> (bulletins) ----------------
   ol.blog.cards > li.card > a.card-face (couverture + légende) ; un clic ouvre div.bul-full */

.blog.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 2rem 1.5rem; }
.card-face { display: grid; gap: .6rem; color: inherit; text-decoration: none; }
.card-cover {
  display: block; aspect-ratio: 210 / 297;   /* format A4 */
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--rule); background: var(--surface);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-face:hover .card-cover { transform: translateY(-3px); box-shadow: 0 6px 18px rgb(0 0 0 / .15); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-fallback {
  height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: .25rem;
  padding: 1rem; background: var(--ink); color: var(--bg); border-top: 6px solid var(--accent);
  font-family: var(--serif);
}
.card-no { font-size: 3.25rem; font-weight: 600; line-height: 1; }
.card-no::before { content: "n° "; font-size: 1rem; font-weight: 400; vertical-align: .25em; }
.card-caption { display: grid; gap: .1rem; }
.card-caption .post-title { font: 600 1.05rem/1.25 var(--serif); margin: 0; }
.card-face:hover .post-title { color: var(--accent); }
.card-caption .post-meta { margin: 0; grid-row: auto; padding: 0; }
@media (max-width: 30rem) {
  .blog.cards { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .card-no { font-size: 2.5rem; }
}

/* Bulletin en grand format, entre l'en-tête et le pied de page du site :
   barre de titre, sommaire à gauche, PDF à droite. Il déborde de la colonne du
   site pour profiter de toute la largeur de l'écran. */
.bul-full {
  display: grid; grid-template-rows: auto 1fr;
  width: min(110rem, calc(100vw - 3rem)); margin: 1rem 0 0; position: relative; left: 50%; transform: translateX(-50%);
  height: max(32rem, calc(100vh - 11rem));
  background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
}
.bul-bar {
  display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap;
  padding: .8rem clamp(1rem, 3vw, 2rem); border-bottom: 1px solid var(--rule); background: var(--surface);
}
.bul-bar h2 { margin: 0; font-size: 1.2rem; }
.bul-bar h2 small { margin-left: .75rem; font: 400 .85rem var(--sans); color: var(--muted); }
.bul-back { font-size: .9rem; }
.bul-body { display: grid; min-height: 0; }
.bul-body.with-pdf { grid-template-columns: minmax(18rem, 24rem) 1fr; }
.bul-toc { overflow-y: auto; padding: 1.25rem clamp(1rem, 3vw, 2rem); border-right: 1px solid var(--rule); }
.bul-toc h3 { margin: 0 0 .75rem; font-size: 1rem; }
.bul-toc ol { list-style: none; margin: 0; padding: 0; }
.bul-toc li { border-top: 1px solid var(--rule); }
.bul-art { display: grid; gap: .15rem; width: 100%; padding: .6rem 0; text-align: left; font: inherit; font-size: .92rem;
           color: var(--ink); background: none; border: 0; }
button.bul-art { cursor: pointer; }
button.bul-art:hover span { color: var(--accent); text-decoration: underline; }
.bul-art[aria-current] { box-shadow: inset 3px 0 0 var(--accent); padding-left: .75rem; }
.bul-art[aria-current] span { color: var(--accent); }
.bul-art small { color: var(--muted); font-size: .8rem; }
.bul-download { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 1.25rem 0 0; font-size: .9rem; }
.bul-locked { margin-top: 1.25rem; padding: 1rem; border: 1px solid var(--rule); border-left: 4px solid var(--accent);
              border-radius: var(--radius); background: var(--surface); }
.bul-locked p { margin: 0 0 .75rem; font-size: .92rem; }
.bul-pdf { width: 100%; height: 100%; border: 0; background: var(--surface); }

/* Mobile : pas de PDF intégré (illisible sur petit écran), sommaire et téléchargement */
@media (max-width: 52rem) {
  .bul-full { width: 100%; left: 0; transform: none; height: auto; border: 0; border-radius: 0; }
  .bul-body.with-pdf { grid-template-columns: 1fr; }
  .bul-pdf, .bul-newtab { display: none; }
  .bul-toc { border-right: 0; }
  .bul-bar h2 small { display: block; margin: .2rem 0 0; }
}

/* ---- Variante « posts » : <aveg-blog layout="posts"> (actualités) --------------------
   ol.blog.posts > li.post-card > a > image + date, titre, extrait ; puis article.post-full */

.blog.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 2rem 1.5rem; }
.post-card { min-width: 0; }
.post-card a { display: grid; align-content: start; gap: .75rem; height: 100%; color: inherit; text-decoration: none; }
.post-card-image { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--surface); }
/* Image entière dans son cadre : les bords libres reprennent l'image, floutée et assombrie */
.post-media { position: relative; overflow: hidden; isolation: isolate; }
.post-media::before { content: ""; position: absolute; inset: -24px; z-index: -1;
                      background: var(--img) center / cover no-repeat; filter: blur(18px) brightness(.85) saturate(1.1); }
.post-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.post-fallback { box-sizing: border-box; width: 100%; display: flex; align-items: flex-end; padding: 1rem; background: var(--ink); color: var(--bg);
                 border-top: 5px solid var(--accent); font: 600 1.3rem var(--serif); letter-spacing: .05em; }
.post-card-body { display: grid; gap: .3rem; }
.post-card-title { font: 600 1.15rem/1.3 var(--serif); }
.post-card a:hover .post-card-title { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-card-excerpt { font-size: .92rem; color: var(--muted); }

.post-full { max-width: 44rem; }
.post-full .back { margin: 1rem 0; font-size: .9rem; }
.post-full-title { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: .25rem 0 1rem; }
.post-full-media { display: block; position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius); margin-bottom: 1.25rem; cursor: zoom-in; }
.post-full-media::before { content: ""; position: absolute; inset: -30px; z-index: -1;
                           background: var(--img) center / cover no-repeat; filter: blur(24px) brightness(.85); }
.post-full-image { display: block; max-width: 100%; max-height: 32rem; width: auto; height: auto; margin: 0 auto; object-fit: contain; }
.post-full .post-body { max-width: none; font-size: 1.02rem; }
.post-full .post-body p { margin: 0 0 .9rem; }
.post-card .post-meta, .post-full .post-meta { grid-row: auto; padding: 0; margin: 0; }

/* Agenda Google en bas de la page des actualités (masqué quand un article est ouvert) */
.vue-article .agenda { display: none; }
.agenda { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.agenda h2 { font-size: 1.4rem; margin: 0 0 .4rem; }
.agenda p { color: var(--muted); margin: 0 0 1rem; }
.agenda-cadre { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: #fff; }
.agenda-cadre iframe { display: block; width: 100%; height: 600px; border: 0; }
@media (max-width: 36rem) { .agenda-cadre iframe { height: 480px; } }

/* Proposer un article (page Bulletins) */
.prop-section { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.prop-locked p { max-width: 65ch; }
.prop-form { display: grid; gap: .8rem; max-width: 46rem; padding: 1.1rem 1.25rem; background: var(--surface);
             border: 1px solid var(--rule); border-radius: var(--radius); }
.prop-form h3 { margin: 0; }
.prop-form .note { margin: 0; }
.prop-form label { display: grid; gap: .3rem; font-size: .9rem; }
.prop-form textarea { resize: vertical; font: inherit; }
.prop-auteur { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.prop-choisis { margin: 0; padding-left: 1.1rem; font-size: .88rem; }
.prop-choisis:empty { display: none; }
.prop-choisis small, .prop-fichiers small { color: var(--muted); }
.prop-form progress { width: 100%; height: .6rem; accent-color: var(--accent); }
.prop-msg { margin: 0; }
.prop-msg.ok { color: var(--ok, #2e7d32); }
.prop-mes { margin-top: 1.75rem; display: grid; gap: .9rem; max-width: 46rem; }
.prop-mes h3 { margin: 0; }
.prop-carte { padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.prop-carte.prop-refus { border-left-color: var(--muted); }
.prop-carte h4 { margin: 0 0 .15rem; font-size: 1.05rem; }
.prop-carte header .note { margin: 0 0 .7rem; }
.prop-etapes { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: .3rem; counter-reset: etape; }
.prop-etapes li { counter-increment: etape; font-size: .75rem; text-align: center; padding: .4rem .2rem; border-radius: var(--radius);
                  background: var(--bg); color: var(--muted); border: 1px solid var(--rule); line-height: 1.2; }
.prop-etapes li::before { content: counter(etape); display: block; font-weight: 700; font-size: .85rem; }
.prop-etapes li.fait { color: var(--accent); border-color: var(--accent); }
.prop-etapes li.fait::before { content: "✓"; }
.prop-etapes li.en-cours { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.prop-statut-refus { display: inline-block; margin: 0 0 .7rem; padding: .25rem .7rem; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--rule); font-size: .85rem; }
.prop-histo summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.prop-histo ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .9rem; }
.prop-histo li { margin: .25rem 0; white-space: pre-line; }
.prop-histo small { color: var(--muted); }
.prop-fichiers { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .9rem; }
.prop-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0 0; }
.prop-actions:empty { display: none; }
@media (max-width: 40rem) {
  .prop-auteur { grid-template-columns: 1fr; }
  .prop-etapes { grid-template-columns: repeat(3, 1fr); }
}
/* Appel à contribution et mode « Besoin d'un coup de main ? » */
.prop-appel { max-width: 46rem; margin-bottom: 1.5rem; }
.prop-appel .prop-lead { font-family: var(--serif, Georgia, serif); font-size: 1.2rem; line-height: 1.4; color: var(--ink); margin-top: 0; }
.prop-idees { padding-left: 1.2rem; }
.prop-idees li { margin: .25rem 0; }
.prop-appel-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.1rem; }
.prop-modes { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 1px solid var(--rule); margin: -.2rem 0 .3rem; }
.prop-modes button { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: .45rem .2rem; margin-right: 1rem;
                     color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.prop-modes button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.prop-modes button:hover { color: var(--accent); }
.prop-aides { border: 0; margin: 0; padding: 0; display: grid; gap: .35rem; }
.prop-aides legend { font-size: .9rem; margin-bottom: .3rem; padding: 0; }
.prop-aides label { display: flex !important; align-items: center; gap: .5rem; font-size: .95rem; }
.prop-aides input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--accent); }
.prop-form label small { color: var(--muted); }
.prop-coach-badge { display: inline-block; margin: .1rem 0 .3rem; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem;
                    background: var(--bg); border: 1px solid var(--accent); color: var(--accent); }
