/* ============================================================
   Apostello — Plateforme chrétienne numérique
   Feuille de style principale (design tokens + composants)
   ============================================================ */

:root {
  --apo-navy:        #0B1034;
  --apo-navy-dark:   #060B22;
  --apo-blue:        #1C5FAF;
  --apo-blue-dark:   #164A8A;
  --apo-blue-light:  #4C8EDC;
  --apo-orange:      #F76C1F;
  --apo-orange-dark: #D45A0F;
  --apo-white:       #FFFFFF;
  --apo-gray:        #E8E8EA;
  --apo-gray-2:      #C8C8CC;
  --apo-ink:         #0B1034;
  --apo-maxw:        1280px;
  --font-head:       'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:       'Inter', system-ui, -apple-system, sans-serif;

  /* Tokens sémantiques */
  --bg:          #F5F6FA;
  --surface:     #FFFFFF;
  --surface-2:   #EEF0F8;
  --text:        #0B1034;
  --text-muted:  #4A5285;
  --text-soft:   #8890B0;
  --border:      rgba(11,16,52,.10);
  --topbar-bg:   #060B22;
  --header-bg:   #0B1034;
  --page-head:   linear-gradient(180deg, #EEF0F8, #F5F6FA);
  --accent:      #F76C1F;
  --accent-2:    #1C5FAF;
}

[data-theme="dark"] {
  --bg:         #060B22;
  --surface:    #0B1034;
  --surface-2:  #101640;
  --text:       #E8EAFF;
  --text-muted: #8890B0;
  --text-soft:  #5560A0;
  --border:     rgba(255,255,255,.10);
  --topbar-bg:  #030710;
  --header-bg:  #060B22;
  --page-head:  linear-gradient(180deg, #0B1034, #060B22);
}

html { background: var(--bg); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--apo-orange); color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; }

.apo-container { max-width: var(--apo-maxw); margin: 0 auto; padding: 0 28px; }
.apo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   TOPBAR
   ============================================================ */
.apo-topbar {
  background: var(--topbar-bg);
  padding: 8px 0;
  font-size: .8rem;
  color: rgba(255,255,255,.7);
}
.apo-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--apo-maxw);
  margin: 0 auto;
  padding: 0 28px;
}
.apo-topbar__verse {
  font-style: italic;
  color: rgba(255,255,255,.8);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 60%;
}
.apo-topbar__links a {
  color: rgba(255,255,255,.7);
  margin-left: 16px;
  font-size: .78rem;
  transition: color .2s;
}
.apo-topbar__links a:hover { color: var(--apo-orange); }

/* ============================================================
   HEADER
   ============================================================ */
