/*
Theme Name: Capsul
Theme URI: https://capsul.fr
Description: Thème enfant Capsul - Site de presse & magazine
Author: Capsul
Template: generatepress
Version: 1.0.0
Text Domain: capsul
*/

/* =============================================
   IMPORT FONTS
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Fraunces:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
  --yellow: #F5C800;
  --yellow-dark: #E0B500;
  --black: #0D0D0D;
  --white: #FFFFFF;
  --blue: #1A3DDB;
  --blue-dark: #1230B0;
  --red: #E8341A;
  --gray-light: #F4F4F2;
  --gray-mid: #E0E0DC;
  --gray-text: #6B6B6B;
  --font-display: 'Bebas Neue', sans-serif;
  --font-serif: 'Fraunces', serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 4px;
  --shadow: 0 2px 16px rgba(0,0,0,0.10);
  --shadow-hover: 0 6px 32px rgba(0,0,0,0.18);
  --max-width: 1380px;
  --header-height: 110px;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =============================================
   HEADER
   ============================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-top {
  display: flex;
  align-items: stretch;
  height: 70px;
  border-bottom: 1px solid var(--gray-mid);
}

/* Logo zone */
.header-logo-zone {
  background: var(--yellow);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  min-width: 340px;
  position: relative;
}

.header-logo-zone::after {
  content: '';
  position: absolute;
  right: -18px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 70px solid var(--yellow);
  border-right: 18px solid transparent;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--black);
  letter-spacing: -1px;
  line-height: 1;
}

.site-tagline {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--black);
  line-height: 1.4;
  max-width: 120px;
}

/* Header nav */
.header-nav {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 24px;
}

.header-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--black);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-light);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 0.88rem;
  color: var(--gray-text);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: background 0.2s;
  width: 200px;
}

.header-search:hover { background: var(--gray-mid); }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
}

.btn-newsletter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--black);
}

.btn-subscribe {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-subscribe:hover {
  background: #333;
  transform: translateY(-1px);
}

/* Category nav bar */
.header-cats {
  background: var(--white);
  border-bottom: 2px solid var(--gray-mid);
  overflow-x: auto;
  scrollbar-width: none;
}

.header-cats::-webkit-scrollbar { display: none; }

.header-cats nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  gap: 0;
}

.header-cats nav a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-text);
  padding: 14px 18px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.header-cats nav a:hover { color: var(--black); }
.header-cats nav a.active {
  color: var(--black);
  border-bottom-color: var(--blue);
}

/* =============================================
   LAYOUT WRAPPER
   ============================================= */
.capsul-homepage {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 380px 280px;
  grid-template-rows: auto;
  gap: 16px;
  padding: 20px 0 24px;
}

/* Hero main article */
.hero-main {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: 420px;
  background: var(--black);
  cursor: pointer;
}

.hero-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity 0.4s, transform 0.5s;
  position: absolute;
  inset: 0;
}

.hero-main:hover .hero-main-img {
  opacity: 0.65;
  transform: scale(1.03);
}

.hero-main-content {
  position: relative;
  z-index: 2;
  padding: 28px 32px 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.3) 55%, transparent 100%);
}

/* Badge catégorie */
.cat-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
  width: fit-content;
}

.cat-badge.histoire { background: var(--yellow); color: var(--black); }
.cat-badge.science { background: #00C2A8; color: var(--white); }
.cat-badge.cinema { background: var(--red); color: var(--white); }
.cat-badge.sociologie { background: #9B59B6; color: var(--white); }
.cat-badge.politique { background: #E74C3C; color: var(--white); }
.cat-badge.culture { background: #2ECC71; color: var(--white); }
.cat-badge.animaux { background: #F39C12; color: var(--white); }
.cat-badge.entreprise { background: var(--blue); color: var(--white); }

.hero-main-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-main-excerpt {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.6;
  margin-bottom: 18px;
  max-width: 480px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-meta-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.4);
}

.hero-meta-text {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
}

.hero-meta-text strong { color: var(--white); font-weight: 600; }

.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--yellow);
  color: var(--black);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  width: fit-content;
  transition: background 0.2s, transform 0.15s;
}

.btn-read:hover { background: var(--yellow-dark); transform: translateY(-2px); }
.btn-read svg { transition: transform 0.2s; }
.btn-read:hover svg { transform: translateX(4px); }

/* Hero secondary (colonne du milieu) */
.hero-secondary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--black);
  flex: 1;
  min-height: 190px;
  cursor: pointer;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  position: absolute;
  inset: 0;
  transition: opacity 0.3s, transform 0.4s;
}

.hero-card:hover img { opacity: 0.6; transform: scale(1.04); }

.hero-card-content {
  position: relative;
  z-index: 2;
  padding: 16px 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 70%);
}

.hero-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 8px;
}

.card-meta-small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

