/*
Theme Name:   Notes Brou Child
Theme URI:    https://notes.brou.pm
Description:  Child theme for GeneratePress — notes.brou.pm
Author:       Peheme
Author URI:   https://brou.pm
Template:     generatepress
Version:      1.0.0
Text Domain:  notes-brou-child
*/

/* ============================================================
   VARIABLES & TOKENS
   ============================================================ */

:root {
  /* Palette dark (défaut) */
  --bg-base:        #0d0f1a;
  --bg-surface:     #111420;
  --bg-hover:       rgba(0, 212, 232, 0.03);
  --bg-note:        rgba(120, 60, 220, 0.06);

  --border-subtle:  rgba(120, 180, 255, 0.08);
  --border-mid:     rgba(120, 180, 255, 0.12);
  --border-strong:  rgba(120, 180, 255, 0.22);

  --text-primary:   #e0dff5;
  --text-body:      #8090b0;
  --text-muted:     #4a5070;
  --text-faint:     #2a3050;
  --text-ghost:     #1e2540;

  --accent-cyan:    #00d4e8;
  --accent-violet:  #a855f7;
  --accent-violet-dark: #7c3aed;

  --grad-title:     linear-gradient(90deg, #00d4e8, #a855f7);
  --grad-bg:        linear-gradient(135deg, rgba(0,200,220,0.05) 0%, rgba(120,60,220,0.06) 60%, transparent 100%);

  /* Typo */
  --font-sans:      'DM Sans', sans-serif;
  --font-mono:      'DM Mono', monospace;
  --font-display:   'Montserrat', sans-serif;
  --font-serif:     'Lora', serif;
}

/* MODE LIGHT */
[data-theme="light"] {
  --bg-base:        #f5f4f0;
  --bg-surface:     #ffffff;
  --bg-hover:       rgba(0, 180, 200, 0.04);
  --bg-note:        rgba(120, 60, 220, 0.04);

  --border-subtle:  rgba(0, 0, 0, 0.07);
  --border-mid:     rgba(0, 0, 0, 0.12);
  --border-strong:  rgba(0, 0, 0, 0.2);

  --text-primary:   #0d0f1a;
  --text-body:      #3a3f55;
  --text-muted:     #7080a0;
  --text-faint:     #a0aac0;
  --text-ghost:     #c0c8d8;

  --accent-cyan:    #0099b0;
  --accent-violet:  #7c3aed;
  --accent-violet-dark: #6028cc;

  --grad-title:     linear-gradient(90deg, #0099b0, #7c3aed);
  --grad-bg:        linear-gradient(135deg, rgba(0,180,200,0.04) 0%, rgba(120,60,220,0.04) 60%, transparent 100%);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--bg-base) !important;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Écrasement agressif des fonds blancs GeneratePress */
#page,
#content,
#primary,
#secondary,
.site-content,
.content-area,
.inside-site-container,
.site-main,
.entry,
.entry-content,
.entry-header,
.entry-footer,
.post,
article,
.widget-area,
.inside-article {
  background-color: transparent !important;
  background: transparent !important;
}

/* Fond dégradé ambiant fixe */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--grad-bg);
  pointer-events: none;
  z-index: 0;
}

#page { position: relative; z-index: 1; }

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-violet); }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   GOOGLE FONTS IMPORT
   ============================================================ */
/* À mettre dans functions.php via wp_enqueue_style — voir functions.php */

/* ============================================================
   HEADER
   ============================================================ */

.site-header,
#site-header {
  background: var(--bg-base) !important;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 !important;
}

.inside-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  max-width: 100%;
}

/* Logo */
.site-branding,
.site-logo,
#site-header .site-branding {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-title,
.main-title,
.site-title a,
.site-title a:visited,
.site-title a:hover,
.main-title a,
.main-title a:visited,
.main-title a:hover {
  font-family: var(--font-display) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  color: #40e8f8 !important;
  --contrast: #40e8f8 !important;
  background: none !important;
  -webkit-text-fill-color: #40e8f8 !important;
  text-decoration: none !important;
  letter-spacing: 0.01em;
  line-height: 1;
}

