/* Blog Event-Formations — charte reprise du site principal
   (event-formations.catalogueformpro.com) */

:root {
  --bg: #ecf2f9;
  --white: #ffffff;
  --header-dark: #331932;
  --header-darker: #221121;
  --brand: #ac53a7;
  --brand-dark: #8a3f86;
  --brand-light: #bc75b8;
  --badge-bg: #f6eef6;
  --slate: #537392;
  --gold: #efcc03;
  --text: #233243;
  --text-muted: #5c6b7a;
  --border: #dde6ef;
  --radius-header: 40px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 9999px;
  --shadow: 0 20px 45px rgba(35, 18, 34, 0.12);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: var(--white); color: var(--text); border-color: var(--white); }
.btn-outline:hover { background: var(--header-dark); color: var(--white); }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-brand { background: var(--brand); color: var(--white); }
.pill-brand:hover { background: var(--brand-dark); }

/* ---------- Header ---------- */
.site-header { position: relative; }
.header-panel {
  position: relative;
  background: var(--header-dark);
  border-radius: 0 0 var(--radius-header) var(--radius-header);
  overflow: hidden;
  padding-bottom: 18px;
}
.header-pattern {
  position: absolute; top: 0; left: 0; width: 100%; height: auto; min-height: 100%;
  object-fit: cover; pointer-events: none; user-select: none;
}
.header-row {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding-top: 12px;
}
.logo-pill { display: inline-flex; background: var(--white); border-radius: 0 0 12px 12px; padding: 10px 20px 9px; }
.logo-pill img { height: 40px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { font-weight: 600; font-size: 15px; color: var(--white); position: relative; }
.main-nav a.external::after { content: "↗"; font-size: 12px; margin-left: 4px; color: var(--gold); }
.main-nav a:hover, .main-nav a.active { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--white); margin: 6px 0; transition: 0.2s; }

@media (max-width: 860px) {
  .main-nav {
    position: fixed; inset: 84px 16px auto 16px; background: var(--white);
    border-radius: var(--radius-md); box-shadow: var(--shadow);
    flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: 0.2s ease; z-index: 50;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 10px 8px; width: 100%; color: var(--text); }
  .main-nav a.external::after { color: var(--brand); }
  .main-nav a:hover, .main-nav a.active { color: var(--brand); }
  .nav-toggle { display: block; }
  .header-actions .pill.hide-mobile { display: none; }
}

/* ---------- Hero (dark panel) ---------- */
.hero-inner { position: relative; z-index: 2; padding: 32px 24px 6px; text-align: center; }
.hero-inner--compact { padding: 24px 24px 4px; text-align: left; max-width: 900px; }
.hero-inner h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; margin: 0 0 14px; letter-spacing: -0.5px; color: var(--white); }
.hero-inner--compact h1 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
.hero-inner p.lead { max-width: 640px; margin: 0 auto 18px; color: rgba(255,255,255,0.75); font-size: 0.98rem; }
.hero-inner--compact p.lead { margin: 0 0 18px; }
.breadcrumb-dark { color: rgba(255,255,255,0.55); font-size: 0.85rem; margin-bottom: 10px; }
.breadcrumb-dark a:hover { color: var(--gold); }

/* ---------- Section basics ---------- */
section { padding: 60px 0; }
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--brand); margin-bottom: 18px;
}
.section-tag::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--brand); flex-shrink: 0; }
.hero-inner .section-tag { color: var(--gold); }
.hero-inner .section-tag::before { background: var(--gold); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; margin: 0 0 14px; color: var(--text); }
.section-head p { color: var(--text-muted); margin: 0; }

/* ---------- Cards / generic ---------- */
.card { background: var(--white); border-radius: var(--radius-md); padding: 30px; }

