/* Peau « papier » du blog : la liste (blog.html) devient un tableau de liège couvert de fiches,
   l'article (blog/*.html) devient une copie sur feuille Seyès, annotée au stylo du correcteur. */

:root { --bordure: #e2d8c4; --blanc: #FFFDF8; --teal-light: #eaf3ef; }

/* ================= liste des articles ================= */
.blog-hero { background-color: var(--feuille) !important;
  background-image: linear-gradient(var(--ligne) 1px, transparent 1px), linear-gradient(90deg, var(--ligne) 1px, transparent 1px) !important;
  background-size: 22px 22px !important; border-bottom: 1.5px dashed #d8ccb4; animation: grille 16s linear infinite; }
.blog-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem) !important; color: var(--encre) !important; }

/* filtres = onglets de classeur */
.filter-btn { background: var(--feuille) !important; color: var(--encre) !important; border: 1.5px solid var(--encre) !important;
  border-radius: 10px 10px 2px 2px !important; font-weight: 700 !important; box-shadow: 2px 2px 0 rgba(34,38,42,.15); }
.filter-btn.active { background: var(--surligneur) !important; box-shadow: 3px 3px 0 var(--encre); }

/* chaque article = une fiche épinglée, légèrement de travers */
.blog-card { background: var(--feuille) !important; border: none !important; border-radius: 3px !important;
  box-shadow: var(--ombre) !important; position: relative; overflow: visible !important; transition: rotate .25s, box-shadow .25s !important; }