[data-theme="light"] .site-title,
[data-theme="light"] .main-title,
[data-theme="light"] .site-title a,
[data-theme="light"] .site-title a:visited,
[data-theme="light"] .site-title a:hover,
[data-theme="light"] .main-title a,
[data-theme="light"] .main-title a:visited,
[data-theme="light"] .main-title a:hover {
  color: #0077aa !important;
  --contrast: #0077aa !important;
  -webkit-text-fill-color: #0077aa !important;
}

.site-description {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin: 0;
}
.site-description::before { content: '> '; color: var(--text-faint); }

/* Navigation principale */
.main-navigation,
nav.main-navigation {
  background: transparent !important;
}

.main-navigation ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation ul li a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  text-decoration: none;
  transition: color 0.15s;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  color: var(--accent-cyan) !important;
}

/* Toggle dark/light dans le header */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 1.5rem;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ============================================================
   CONTENEUR GLOBAL
   ============================================================ */

.site-content,
#content,
.inside-site-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* GeneratePress utilise .content-area pour la colonne principale */
.content-area { width: 100%; }

/* ============================================================
   PAGE D'ACCUEIL — LISTE DES POSTS
   ============================================================ */

/* Post à la une (premier article) */
.page-template-default .post:first-of-type,
.home .post:first-of-type {
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  margin-bottom: 0;
}

/* Grille des articles suivants */
.home .posts-navigation,
.blog .posts-navigation { display: none; } /* on gère la pagination à part */

/* Article card générique */
.post {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.75rem 0;
  transition: background 0.15s;
}

/* Numéro d'article (injecté via JS) */
.post-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-ghost);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

/* Catégories */
.post .cat-links a,
.entry-meta .cat-links a {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 232, 0.25);
  padding: 3px 10px;
  margin-right: 0.4rem;
  text-decoration: none;
  transition: all 0.15s;
}
.post .cat-links a:hover {
  background: rgba(0, 212, 232, 0.08);
}

/* Date */
.post .posted-on,
.entry-meta .posted-on {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.post .posted-on a { color: var(--text-faint) !important; }

/* Titre du post */
.entry-title {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  line-height: 1.1;
  margin: 0.6rem 0 0.75rem;
}

.entry-title a {
  color: var(--text-primary) !important;
  text-decoration: none;
  transition: color 0.15s;
}
.entry-title a:hover { color: var(--accent-cyan) !important; }

/* Taille titre selon rang */
.home .post:first-of-type .entry-title { font-size: clamp(30px, 4vw, 46px); }
.home .post:not(:first-of-type) .entry-title { font-size: clamp(20px, 2.5vw, 26px); }

/* Extrait */
.entry-summary p,
.entry-content p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-body);
}

.entry-summary .more-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  border-bottom: 1px solid rgba(0, 212, 232, 0.3);
  padding-bottom: 1px;
  margin-top: 0.75rem;
  text-decoration: none;
}

/* Image mise en avant sur la home */
.post-thumbnail {
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.post-thumbnail img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  filter: brightness(0.85) saturate(0.9);
  transition: filter 0.3s;
}
.post:hover .post-thumbnail img { filter: brightness(1) saturate(1); }

/* Meta bas de post */
.entry-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

/* ============================================================
   PAGE ARTICLE SINGLE
   ============================================================ */

.single #content {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
  align-items: start;
}

/* Colonne principale */
.single .content-area {
  border-right: 1px solid var(--border-subtle);
  padding: 2.5rem 2rem 3rem 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.breadcrumb a,
.breadcrumb span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.breadcrumb a:hover { color: var(--accent-cyan); }
.breadcrumb .sep { color: var(--text-ghost); }

/* En-tête article */
.single .entry-header { margin-bottom: 1.75rem; }

.single .entry-meta {
  margin-bottom: 1.25rem;
}

.single .entry-title {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.08;
  color: var(--text-primary) !important;
  margin-bottom: 1.25rem;
}

/* Gradient sur première ligne du titre */
.single .entry-title span.grad {
  background: var(--grad-title);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Byline */
.article-byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}
.byline-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-title);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #0d0f1a;
  flex-shrink: 0;
}
.byline-info { display: flex; flex-direction: column; gap: 1px; }
.byline-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.byline-role {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}
.byline-read {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-ghost);
}

/* Corps de l'article */
.single .entry-content {
  max-width: 580px;
}

