/* =========================================================================
   Euro-Office Actus — feuille de style
   Design épuré : beaucoup d'air, typographie soignée, palette européenne.
   ========================================================================= */

:root {
  --eu-blue: #003399;
  --eu-blue-700: #002a7a;
  --eu-blue-100: #e8eefb;
  --gold: #ffcc00;
  --ink: #14181f;
  --ink-soft: #444c59;
  --muted: #717885;
  --line: #e7e9ee;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-tint: #f1f4fb;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.04), 0 4px 16px rgba(20, 24, 31, 0.05);
  --shadow-md: 0 8px 30px rgba(20, 24, 31, 0.09);
  --container: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- Reset léger ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--eu-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.section { padding: 64px 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem;
  font-weight: 600; color: var(--eu-blue); margin: 0 0 14px;
}
.accent { color: var(--eu-blue); }

/* --- Boutons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--eu-blue); color: #fff; font-weight: 600; font-size: 0.95rem;
  padding: 13px 24px; border-radius: 999px; border: 1px solid var(--eu-blue);
  cursor: pointer; transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none; font-family: var(--sans);
}
.btn:hover { background: var(--eu-blue-700); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--eu-blue); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-tint); }
.btn-small { padding: 9px 16px; font-size: 0.85rem; }

/* --- En-tête -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  background: var(--eu-blue); color: var(--gold); border-radius: 8px; font-size: 16px;
}
.brand-text { font-family: var(--serif); font-size: 1.18rem; line-height: 1; }
.brand-text small {
  display: inline; font-family: var(--sans); font-size: 0.62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-left: 4px;
  vertical-align: middle;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; padding: 8px 14px;
  border-radius: 8px; transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--bg-tint); color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--eu-blue); background: var(--eu-blue-100); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.2s; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 480px at 78% -10%, var(--eu-blue-100), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: 84px 24px 76px; max-width: 880px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin: 0 0 22px; }
.hero-lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 640px; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Têtes de section ----------------------------------------------------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.9rem; margin: 0; }
.section-link { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.page-head { max-width: 760px; margin-bottom: 44px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin: 0 0 18px; }
.page-lead { font-size: 1.18rem; color: var(--ink-soft); margin: 0; }

/* --- Cartes d'articles ---------------------------------------------------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.featured-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.featured-side { display: grid; gap: 20px; align-content: start; }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  height: 100%;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d8dce6; }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.card-link:hover { text-decoration: none; }
.card-media {
  position: relative; aspect-ratio: 16 / 7; overflow: hidden;
  background:
    radial-gradient(600px 200px at 80% 0%, rgba(255,255,255,0.25), transparent),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000 18%));
  display: flex; align-items: flex-end; padding: 18px;
}
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.card-media.has-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,14,25,0.55) 0%, rgba(10,14,25,0.12) 40%, transparent 70%);
}
.card:hover .card-media img { transform: scale(1.04); }
.card-kicker {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.16); color: #fff; backdrop-filter: blur(2px);
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25);
}
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.card-title { font-size: 1.28rem; margin: 2px 0 0; }
.card-excerpt { color: var(--ink-soft); font-size: 0.97rem; margin: 0; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.card-featured .card-media { aspect-ratio: 16 / 8; }
.card-featured .card-title { font-size: 1.7rem; }
.card-featured .card-body { padding: 28px 30px 30px; }

.tag {
  font-size: 0.74rem; font-weight: 600; color: var(--eu-blue);
  background: var(--eu-blue-100); padding: 4px 10px; border-radius: 999px;
}

/* --- Teaser formation (accueil) ------------------------------------------ */
.formation-teaser {
  background: var(--bg-tint); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 38px;
}
.formation-intro { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 26px; max-width: 720px; }
.formation-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.formation-steps a { display: flex; gap: 16px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: inherit; transition: 0.15s; }
.formation-steps a:hover { border-color: var(--eu-blue); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.step-num { font-family: var(--serif); font-size: 1.5rem; color: var(--eu-blue); font-weight: 600; line-height: 1; }
.step-text { display: flex; flex-direction: column; gap: 3px; }
.step-text strong { font-size: 1.02rem; }
.step-text small { color: var(--muted); font-size: 0.86rem; line-height: 1.4; }

/* --- Bloc newsletter ------------------------------------------------------ */
.newsletter-cta { background: var(--eu-blue); color: #fff; margin-top: 16px; }
.newsletter-cta.compact { margin-top: 0; }
.nl-inner {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  padding: 64px 0;
}
.newsletter-cta.compact .nl-inner { padding: 48px 0; }
.nl-text h2 { color: #fff; font-size: 1.9rem; margin: 0 0 12px; }
.nl-text p { color: rgba(255,255,255,0.82); margin: 0; font-size: 1.05rem; }
.nl-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.nl-form input[type="email"] {
  flex: 1; min-width: 220px; padding: 14px 18px; border-radius: 999px; border: 1px solid transparent;
  font-size: 1rem; font-family: var(--sans); background: #fff; color: var(--ink);
}
.nl-form input[type="email"]:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.newsletter-cta .nl-form .btn { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.newsletter-cta .nl-form .btn:hover { background: #ffd633; }
.nl-status { flex-basis: 100%; margin: 4px 0 0; font-size: 0.9rem; min-height: 1.2em; color: rgba(255,255,255,0.9); }
.nl-status.ok { color: #c9f5d9; }
.nl-status.error { color: #ffd9d2; }
.nl-cta-btn { background: var(--gold); color: var(--ink); border-color: var(--gold); white-space: nowrap; }
.nl-cta-btn:hover { background: #ffd633; }

/* Formulaire Brevo intégré (mode GitHub Pages) */
.nl-embed { background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.nl-embed iframe { width: 100%; min-height: 460px; border: 0; border-radius: var(--radius); background: #fff; display: block; }
.nl-embed .nl-legal { padding: 12px 12px 4px; }

/* --- Page article & prose ------------------------------------------------- */
.article-head {
  max-width: 760px; padding-top: 56px; padding-bottom: 8px;
}
.article-head::before {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 4px;
  background: var(--accent, var(--eu-blue)); margin-bottom: 26px;
}
.back-link { font-size: 0.9rem; font-weight: 500; color: var(--muted); display: inline-block; margin-bottom: 22px; }
.back-link:hover { color: var(--eu-blue); }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 0 0 18px; }
.article-lead { font-size: 1.25rem; color: var(--ink-soft); margin: 0 0 22px; line-height: 1.5; }
.article-meta { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; color: var(--muted); padding-bottom: 30px; border-bottom: 1px solid var(--line); }

.article-hero { max-width: 920px; margin: 28px auto 0; padding-left: 24px; padding-right: 24px; }
.article-hero img {
  width: 100%; aspect-ratio: 16 / 8; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.article-body { max-width: 760px; padding-top: 36px; padding-bottom: 16px; }
.prose { font-size: 1.12rem; color: #23282f; }
.prose.narrow, .article-body.narrow { max-width: 720px; margin: 0 auto; }
.prose > * + * { margin-top: 1.35em; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2em; margin-bottom: 0.2em; }
.prose h3 { font-size: 1.28rem; margin-top: 1.8em; margin-bottom: 0.1em; }
.prose p { margin: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: #b9c4e3; }
.prose a:hover { text-decoration-color: var(--eu-blue); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 1.2em 0; }
.prose li { margin: 0.5em 0; }
.prose li::marker { color: var(--eu-blue); }
.prose blockquote {
  margin: 1.6em 0; padding: 6px 24px; border-left: 4px solid var(--eu-blue);
  background: var(--bg-tint); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-size: 1.18rem; color: var(--ink-soft); font-style: italic;
}
.prose blockquote p { margin: 0.6em 0; }
.prose img { border-radius: var(--radius); margin: 1.8em 0; box-shadow: var(--shadow-sm); }
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em;
  background: var(--bg-soft); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px;
}
.prose pre {
  background: #0f1729; color: #e8ecf4; padding: 20px 22px; border-radius: var(--radius);
  overflow-x: auto; font-size: 0.92rem; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.98rem; margin: 1.6em 0; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--sans); font-weight: 600; background: var(--bg-soft); }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2.4em; }
.source-box {
  margin-top: 2em; padding: 20px 24px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.source-box h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 8px; font-family: var(--sans); }
.source-box p { margin: 0; font-size: 0.95rem; }

/* --- Espace formation ----------------------------------------------------- */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; }
.module-card {
  display: flex; flex-direction: column; gap: 10px; padding: 30px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  color: inherit; transition: 0.18s; position: relative; overflow: hidden;
}
.module-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--eu-blue); opacity: 0; transition: 0.18s; }
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; border-color: #d8dce6; }
.module-card:hover::before { opacity: 1; }
.module-num { font-family: var(--serif); font-size: 2.4rem; color: var(--eu-blue-100); font-weight: 600; line-height: 1; }
.module-card h2 { font-size: 1.35rem; margin: 0; }
.module-card p { color: var(--ink-soft); margin: 0; flex: 1; font-size: 0.98rem; }
.module-duration { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.module-go { color: var(--eu-blue); font-weight: 600; font-size: 0.92rem; margin-top: 6px; }

.module-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 3em; padding-top: 1.6em; border-top: 1px solid var(--line); }
.module-pager a { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 48%; transition: 0.15s; }
.module-pager a:hover { border-color: var(--eu-blue); text-decoration: none; background: var(--bg-tint); }
.pager-next { text-align: right; margin-left: auto; }
.module-pager small { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.module-pager span { font-weight: 600; color: var(--ink); }

/* --- Page newsletter complète --------------------------------------------- */
.newsletter-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; margin-top: 8px; }
.nl-form-page { flex-direction: column; align-items: stretch; gap: 14px; background: var(--bg-tint); border: 1px solid var(--line); padding: 32px; border-radius: var(--radius-lg); }
.nl-form-page label { font-weight: 600; font-size: 0.95rem; }
.nl-form-page input[type="email"] { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.nl-form-page input[type="email"]:focus { outline: 3px solid var(--eu-blue-100); border-color: var(--eu-blue); }
.nl-form-page .btn { width: 100%; }
.nl-form-page .nl-status { color: var(--ink-soft); }
.nl-form-page .nl-status.ok { color: #0a7d5a; }
.nl-form-page .nl-status.error { color: #c0392b; }
.nl-legal { font-size: 0.83rem; color: var(--muted); margin: 4px 0 0; line-height: 1.5; }
.newsletter-aside h2 { font-size: 1.2rem; margin: 0 0 12px; }
.newsletter-aside h2:not(:first-child) { margin-top: 28px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; color: var(--ink-soft); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px;
  background: var(--eu-blue-100); color: var(--eu-blue); border-radius: 50%;
  display: grid; place-items: center; font-size: 0.7rem; font-weight: 700;
}

/* --- À propos & 404 ------------------------------------------------------- */
.about-page .prose { margin-top: 8px; }
.error-page { text-align: center; padding: 110px 0; }
.error-page h1 { font-size: 5rem; color: var(--eu-blue); margin: 0 0 8px; }
.error-page p { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 28px; }

/* --- Pied de page --------------------------------------------------------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; padding: 56px 24px 36px; }
.footer-brand .brand-mark { margin-bottom: 12px; }
.footer-brand strong { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 8px; }
.footer-brand p { color: var(--ink-soft); margin: 0 0 8px; font-size: 0.95rem; }
.footer-note { font-size: 0.83rem; color: var(--muted); }
.footer-col h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-family: var(--sans); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--ink-soft); padding: 4px 0; font-size: 0.95rem; }
.footer-col a:hover { color: var(--eu-blue); }
/* Le bouton d'inscription du pied de page : on rétablit l'apparence du bouton
   (texte blanc, largeur ajustée) que les règles ci-dessus écrasaient. */
.footer-col a.btn { display: inline-flex; width: auto; color: #fff; padding: 10px 20px; margin-top: 6px; font-size: 0.85rem; }
.footer-col a.btn:hover { color: #fff; }
.footer-col p { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 14px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding: 22px 24px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); flex-wrap: wrap; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .nl-inner { grid-template-columns: 1fr; gap: 22px; padding: 48px 0; }
  .newsletter-layout { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px 18px; gap: 2px;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: 0.2s;
    box-shadow: var(--shadow-md);
  }
  body.nav-open .site-nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 12px 14px; font-size: 1rem; }
  .section { padding: 48px 0; }
  .hero-inner { padding: 56px 24px 52px; }
  .formation-teaser { padding: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .module-pager a { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