.apo-header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.apo-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--apo-maxw);
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
}
.apo-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.apo-logo img { height: 40px; }
.apo-logo__cross {
  color: var(--apo-orange);
  font-size: 1.8rem;
  line-height: 1;
}
.apo-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.apo-nav a {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.apo-nav a:hover, .apo-nav a.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.apo-nav a.apo-nav__cta {
  background: var(--apo-orange);
  color: #fff;
  margin-left: 8px;
}
.apo-nav a.apo-nav__cta:hover { background: var(--apo-orange-dark); }

.apo-header__actions { display: flex; align-items: center; gap: 8px; }
.apo-btn-icon {
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.apo-btn-icon:hover { background: rgba(255,255,255,.2); }

/* Mobile menu */
.apo-menu-btn { display: none; }
@media (max-width: 900px) {
  .apo-nav { display: none; }
  .apo-menu-btn { display: flex; }
}

/* ============================================================
   HERO ACCUEIL
   ============================================================ */
.apo-hero {
  background: linear-gradient(135deg, var(--apo-navy) 0%, #162060 60%, #1C5FAF 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.apo-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="40" fill="rgba(247,108,31,.08)"/><circle cx="10" cy="80" r="30" fill="rgba(76,142,220,.06)"/></svg>') no-repeat;
  background-size: cover;
}
.apo-hero__inner {
  position: relative;
  max-width: var(--apo-maxw);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.apo-hero__kicker {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--apo-orange);
  margin-bottom: 16px;
}
.apo-hero__title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
}
.apo-hero__verse {
  font-style: italic;
  color: rgba(255,255,255,.7);
  margin-bottom: 36px;
  font-size: 1.05rem;
}
.apo-hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.apo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
}
.apo-btn--primary { background: var(--apo-orange); color: #fff; }
.apo-btn--primary:hover { background: var(--apo-orange-dark); }
.apo-btn--outline { border-color: rgba(255,255,255,.5); color: #fff; }
.apo-btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.apo-btn--blue { background: var(--apo-blue); color: #fff; }
.apo-btn--blue:hover { background: var(--apo-blue-dark); }
@media (max-width: 768px) {
  .apo-hero__inner { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================================
   VERSET DU JOUR
   ============================================================ */
.apo-verse-bar {
  background: var(--apo-blue);
  color: #fff;
  padding: 28px 0;
  text-align: center;
}
.apo-verse-bar__ref {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 8px;
}
.apo-verse-bar__text {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================================
   SECTION GÉNÉRIQUE
   ============================================================ */
.apo-section { padding: 64px 0; }
.apo-section--dark { background: var(--apo-navy); color: #fff; }
.apo-section--gray { background: var(--surface-2); }
.apo-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
}
.apo-section__title {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}
.apo-section__sub {
  font-size: .9rem;
  color: var(--text-soft);
  margin-top: 6px;
}
.apo-section__link {
  color: var(--apo-blue);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.apo-section__link:hover { color: var(--apo-orange); }

/* ============================================================
   CARDS
   ============================================================ */
.apo-grid { display: grid; gap: 24px; }
.apo-grid--3 { grid-template-columns: repeat(3, 1fr); }
.apo-grid--4 { grid-template-columns: repeat(4, 1fr); }
.apo-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .apo-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .apo-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .apo-grid--4, .apo-grid--3, .apo-grid--2 { grid-template-columns: 1fr; }
}

.apo-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.apo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(11,16,52,.12);
}
.apo-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.apo-card__body { padding: 18px; }
.apo-card__cat {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--apo-orange);
  margin-bottom: 8px;
}
.apo-card__title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
}
.apo-card__meta {
  font-size: .8rem;
  color: var(--text-soft);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.apo-card__meta i { color: var(--apo-blue); }

/* Card prédication (avec player) */
.apo-card--pred .apo-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,16,52,.45);
  opacity: 0;
  transition: opacity .2s;
}
.apo-card--pred:hover .apo-card__play { opacity: 1; }
.apo-card__img-wrap { position: relative; }
.apo-play-btn {
  width: 54px;
  height: 54px;
  background: var(--apo-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}

/* Card événement */
.apo-card--event .apo-card__date-badge {
  background: var(--apo-orange);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  line-height: 1.2;
}
.apo-card--event .apo-card__date-badge strong { display: block; font-size: 1.6rem; }
.apo-card--event .apo-card__date-badge span { font-size: .78rem; text-transform: uppercase; }

/* ============================================================
   PRAYER WALL
   ============================================================ */
.apo-prayer-cta {
  background: linear-gradient(135deg, var(--apo-navy), #1C3070);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.apo-prayer-cta__icon { font-size: 3rem; margin-bottom: 16px; opacity: .8; }
.apo-prayer-cta__title {
  font-family: var(--font-head);
  font-size: 2rem;
  margin-bottom: 12px;
}
.apo-prayer-cta__sub {
  color: rgba(255,255,255,.75);
  max-width: 500px;
  margin: 0 auto 32px;
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.apo-newsletter {
  background: var(--apo-orange);
  color: #fff;
  padding: 64px 0;
}
.apo-newsletter__inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 28px;
  text-align: center;
}
.apo-newsletter__title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.apo-newsletter__sub { opacity: .9; margin-bottom: 28px; }
.apo-newsletter__form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.apo-newsletter__form input {
  flex: 1;
  min-width: 220px;
  padding: 14px 20px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: .95rem;
}
.apo-newsletter__form input::placeholder { color: rgba(255,255,255,.7); }
.apo-newsletter__form button {
  background: #fff;
  color: var(--apo-orange);
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.apo-newsletter__form button:hover { background: var(--apo-gray); }

/* ============================================================
   FOOTER
   ============================================================ */
.apo-footer {
  background: var(--apo-navy-dark);
  color: rgba(255,255,255,.75);
  padding: 60px 0 0;
}
.apo-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: var(--apo-maxw);
  margin: 0 auto;
  padding: 0 28px 48px;
}
.apo-footer__brand h3 {
  font-family: var(--font-head);
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.apo-footer__brand p { font-size: .9rem; line-height: 1.7; margin-bottom: 20px; }
.apo-footer__title {
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.apo-footer__links { list-style: none; padding: 0; margin: 0; }
.apo-footer__links li { margin-bottom: 10px; }
.apo-footer__links a {
  font-size: .88rem;
  transition: color .2s;
}
.apo-footer__links a:hover { color: var(--apo-orange); }
.apo-footer__social { display: flex; gap: 10px; }
.apo-footer__social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background .2s;
}
.apo-footer__social a:hover { background: var(--apo-orange); }
.apo-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  text-align: center;
  gap: 8px;
}
.apo-footer__bottom a { color: var(--apo-blue-light); }
@media (max-width: 900px) {
  .apo-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .apo-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================================
   AUDIO PLAYER
   ============================================================ */
.apo-player {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.apo-player__thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.apo-player__info { flex: 1; min-width: 0; }
.apo-player__title {
  font-weight: 700;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.apo-player__by { font-size: .8rem; color: var(--text-soft); }
.apo-player__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.apo-player__play {
  width: 44px;
  height: 44px;
  background: var(--apo-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background .2s;
}
.apo-player__play:hover { background: var(--apo-blue-dark); }

/* ============================================================
   UTILITAIRES
   ============================================================ */
.apo-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.apo-badge--orange { background: rgba(247,108,31,.12); color: var(--apo-orange); }
.apo-badge--blue { background: rgba(28,95,175,.12); color: var(--apo-blue); }
.apo-badge--navy { background: rgba(11,16,52,.10); color: var(--apo-navy); }

.apo-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Toggle dark mode */
.apo-theme-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 6px;
  border-radius: 6px;
  transition: background .2s;
}
.apo-theme-toggle:hover { background: rgba(255,255,255,.1); }

/* Animations */
@keyframes apopulse { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes apofade { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