.single .entry-content p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-body);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.single .entry-content strong {
  color: var(--text-primary);
  font-weight: 400;
}

.single .entry-content h2 {
  font-family: var(--font-display) !important;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-cyan);
  line-height: 1.2;
}

.single .entry-content h3 {
  font-family: var(--font-display) !important;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 2rem 0 0.75rem;
  letter-spacing: 0.02em;
}

.single .entry-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 212, 232, 0.04);
  border-left: 2px solid rgba(0, 212, 232, 0.3);
  border-radius: 0;
}
.single .entry-content blockquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px !important;
  color: var(--text-muted) !important;
  margin: 0;
}

/* Note (classe .note sur un paragraphe) */
.single .entry-content p.note,
.wp-block-paragraph.note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  background: var(--bg-note);
  padding: 0.75rem 1rem;
  border: 1px solid rgba(120, 60, 220, 0.15);
  margin: 1.5rem 0;
}
.single .entry-content p.note::before { content: '// '; color: var(--accent-violet-dark); }

/* Image dans le contenu */
.single .entry-content figure { margin: 2rem 0; }
.single .entry-content figure img {
  width: 100%;
  filter: brightness(0.9) saturate(0.85);
}
.single .entry-content figcaption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 0.5rem;
  letter-spacing: 0.06em;
}

/* Tags en bas d'article */
.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.post-tags a {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border: 1px solid var(--border-mid);
  padding: 4px 10px;
  text-decoration: none;
  transition: all 0.15s;
}
.post-tags a:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Sidebar article */
.single .widget-area {
  padding: 2rem 0 2rem 1.5rem;
  position: sticky;
  top: 2rem;
}

/* Navigation post précédent / suivant */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border-subtle);
  margin: 0 -2rem;
}
.nav-previous,
.nav-next {
  padding: 1.5rem 2rem;
  transition: background 0.15s;
  border-right: 1px solid var(--border-subtle);
}
.nav-next { border-right: none; text-align: right; }
.nav-previous:hover,
.nav-next:hover { background: var(--bg-hover); }

.nav-previous .nav-subtitle,
.nav-next .nav-subtitle {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-ghost);
  margin-bottom: 0.5rem;
}
.nav-previous a,
.nav-next a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted) !important;
  text-decoration: none;
  line-height: 1.3;
  transition: color 0.15s;
}
.nav-previous:hover a,
.nav-next:hover a { color: var(--text-primary) !important; }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer,
#site-footer {
  background: var(--bg-base) !important;
  border-top: 1px solid var(--border-subtle);
  padding: 0 !important;
}

.inside-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 2rem;
  max-width: 100%;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  background: var(--grad-title);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-info,
.site-footer .site-info {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-ghost) !important;
  letter-spacing: 0.06em;
}
.site-info a { color: var(--text-ghost) !important; }
.site-info a:hover { color: var(--accent-cyan) !important; }

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  padding: 2rem 0;
}

.pagination .page-numbers {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  transition: all 0.15s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ============================================================
   SIDEBAR WIDGETS (article)
   ============================================================ */

.widget-title {
  font-family: var(--font-mono) !important;
  font-size: 9px !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}
.widget-title::before { content: '// '; color: var(--accent-violet-dark); }

.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(120, 180, 255, 0.05);
  font-size: 12px;
  color: var(--text-muted);
}
.widget ul li a {
  color: var(--text-muted) !important;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  transition: color 0.15s;
}
.widget ul li a:hover { color: var(--text-primary) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .single #content {
    grid-template-columns: 1fr;
  }
  .single .content-area {
    border-right: none;
    padding-right: 0;
  }
  .single .widget-area {
    padding-left: 0;
    border-top: 1px solid var(--border-subtle);
    position: static;
  }
  .inside-header {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }
  .main-navigation ul { gap: 1rem; }
  .post-navigation { margin: 0; }
}

@media (max-width: 600px) {
  .inside-header,
  .inside-footer { padding: 1rem; }
  .single .content-area { padding: 1.5rem 0; }
  .home .post:first-of-type .entry-title { font-size: 24px; }
  .post-navigation { grid-template-columns: 1fr; }
  .nav-previous { border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .nav-next { text-align: left; }
  .main-navigation ul { flex-wrap: wrap; }
}
