/*
Theme Name: Oscar Depoix — Portfolio Journaliste
Theme URI: https://oscardepoix.fr
Author: Oscar Depoix
Description: Thème portfolio sur mesure pour journaliste multiformat. Design éditorial épuré, trié par date décroissante, avec code couleur par format.
Version: 1.0
*/

/* ============================================================
   IMPORTS & VARIABLES
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;

  --black: #0d0d0d;
  --white: #fafaf8;
  --gray-50: #f5f5f2;
  --gray-100: #ebebе7;
  --gray-200: #d4d4ce;
  --gray-400: #9a9a92;
  --gray-600: #5a5a54;
  --gray-800: #2a2a26;

  --color-web:   #1a6fb5;
  --color-print: #c04a22;
  --color-radio: #0f7a58;
  --color-tv:    #5040b0;

  --bg-web:   #e8f2fb;
  --bg-print: #faede8;
  --bg-radio: #e4f5ef;
  --bg-tv:    #eeedfb;

  --border: 1px solid rgba(0,0,0,0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --transition: 0.2s ease;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
}

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

html { scroll-behavior: smooth; }

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

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 4px;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--black);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-menu a {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 400;
  letter-spacing: 0.2px;
  transition: color var(--transition);
}

.nav-menu a:hover { color: var(--black); }

.nav-contact-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 18px;
  border: 1px solid var(--black);
  border-radius: 40px;
  background: transparent;
  color: var(--black);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.nav-contact-btn:hover {
  background: var(--black);
  color: var(--white);
}

/* Hamburger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--black);
  transition: all var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
  border-bottom: var(--border);
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 20px;
  font-weight: 400;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 80px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -2px;
  color: var(--black);
  margin-bottom: 20px;
}

.hero-bio {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 28px;
  font-weight: 300;
}

.hero-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.format-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 40px;
  letter-spacing: 0.3px;
}

.format-pill.web   { background: var(--bg-web);   color: var(--color-web);   }
.format-pill.print { background: var(--bg-print); color: var(--color-print); }
.format-pill.radio { background: var(--bg-radio); color: var(--color-radio); }
.format-pill.tv    { background: var(--bg-tv);    color: var(--color-tv);    }

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 11px 24px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 40px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity var(--transition);
}
.btn-primary:hover { opacity: 0.8; }

.btn-outline {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  padding: 11px 24px;
  background: transparent;
  color: var(--black);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 40px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--black); background: var(--gray-50); }

/* Stats hero right */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 160px;
}

.stat-item {
  text-align: right;
  padding-bottom: 16px;
  border-bottom: var(--border);
}
.stat-item:last-child { border-bottom: none; padding-bottom: 0; }

.stat-number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  color: var(--black);
  line-height: 1;
  letter-spacing: -1px;
}
.stat-label {
  font-size: 11px;
  color: var(--gray-400);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ============================================================
   SECTION COMMUNES
   ============================================================ */
.section-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px;
  border-bottom: var(--border);
}

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

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-400);
}

.section-see-all {
  font-size: 12px;
  color: var(--gray-600);
  transition: color var(--transition);
}
.section-see-all:hover { color: var(--black); }

/* ============================================================
   FILTRES
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  padding: 6px 16px;
  border-radius: 40px;
  border: 1px solid rgba(0,0,0,0.12);
  background: transparent;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ============================================================
   GRILLE PORTFOLIO
   ============================================================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: auto;
  gap: 1px;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.portfolio-grid.grid-small {
  grid-template-columns: 1fr;
}

.post-card {
  background: var(--white);
  padding: 24px;
  transition: transform 200ms ease, box-shadow 200ms ease, background var(--transition);
  display: flex;
  flex-direction: column;
  opacity: 0;
}

.post-card.visible {
  animation: fadeSlideUp 0.5s ease forwards;
  opacity: 1;
}

.post-card:hover {
  background: var(--gray-50);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.post-card.featured { grid-row: span 2; }
.post-card.featured.no-span { grid-row: span 1; }

.post-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Miniature */
.post-thumb {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-50);
  margin-bottom: 16px;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-thumb-icon {
  font-size: 28px;
  opacity: 0.3;
}

