/* ============ atlas — styles ============ */
:root {
  --bg: #f4f4f2;
  --ink: #0a0a0a;
  --card: #ffffff;
  --muted: #6b6b6b;
  --line: #e2e2de;
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Empêche tout débordement horizontal (cause du décalage de mise en page
   constaté sur mobile : la page glissait à gauche avec un vide à droite). */
html, body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Logo animé (page d'accueil) ----------
   L'élément est dimensionné à sa taille "héro" (grande) par le JS, puis
   RÉDUIT via transform scale — jamais agrandi, sinon l'image pixelise. */
.logo-anim {
  position: fixed;
  top: 0; left: 0;
  z-index: 60;
  width: 132px;               /* défaut avant JS ; le JS fixe la vraie largeur */
  transform-origin: top left;
  will-change: transform;
  user-select: none;
  visibility: hidden;         /* rendu visible par le JS une fois positionné */
}
.logo-anim img { width: 100%; display: block; }

/* Navigateurs modernes : animation pilotée par le scroll, exécutée par le
   compositeur (fluide même pendant l'inertie iOS, sans JavaScript).
   Les valeurs de départ/arrivée sont fournies en variables CSS par le JS. */
@supports (animation-timeline: scroll()) {
  .logo-anim.css-anim {
    animation: logoShrink cubic-bezier(0.33, 1, 0.68, 1) both;
    animation-timeline: scroll(root);
    animation-range: 0px 420px;
  }
  @keyframes logoShrink {
    from { transform: translate3d(var(--lx0), var(--ly0), 0) scale(1); }
    to   { transform: translate3d(26px, var(--ly1), 0) scale(var(--s1)); }
  }
}

/* ---------- Logo statique (pages intérieures) ---------- */
.logo-static { width: 132px; display: block; flex-shrink: 0; }
.logo-static img { width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: rgba(244, 244, 242, 0);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.site-header.solid {
  background: rgba(244, 244, 242, .97);
  border-bottom-color: var(--line);
}

.main-nav { display: flex; gap: 30px; margin-left: auto; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.site-header.solid .main-nav { opacity: 1; pointer-events: auto; }
.main-nav a.active { border-bottom-color: var(--ink); }
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color .2s;
}
.main-nav a:hover { border-color: var(--ink); }

.burger {
  display: none;
  margin-left: auto;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.site-header.solid .burger { opacity: 1; pointer-events: auto; }
.burger span { display: block; width: 30px; height: 4px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 49;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: none;
  flex-direction: column;
  padding: 12px 28px 24px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 22px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 28px 40px;
}
.hero-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.hero-pills { display: flex; flex-direction: column; gap: 14px; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1c1c1c;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 44px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s;
}
.pill:hover { transform: scale(1.04); background: #000; }
.pill-light { background: #fff; color: var(--ink); border: 2px solid var(--ink); font-size: 15px; padding: 12px 28px; }
.pill-light:hover { background: var(--ink); color: #fff; }
.pill-dark { font-family: inherit; }

.hero-pills .pill { font-size: 15px; padding: 12px 30px; }

/* ---------- Mission ---------- */
.mission { max-width: 860px; margin: 0 auto; padding: 110px 28px 90px; }
.mission-kicker {
  font-size: 13px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.mission-title {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 26px;
}
.mission-title em { font-style: italic; }
.mission-text { font-size: 19px; line-height: 1.65; color: #333; max-width: 640px; }
.mission-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 54px;
}
.mission-stats div {
  border-top: 3px solid var(--ink);
  padding-top: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.mission-stats strong { font-size: 20px; font-weight: 900; letter-spacing: -0.01em; }
.mission-stats span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }

/* ---------- Sections communes ---------- */
.section-head { max-width: 1080px; margin: 0 auto 44px; padding: 0 28px; }
.section-head h2 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.03em;
}
.section-sub { color: var(--muted); font-size: 16px; margin-top: 8px; }

/* ---------- Actus ---------- */
.news { padding: 80px 0 40px; }
.news-block { max-width: 1080px; margin: 0 auto 56px; padding: 0 28px; }
.news-block-title {
  font-size: 22px; font-weight: 800;
  margin-bottom: 22px;
  display: flex; align-items: center; gap: 12px;
}
.news-block-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.news-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,.09); }
.news-card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #ddd; display: block; }
.news-card-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff;
  font-style: italic; font-weight: 900; font-size: 30px; letter-spacing: -0.04em;
}
.news-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card-body h4 { font-size: 17px; font-weight: 800; line-height: 1.35; letter-spacing: -0.01em; }
.news-card-body p { font-size: 14px; color: var(--muted); line-height: 1.5; flex: 1; }
.news-card-meta { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.news-loading, .news-error { color: var(--muted); font-size: 15px; padding: 12px 0; }

/* ---------- Podcasts ---------- */
.podcasts { padding: 80px 0; background: #ececea; }
.podcast-card {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  align-items: center;
}
.podcast-thumb {
  position: relative;
  display: block;
}
.podcast-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 22px;
}
.play-btn {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  border-radius: 22px;
  background: rgba(0,0,0,.12);
  transition: background .2s;
}
.podcast-thumb:hover .play-btn { background: rgba(0,0,0,.3); }
.play-btn svg {
  width: 74px; height: 74px;
  background: rgba(10,10,10,.82);
  border-radius: 50%;
  padding: 18px;
}
.podcast-ep { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.podcast-info h3 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; }
.podcast-role { font-size: 16px; font-weight: 700; font-style: italic; margin: 6px 0 16px; }
.podcast-desc { font-size: 16px; line-height: 1.65; color: #333; margin-bottom: 24px; }

.podcast-upcoming {
  max-width: 1080px;
  margin: 44px auto 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.upcoming-card {
  border: 2px dashed #c5c5c0;
  border-radius: 22px;
  padding: 34px 28px;
  color: var(--muted);
}
.upcoming-card span { font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.upcoming-card p { font-size: 19px; font-weight: 800; margin-top: 6px; font-style: italic; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--ink); color: #fff; padding: 96px 28px; }
.newsletter-inner { max-width: 660px; margin: 0 auto; text-align: center; }
.newsletter h2 { font-size: clamp(32px, 5vw, 48px); font-weight: 900; font-style: italic; letter-spacing: -0.03em; margin-bottom: 18px; }
.newsletter p { font-size: 17px; line-height: 1.6; color: #cfcfcf; margin-bottom: 34px; }
.newsletter-form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1;
  min-width: 240px;
  font-family: inherit;
  font-size: 16px;
  padding: 15px 24px;
  border-radius: 999px;
  border: 2px solid #3a3a3a;
  background: #161616;
  color: #fff;
  outline: none;
}
.newsletter-form input:focus { border-color: #fff; }
.newsletter-form .pill { background: #fff; color: var(--ink); }
.newsletter-form .pill:hover { background: #e8e8e8; }
.form-msg { margin-top: 16px; font-weight: 700; font-size: 15px; min-height: 20px; }

/* ---------- Contact ---------- */
.contact { padding: 90px 0 110px; }
.contact-form { max-width: 720px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input, .contact-form textarea {
  font-family: inherit;
  font-size: 16px;
  padding: 15px 20px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  outline: none;
  resize: vertical;
  transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--ink); }
.contact-form .pill { align-self: flex-start; }
.contact .form-msg { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 90px 28px 0;
}
.footer-logo { margin-bottom: 70px; user-select: none; }
.footer-logo img {
  width: clamp(260px, 55vw, 640px);
  max-width: 100%;
  height: auto;
  display: inline-block;
}
.footer-socials {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 30px;
  padding: 22px 34px;
  max-width: calc(100% - 16px);
  box-sizing: border-box;
  background: #111;
  border-radius: 14px;
  margin-bottom: 70px;
}
.footer-socials a { color: #fff; opacity: .9; transition: opacity .2s, transform .15s; }
.footer-socials a:hover { opacity: 1; transform: scale(1.15); }
.footer-socials svg { width: 24px; height: 24px; display: block; }
.footer-legal {
  background: #0c0c0c;
  padding: 34px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-legal a { color: #9a9a9a; text-decoration: none; font-size: 15px; }
.footer-legal a:hover { color: #fff; }
.footer-copy { background: #0c0c0c; color: #555; font-size: 13px; padding: 6px 0 26px; }

/* ---------- Pages intérieures ---------- */
.page-main { padding-top: calc(var(--header-h) + 48px); min-height: 62vh; }
.page-main--flush { padding-top: var(--header-h); }
.page-main .podcasts { padding-top: 40px; }
.page-main .contact { padding-top: 20px; }
.page-main--flush .newsletter { min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .podcast-card { grid-template-columns: 1fr; gap: 30px; }
  .podcast-upcoming { grid-template-columns: 1fr; }
  .mission-stats { grid-template-columns: 1fr; gap: 26px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 30px; }
  .news-grid { gap: 12px; }
  .news-card { border-radius: 16px; }
  .news-card-body { padding: 12px 13px 14px; }
  .news-card-body h4 { font-size: 14px; }
  .news-card-body p { display: none; }
  .news-card-meta { font-size: 10.5px; }
}