.blog-card { rotate: calc(var(--penche, 0deg) + var(--balance)); animation: balance 9s ease-in-out infinite; }
.blog-card:nth-child(4n+1) { --penche: -.7deg; } .blog-card:nth-child(4n+2) { --penche: .5deg; animation-delay: -2.5s; animation-duration: 10s; }
.blog-card:nth-child(4n+3) { --penche: .3deg; animation-delay: -5s; }  .blog-card:nth-child(4n) { --penche: -.4deg; animation-delay: -7s; animation-duration: 11s; }
.blog-card:hover { --penche: 0deg; animation-play-state: paused; box-shadow: var(--ombre-forte) !important; }
.blog-card:hover .blog-card-link { display: inline-block; animation: pousse 1.2s ease-in-out infinite; }
@keyframes pousse { 0%, 100% { translate: 0 0; } 50% { translate: 5px 0; } }
.blog-card::before { content: ''; position: absolute; top: -9px; left: 26px; width: 64px; height: 20px; rotate: -5deg; background: var(--scotch-jaune); }
.blog-card:nth-child(even)::before { left: auto; right: 26px; rotate: 4deg; background: var(--scotch); }
.blog-card h2, .blog-card h3 { font-family: var(--titre) !important; color: var(--encre) !important; }
.blog-card-badge { border-radius: 3px !important; font-family: var(--corps); border: 1.5px solid var(--encre) !important; color: var(--encre) !important; }
.badge-general { background: #e3f1f1 !important; }
.badge-ecrit1 { background: #FFE27A !important; }
.badge-ecrit2 { background: #F6D2A8 !important; }
.badge-oral1 { background: #C9F0C2 !important; }
.badge-oral3 { background: #BFE0F2 !important; }
.badge-pedagogie { background: #F9C6D0 !important; }
.blog-card-link { font-family: var(--main); font-size: 1.35rem !important; color: var(--rouge) !important; }

/* ================= article ================= */
.blog-article, .article-header { position: relative; }
.article-header h1 { color: var(--encre) !important; font-size: clamp(2rem, 4.6vw, 3rem) !important; }
.article-badge { background: var(--surligneur) !important; color: var(--encre) !important; border: 1.5px solid var(--encre); border-radius: 3px !important; }
.breadcrumbs, .breadcrumbs a { color: var(--gris) !important; }

/* le corps de l'article sur une feuille Seyès avec marge rouge */
.article-body { background: var(--feuille); border-radius: 3px; box-shadow: var(--ombre-forte);
  padding: 2.4rem 2.2rem 2.4rem 3.4rem !important; position: relative;
  background-image: linear-gradient(90deg, transparent 2.2rem, var(--marge) 2.2rem, var(--marge) calc(2.2rem + 1.5px), transparent calc(2.2rem + 1.5px)); }
.article-body h2 { border-left: none !important; padding-left: 0 !important; font-size: 1.6rem !important; }
.article-body h2::after { content: ''; display: block; width: 120px; height: 10px; margin-top: .35rem; animation: onde 1.8s linear infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'%3E%3Cpath d='M0 5 Q6 1.5 12 5 T24 5' fill='none' stroke='%23C8452C' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 0 / 24px 10px; }
@keyframes onde { to { background-position-x: -24px; } }
.article-body strong { background: linear-gradient(100deg, transparent 0 1%, rgba(255,226,122,.75) 2% 97%, transparent 99%) no-repeat 0 82% / 100% 38%; }
.article-body a { color: var(--teal-dark) !important; text-decoration-color: var(--rouge) !important; text-underline-offset: 3px; }

/* encadrés : post-it */
.highlight-box, blockquote { background: #fff3a8 !important; border: none !important; border-radius: 2px !important;
  box-shadow: 0 12px 20px -10px rgba(60,45,20,.4) !important; --penche: -.5deg; position: relative; }
.highlight-box::before { content: ''; position: absolute; top: -10px; left: 50%; width: 80px; height: 20px; translate: -50% 0; rotate: -3deg; background: var(--scotch); }

/* chiffres clés : étiquettes */
.is-card { background: #fff !important; border: 1.5px solid var(--encre) !important; border-radius: 6px !important; box-shadow: 3px 3px 0 rgba(34,38,42,.14); }
.is-card:nth-child(1) { rotate: -1deg; } .is-card:nth-child(3) { rotate: .8deg; }
.is-value { font-family: var(--titre); color: var(--teal-dark) !important; }

/* étapes : flèches dessinées */
.if-step { background: var(--feuille) !important; color: var(--encre) !important; border: 1.5px solid var(--encre); box-shadow: 2px 2px 0 rgba(34,38,42,.15); }
.if-arrow { color: var(--rouge) !important; }

/* erreurs : annotations du correcteur au stylo rouge */
.ie-card { background: #fff !important; border: 1.5px solid var(--rouge) !important; border-radius: 4px !important; border-left-width: 5px !important; }
.ie-num { background: var(--rouge) !important; color: #fff !important; border-radius: 50% !important; }
.ie-title { font-family: var(--titre); }

/* guide gratuit : enveloppe */
.lm-inline { background: #f3e9d2 !important; border: 1.5px solid #c9b68c !important; border-radius: 4px !important;
  box-shadow: 0 14px 24px -14px rgba(60,45,20,.45); position: relative; }
.lm-inline::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 46px;
  background: linear-gradient(to bottom right, transparent 49.5%, rgba(201,182,140,.5) 50%) left / 50% 100% no-repeat,
              linear-gradient(to bottom left, transparent 49.5%, rgba(201,182,140,.5) 50%) right / 50% 100% no-repeat; pointer-events: none; }
.lm-inline input[type=email] { border: 1.5px solid var(--encre) !important; border-radius: 4px !important; background: #fff !important; }

/* articles liés */
.related-card { background: var(--feuille) !important; border: 1.5px solid var(--encre) !important; border-radius: 4px !important; box-shadow: 3px 3px 0 rgba(34,38,42,.12) !important; }
.cta-box, .article-cta { background: var(--feuille) !important; border: 2px solid var(--encre) !important; border-radius: 6px !important; box-shadow: 6px 6px 0 rgba(34,38,42,.14) !important; }

@media (max-width: 700px) {
  .article-body { padding: 1.6rem 1.1rem 1.6rem 2.2rem !important;
    background-image: linear-gradient(90deg, transparent 1.3rem, var(--marge) 1.3rem, var(--marge) calc(1.3rem + 1.5px), transparent calc(1.3rem + 1.5px)); }
}

@media (prefers-reduced-motion: reduce) { .blog-card, .blog-card-link, .blog-hero, .article-body h2::after { animation: none !important; } }
