/* Junban — styles propres au blog et aux pages ressources.
   L'habillage (topbar, sidebar, footer, boutons, cartes) vient de site.css. */

body.blog {
    padding: 0 0 1px;
}

.blog .container {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(1rem, 4vw, 2rem) clamp(1rem, 4vw, 1.5rem);
}

.blog .card {
    margin-bottom: 1.4rem;
}

/* Article */

/* Lien « ← Tous les articles » : il ouvre la carte, donc pas de marge haute
   (celle de site.css sert aux pages légales, où le lien est en bas de page). */
.blog .back-link {
    margin-top: 0;
    margin-bottom: 1.3rem;
    color: var(--jpi-blue);
}

.blog .back-link:hover { text-decoration: underline; }

article h1 {
    font-size: clamp(1.6rem, 3.6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin-bottom: 0.6rem;
}

.post-meta {
    color: var(--soft);
    font-size: 0.92rem;
    margin-bottom: 1.6rem;
}

article h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2rem 0 0.8rem;
}

article h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.5rem 0 0.6rem;
}

article p, article li {
    font-size: 1.04rem;
    line-height: 1.75;
    color: var(--muted);
}

article p { margin-bottom: 1rem; }

article ul, article ol {
    padding-left: 22px;
    margin-bottom: 1.2rem;
}

article li { margin-bottom: 0.5rem; }

article strong { color: var(--ink); }

article a { color: var(--brand); }

article img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 1.2rem 0;
}

article blockquote {
    border-left: 4px solid var(--brand-bright);
    padding-left: 1rem;
    color: var(--soft);
    margin: 1.2rem 0;
    font-style: italic;
}

article hr {
    border: none;
    border-top: 1px solid rgba(20, 24, 31, 0.1);
    margin: 2rem 0;
}

/* Index (blog et silos) — en-tête centré, sans carte */
.blog-header {
    text-align: center;
    max-width: 44em;
    margin: clamp(1rem, 3vw, 2rem) auto clamp(1.6rem, 4vw, 2.6rem);
}

.blog-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.blog-header p {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.6;
}

.post-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

.post-card h2 a {
    color: var(--ink);
    text-decoration: none;
}

.post-card h2 a:hover { color: var(--brand); }

.post-card .post-meta { margin-bottom: 0.6rem; }

.post-card p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.read-more {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

/* Encart de téléchargement en bas d'article */
.cta-card {
    text-align: center;
    background: linear-gradient(135deg, #101418, #263041);
    color: #fff;
    border: none;
}

.cta-card h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: #fff;
}

.cta-card .download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.cta-card .download-btn {
    display: block;
    padding: 13px 22px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
}

.cta-card .btn-android { background: #fff; color: var(--ink); }

.cta-card .btn-ios {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
}

/* ------------------------------------------- index en grille 3 colonnes */

.blog-index .container {
    max-width: 1140px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    align-items: start;
}

.post-grid .post-card {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-grid .post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.post-grid .post-card p {
    flex: 1;
}

.post-grid .read-more {
    margin-top: auto;
}

@media (max-width: 980px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .post-grid { grid-template-columns: 1fr; }
}

.cta-card .download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.cta-card .store-icon { width: 18px; height: 18px; flex: none; }

/* Respiration entre le contenu et l'encart de téléchargement */
.blog .cta-card {
    margin-top: clamp(2.5rem, 6vw, 4rem);
}

/* Boutons de téléchargement insérés au fil d'un article */
.inline-stores {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 1.4rem 0 1.8rem;
}

.inline-stores .store-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.inline-stores .store-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.inline-stores .btn-android {
    background: linear-gradient(135deg, #101418, #2c333d);
    color: #fff;
}

.inline-stores .btn-ios {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid rgba(20, 24, 31, 0.14);
}

.inline-stores .store-icon { width: 17px; height: 17px; flex: none; }

@media (max-width: 520px) {
    .inline-stores { flex-direction: column; }
    .inline-stores .store-btn { justify-content: center; }
}