/* Hero tertiary (colonne de droite — fond blanc) */
.hero-tertiary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-card-light {
  display: flex;
  gap: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-mid);
  padding: 14px;
  cursor: pointer;
  transition: box-shadow 0.2s;
  flex: 1;
}

.hero-card-light:hover { box-shadow: var(--shadow-hover); }

.hero-card-light-img {
  width: 90px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.hero-card-light-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.hero-card-light-title {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
}

.hero-card-light-meta {
  font-size: 0.73rem;
  color: var(--gray-text);
  margin-top: auto;
}

.bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-text);
  padding: 2px;
  align-self: flex-end;
  transition: color 0.2s;
}
.bookmark-btn:hover { color: var(--black); }

/* =============================================
   SECTION INDISPENSABLES
   ============================================= */
.section-indispensables {
  padding: 32px 0 28px;
  border-top: 1px solid var(--gray-mid);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--black);
}

.section-title-icon { color: var(--yellow); font-size: 1.3rem; }

.section-title-deco {
  display: inline-block;
  width: 36px;
  height: 3px;
  background: var(--yellow);
  border-radius: 2px;
}

.voir-tout {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-text);
  transition: color 0.2s;
}

.voir-tout:hover { color: var(--black); }

/* Grid indispensables */
.indispensables-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.indispensable-card {
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-mid);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.indispensable-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.indispensable-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--black);
}

.indispensable-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.indispensable-card:hover .indispensable-img-wrap img { transform: scale(1.06); }

.play-icon {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.7);
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.indispensable-body { padding: 14px; }

.indispensable-title {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--black);
}

.indispensable-meta {
  font-size: 0.75rem;
  color: var(--gray-text);
}

/* =============================================
   VOIX DE LA RÉDAC WIDGET
   ============================================= */
.voix-redac {
  background: var(--blue);
  border-radius: 10px;
  padding: 24px 28px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.voix-redac::before {
  content: 'C';
  font-family: var(--font-display);
  font-size: 10rem;
  position: absolute;
  right: -10px;
  bottom: -20px;
  color: rgba(255,255,255,0.06);
  line-height: 1;
}

.voix-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.7);
}

.voix-label span { color: var(--yellow); }

.voix-body { display: flex; align-items: center; gap: 16px; }

.voix-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.voix-author-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--yellow);
}

.voix-author-role {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

.voix-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--white);
  position: relative;
  z-index: 1;
}

.voix-dots {
  display: flex;
  gap: 6px;
}

.voix-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.2s;
}

.voix-dot.active { background: var(--yellow); }

/* =============================================
   SECTION EN CE MOMENT (TAGS)
   ============================================= */
.section-tags {
  border-top: 1px solid var(--gray-mid);
  padding: 20px 0 28px;
}

.section-tags-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-tags-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tag-pill {
  background: var(--gray-light);
  border: 1px solid var(--gray-mid);
  border-radius: 30px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.tag-pill:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.tag-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.tag-arrow-btn:hover { background: var(--blue); }

/* =============================================
   BOTTOM GRID : Indispensables + Redac
   ============================================= */
.bottom-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding-bottom: 40px;
}

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
  background: var(--black);
  color: var(--white);
  padding: 48px 0 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 220px 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--yellow);
  letter-spacing: -1px;
}

.footer-tagline {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
  line-height: 1.5;
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col ul a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--yellow); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* =============================================
   SEARCH OVERLAY
   ============================================= */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.search-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.search-box {
  width: 640px;
  background: var(--white);
  border-radius: 10px;
  padding: 28px;
}

.search-box input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--black);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  padding: 10px 0;
  outline: none;
  color: var(--black);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .hero-section { grid-template-columns: 1fr 320px; grid-template-rows: auto auto; }
  .hero-tertiary { grid-column: 1 / -1; flex-direction: row; }
  .indispensables-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 120px; }
  .header-top { height: auto; flex-wrap: wrap; }
  .header-logo-zone { min-width: auto; padding: 16px 20px; }
  .header-logo-zone::after { display: none; }
  .header-nav { padding: 12px 16px; }
  .hero-section { grid-template-columns: 1fr; }
  .hero-secondary, .hero-tertiary { flex-direction: column; }
  .hero-tertiary { flex-direction: row; flex-wrap: wrap; }
  .hero-card-light { flex: 1 1 calc(50% - 8px); }
  .indispensables-grid { grid-template-columns: 1fr 1fr; }
  .bottom-section { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .header-cats nav a { padding: 12px 12px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .hero-main-title { font-size: 1.9rem; }
  .indispensables-grid { grid-template-columns: 1fr; }
  .hero-card-light { flex: 1 1 100%; }
  .footer-top { grid-template-columns: 1fr; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-main-content > * {
  animation: fadeUp 0.55s ease both;
}
.hero-main-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-main-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-main-content > *:nth-child(3) { animation-delay: 0.25s; }
.hero-main-content > *:nth-child(4) { animation-delay: 0.35s; }
.hero-main-content > *:nth-child(5) { animation-delay: 0.42s; }