/* ---------- Blog listing ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.blog-card-image { aspect-ratio: 16/10; background: var(--badge-bg); overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card .category-tag {
  display: inline-flex; align-self: flex-start; background: var(--badge-bg); color: var(--brand);
  font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--radius-pill);
}
.blog-card h3 { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.35; }
.blog-card p.excerpt { margin: 0; color: var(--text-muted); font-size: 0.92rem; flex: 1; }
.blog-card .meta { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
.blog-card .read-more { color: var(--brand); font-weight: 700; font-size: 0.9rem; }

.empty-state { text-align: center; color: var(--text-muted); padding: 40px 0; }

.preview-banner {
  background: #fff6e0; color: #8a6d00; border-radius: var(--radius-md);
  padding: 14px 20px; font-size: 0.9rem; font-weight: 600; margin: 20px 0 0;
}

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-pill);
  background: var(--white); color: var(--text); font-weight: 700; font-size: 14px;
}
.pagination a:hover { background: var(--badge-bg); color: var(--brand); }
.pagination .current { background: var(--brand); color: var(--white); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Article page ---------- */
.article-header { max-width: 820px; margin: 0 auto; text-align: center; }
.article-header .meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.article-header h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; margin: 10px 0 18px; color: var(--text); }
.article-cover { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); margin: 0 auto 10px; max-width: var(--container); }
.article-cover img { width: 100%; max-height: 420px; object-fit: cover; }

.toc-box {
  max-width: 760px; margin: 0 auto 36px; background: var(--white);
  border-radius: var(--radius-md); padding: 22px 26px;
}
.toc-title { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--brand); margin-bottom: 12px; }
.toc-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.toc-box a { color: var(--text-muted); font-size: 0.92rem; }
.toc-box a:hover { color: var(--brand); }
.toc-box .toc-level-3 { padding-left: 18px; font-size: 0.88rem; }

.article-content { max-width: 760px; margin: 0 auto; color: var(--text); }
.article-content h2 { font-size: 1.5rem; margin: 40px 0 16px; }
.article-content h3 { font-size: 1.2rem; margin: 32px 0 14px; }
.article-content p { margin: 0 0 18px; color: var(--text); }
.article-content img { border-radius: var(--radius-md); margin: 24px 0; }
.article-content ul, .article-content ol { color: var(--text); padding-left: 22px; margin: 0 0 18px; }
.article-content blockquote {
  margin: 24px 0; padding: 20px 24px; background: var(--badge-bg);
  border-radius: var(--radius-md); color: var(--brand-dark); font-weight: 600;
}
.article-content a { color: var(--brand); text-decoration: underline; }

.article-nav-back { max-width: 760px; margin: 0 auto 20px; }
.article-nav-back a { color: var(--text-muted); font-size: 0.9rem; }
.article-nav-back a:hover { color: var(--brand); }

/* ---------- Réactions ---------- */
.reactions-box {
  max-width: 760px; margin: 40px auto 0; padding-top: 32px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
}
.reactions-label { color: var(--text-muted); font-size: 0.92rem; font-weight: 600; }
.reactions-buttons { display: flex; gap: 10px; }
.reaction-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--white);
  cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--text-muted);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.reaction-btn .emoji { font-size: 16px; }
.reaction-btn:hover { transform: translateY(-2px); border-color: var(--brand-light); }
.reaction-btn.active { background: var(--badge-bg); border-color: var(--brand); color: var(--brand-dark); }
.reaction-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ---------- Articles similaires ---------- */
.related-section { padding-top: 20px; }

/* ---------- Comments ---------- */
.comments-section { max-width: 760px; margin: 0 auto; }
.comments-count { font-weight: 700; margin-bottom: 24px; }
.comment-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 44px; }
.comment-item { background: var(--white); border-radius: var(--radius-md); padding: 22px 24px; }
.comment-item .comment-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.comment-item .author { font-weight: 700; }
.comment-item .date { color: var(--text-muted); font-size: 0.82rem; }
.comment-item p { margin: 0; color: var(--text-muted); }

.comment-form { display: flex; flex-direction: column; gap: 14px; }
.comment-form input, .comment-form textarea {
  padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  font-family: inherit; font-size: 14px; background: var(--white); width: 100%;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .comment-form .row-2 { grid-template-columns: 1fr; } }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-status { margin: 0; font-size: 0.9rem; padding: 14px 18px; border-radius: var(--radius-sm); }
.form-status--ok { background: #e6f6ee; color: #1a7f4e; }
.form-status--error { background: #fdeceb; color: #c0392b; }

/* ---------- Footer ---------- */
.site-footer { background: var(--header-darker); color: rgba(255,255,255,0.72); padding: 60px 0 24px; border-radius: var(--radius-header) var(--radius-header) 0 0; margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand img { height: 40px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 0.9rem; max-width: 260px; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin: 0 0 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a:hover { color: var(--white); }
.footer-col a.external::after { content: " ↗"; font-size: 11px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.85rem; color: rgba(255,255,255,0.45);
}
.footer-bottom ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.footer-bottom a:hover { color: var(--white); }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

.breadcrumb { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--brand); }