.post-card.featured .post-thumb { aspect-ratio: 4/3; }

/* Format badge */
.post-format {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.format-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.post-format.cat-article     .format-dot,
.post-format.cat-presse-digitale .format-dot { background: var(--color-web); }
.post-format.cat-presse-ecrite .format-dot   { background: var(--color-print); }
.post-format.cat-radio .format-dot           { background: var(--color-radio); }
.post-format.cat-video .format-dot,
.post-format.cat-reportage .format-dot       { background: var(--color-tv); }

.post-format.cat-article,
.post-format.cat-presse-digitale { color: var(--color-web); }
.post-format.cat-presse-ecrite   { color: var(--color-print); }
.post-format.cat-radio           { color: var(--color-radio); }
.post-format.cat-video,
.post-format.cat-reportage       { color: var(--color-tv); }

/* Titre */
.post-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}

.post-card.featured .post-title {
  font-size: 20px;
  line-height: 1.3;
}

/* Meta */
.post-meta {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: auto;
}

/* ============================================================
   MES FORMATS (section explicative)
   ============================================================ */
.formats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.format-card {
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  transition: box-shadow var(--transition);
}

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

.format-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 14px;
}

.format-card.web   .format-card-icon { background: var(--bg-web); }
.format-card.print .format-card-icon { background: var(--bg-print); }
.format-card.radio .format-card-icon { background: var(--bg-radio); }
.format-card.tv    .format-card-icon { background: var(--bg-tv); }

.format-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 4px;
}

.format-card-count {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.format-card-desc {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.65;
}

/* ============================================================
   LISTE MEDIA (Radio / Vidéo)
   ============================================================ */
.media-list {
  display: flex;
  flex-direction: column;
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.media-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: var(--border);
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}

.media-item:last-child { border-bottom: none; }
.media-item:hover { background: var(--gray-50); }

.media-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--gray-600);
  flex-shrink: 0;
  transition: all var(--transition);
}

.media-item:hover .media-play {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.media-info { flex: 1; min-width: 0; }

.media-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-meta {
  font-size: 11px;
  color: var(--gray-400);
}

.media-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.media-tag.radio { background: var(--bg-radio); color: var(--color-radio); }
.media-tag.video { background: var(--bg-tv);    color: var(--color-tv);    }

/* ============================================================
   CONTACT BAND
   ============================================================ */
.contact-band {
  background: var(--gray-50);
  border-top: var(--border);
}

.contact-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

.contact-text h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.contact-text p {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 300;
}

.contact-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 11px;
  color: var(--gray-400);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 11px;
  color: var(--gray-400);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--black); }

/* ============================================================
   PAGE ARTICLE INDIVIDUEL
   ============================================================ */
.single-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 32px 40px;
  border-bottom: var(--border);
}

.single-format-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.single-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--black);
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.single-meta {
  font-size: 12px;
  color: var(--gray-400);
}

.single-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  font-size: 17px;
  line-height: 1.85;
  color: var(--gray-800);
  font-weight: 300;
}

.single-content p { margin-bottom: 1.5em; }
.single-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--black);
  margin: 2em 0 0.75em;
}
.single-content h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--black);
  margin: 1.5em 0 0.5em;
}
.single-content blockquote {
  border-left: 3px solid var(--black);
  padding: 4px 0 4px 24px;
  margin: 2em 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gray-600);
  font-style: italic;
}
.single-content figure { margin: 2em 0; }
.single-content figure img { border-radius: var(--radius-md); }
.single-content figcaption {
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
  margin-top: 8px;
}

/* Embed responsive (YouTube, SoundCloud…) */
.single-content iframe,
.single-content embed,
.single-content object {
  max-width: 100%;
  border-radius: var(--radius-md);
}

.wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 24px; }
  .hero-stats { flex-direction: row; justify-content: flex-start; }
  .stat-item { text-align: left; padding-bottom: 0; border-bottom: none; padding-right: 24px; border-right: var(--border); }
  .stat-item:last-child { border-right: none; }

  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .post-card.featured { grid-column: span 2; grid-row: span 1; }

  .formats-grid { grid-template-columns: repeat(2, 1fr); }

  .nav-menu, .nav-contact-btn { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-column: span 1; }
  .formats-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { flex-direction: column; align-items: flex-start; }
  .section-wrap { padding: 40px 20px; }
  .hero { padding: 40px 20px; }
}
/* ── Menu mobile (ajout) ──────────────────────────────── */
.nav-mobile {
  display: none;
  background: var(--white);
  border-top: var(--border);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.nav-mobile.open {
  display: block;
  max-height: 400px;
  padding: 8px 0 16px;
}

.nav-mobile ul {
  list-style: none;
  padding: 0 24px;
}

.nav-mobile ul li a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  color: var(--gray-800);
  border-bottom: var(--border);
}

.nav-mobile ul li:last-child a {
  border-bottom: none;
}

/* ============================================================
   BARRE D'ACCENTUATION TOP
   ============================================================ */
body::before {
  content: '';
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1a6fb5, #c04a22, #0f7a58, #5040b0);
  z-index: 999;
}

/* ============================================================
   PHOTO DE PROFIL HERO
   ============================================================ */
.hero-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 18%;
  transform: scale(2.2);
}

/* ============================================================
   HERO NAME — CONTRASTE OSCAR / DEPOIX
   ============================================================ */
.hero-name-first { font-weight: 600; color: var(--black); }
.hero-name-last  { font-weight: 400; color: var(--gray-400); }

/* ============================================================
   ANIMATIONS D'ENTRÉE
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeSlideUp 0.5s ease forwards;
}

.hero-content {
  animation: fadeSlideUp 0.5s ease forwards;
}

/* ============================================================
   PULSE DOT AU HOVER CARTE
   ============================================================ */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.5); }
}

.post-card:hover .format-dot {
  animation: pulse-dot 0.6s ease;
}

/* ============================================================
   SECTIONS ALTERNÉES
   ============================================================ */
.section-wrap:nth-child(even) { background: #f9f9f6; }

/* ============================================================
   TRANSITIONS GLOBALES BOUTONS / LIENS
   ============================================================ */
a, button { transition: all 0.2s ease; }

/* ============================================================
   DARK MODE TOGGLE BOUTON
   ============================================================ */
.dark-toggle {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.dark-toggle:hover { background: var(--gray-50); }

/* ============================================================
   DARK MODE — VARIABLES & SURCHARGES
   ============================================================ */
body.dark {
  --white: #0d0d0d;
  --black: #fafaf8;
  --gray-50: #1a1a1a;
  --gray-100: #222222;
  --gray-200: #333333;
  --gray-400: #7a7a72;
  --gray-600: #b0b0a8;
  --gray-800: #d8d8d2;
  --border: 1px solid rgba(255,255,255,0.09);
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
  background: #0d0d0d;
  color: #fafaf8;
}

body.dark .site-header {
  background: rgba(13,13,13,0.92);
}

body.dark .nav-mobile {
  background: #0d0d0d;
}

body.dark .dark-toggle {
  border-color: rgba(255,255,255,0.15);
}

body.dark .dark-toggle:hover {
  background: var(--gray-100);
}

body.dark .section-wrap:nth-child(even) {
  background: #141414;
}

body.dark .contact-band {
  background: var(--gray-50);
}

body.dark .portfolio-grid {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.06);
}

body.dark .post-card {
  background: #0d0d0d;
}

body.dark .post-card:hover {
  background: var(--gray-50);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

body.dark .media-list {
  border-color: rgba(255,255,255,0.09);
}

body.dark .media-item {
  border-bottom-color: rgba(255,255,255,0.09);
}

body.dark .media-item:hover {
  background: var(--gray-50);
}

body.dark .media-play {
  border-color: rgba(255,255,255,0.15);
}

body.dark .format-card {
  border-color: rgba(255,255,255,0.09);
}

body.dark .filter-btn {
  border-color: rgba(255,255,255,0.12);
}

body.dark .btn-outline {
  border-color: rgba(255,255,255,0.2);
}

body.dark .nav-contact-btn {
  border-color: var(--black);
}

