/* =========================================================
   VIOLENCES FAITES AUX FEMMES ÂGÉES — Style global
   Pour pages secondaires (tags, mois, recherche, à propos…)
   La page d'accueil et article.html utilisent en plus home.css et article.css
   Palette : rouge bordeaux + ocre + vert
   ========================================================= */

:root {
  /* Palette bordeaux/ocre/vert (cohérence avec home.css) */
  --rouge: #8B2635;
  --rouge-clair: #f5eaec;
  --rouge-medium: #c9636f;
  --ocre: #C47C3E;
  --ocre-clair: #fdf5ec;
  --vert: #2E6B5E;
  --vert-clair: #e8f3f0;
  --gris-fonce: #1a1a1a;
  --gris-moyen: #555;
  --gris-clair: #e8e6e1;
  --gris-fin: #f4f2ef;
  --blanc: #fafaf8;

  /* Alias pour compatibilité avec l'ancien code */
  --ink: #1a1a1a;
  --ink-soft: #333;
  --ink-muted: #555;
  --ink-faint: #888;
  --bg: #fafaf8;
  --bg-soft: #f4f2ef;
  --bg-muted: #e8e6e1;
  --accent: #8B2635;
  --accent-dark: #6e1d2a;
  --accent-soft: #f5eaec;
  --accent-pale: #faf3f4;
  --urgent: #8B2635;
  --urgent-soft: #f5eaec;
  --border: #e8e6e1;
  --border-soft: #f4f2ef;

  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-w: 760px;
  --max-w-wide: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--rouge); text-decoration: none; transition: color .2s; }
a:hover { color: var(--rouge-medium); text-decoration: underline; text-underline-offset: 3px; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--gris-fonce);
  line-height: 1.25;
  margin-bottom: 1rem;
}
h1 { font-size: 2rem; margin-top: 0; margin-bottom: 1rem; }
h2 { font-size: 1.4rem; margin-top: 2.5rem; }
h3 { font-size: 1.1rem; margin-top: 1.5rem; }

p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; }

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */
.site-header {
  border-bottom: 1px solid var(--gris-clair);
  background: var(--blanc);
  padding: 0;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 1.25rem;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-title a {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--gris-fonce);
  text-decoration: none;
  line-height: 1.2;
}
.site-title a:hover { color: var(--rouge); text-decoration: none; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-wrap: wrap;
  list-style: none;
}
.main-nav > li { list-style: none; position: relative; }
.main-nav > li > a, .main-nav > li > button {
  font-size: 13px;
  color: var(--gris-moyen);
  text-decoration: none;
  font-family: var(--sans);
  padding: 0;
  background: none;
  border: none;
}
.main-nav > li > a:hover,
.main-nav > li > button:hover {
  color: var(--rouge);
}
.main-nav .dropdown-toggle::after {
  content: ' ▾';
  font-size: 10px;
}
.main-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--blanc);
  border: 1px solid var(--gris-clair);
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
  padding: .5rem 0;
  display: none;
  list-style: none;
  z-index: 50;
}
.main-nav li:hover .dropdown-menu,
.main-nav .dropdown-menu.open { display: block; }
.main-nav .dropdown-menu a {
  display: block;
  padding: .4rem 1rem;
  font-size: 13px;
  color: var(--gris-fonce);
  text-decoration: none;
}
.main-nav .dropdown-menu a:hover {
  background: var(--gris-fin);
  color: var(--rouge);
}
.menu-toggle { display: none; padding: .5rem; }
.menu-toggle svg { width: 22px; height: 22px; stroke: var(--gris-fonce); }

/* =========================================================
   MAIN CONTENT
   ========================================================= */
main {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--gris-moyen);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 12px;
  color: var(--gris-moyen);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.breadcrumb ol { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb li:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: var(--gris-clair);
}
.breadcrumb a { color: var(--gris-moyen); text-decoration: none; }
.breadcrumb a:hover { color: var(--rouge); text-decoration: none; }
.breadcrumb li:last-child { color: var(--gris-fonce); }

/* =========================================================
   LISTE D'ARTICLES (utilisée par tags, mois, recherche)
   ========================================================= */
.article-list { list-style: none; }
.article-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gris-clair);
}
.article-list li:last-child { border-bottom: none; }
.article-list .article-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--gris-fonce);
  display: block;
  margin-bottom: .35rem;
  text-decoration: none;
  line-height: 1.35;
}
.article-list .article-title:hover {
  color: var(--rouge);
  text-decoration: none;
}
.article-list .article-desc {
  display: block;
  font-size: 14px;
  color: var(--gris-moyen);
  margin-bottom: .35rem;
}
.article-list .article-meta {
  font-size: 12px;
  color: var(--gris-moyen);
  margin-right: 8px;
}
.article-list .article-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: .35rem;
}
.article-list .article-tags a {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--gris-fin);
  color: var(--gris-fonce);
  border: 1px solid var(--gris-clair);
  text-decoration: none;
}
.article-list .article-tags a:hover {
  background: var(--rouge-clair);
  border-color: var(--rouge-medium);
  color: var(--rouge);
}

/* Archives par mois */
.month-block { margin-bottom: 2.5rem; }
.month-block h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: .5rem;
}

/* Liste des mois précédents */
.previous-months {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.previous-months li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dotted var(--gris-clair);
}
.previous-months a {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gris-fonce);
  text-decoration: none;
}
.previous-months a:hover { color: var(--rouge); }
.previous-months .count {
  font-size: 12px;
  color: var(--gris-moyen);
}

/* =========================================================
   LISTE DES TAGS / SUJETS
   ========================================================= */
.tags-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0;
}
.tags-list li { list-style: none; }
.tags-list a {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gris-fin);
  border: 1px solid var(--gris-clair);
  font-size: 13px;
  color: var(--gris-fonce);
  text-decoration: none;
}
.tags-list a:hover {
  background: var(--rouge-clair);
  border-color: var(--rouge-medium);
  color: var(--rouge);
}
.tags-list .count {
  color: var(--gris-moyen);
  font-size: 11px;
  margin-left: 4px;
}

/* =========================================================
   BLOC NEWSLETTER (page newsletter)
   ========================================================= */
.newsletter-block {
  background: var(--vert-clair);
  border-left: 4px solid var(--vert);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.newsletter-block h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--vert);
  margin-top: 0;
  margin-bottom: .5rem;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin-top: 1rem;
}
.newsletter-form input[type=email] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--gris-clair);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
}
.newsletter-form input[type=email]:focus { outline: none; border-color: var(--vert); }
.newsletter-form button {
  padding: 10px 18px;
  background: var(--vert);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.newsletter-form button:hover { background: #244e44; }
.newsletter-success, .newsletter-error {
  display: none;
  padding: .75rem 1rem;
  margin-top: .75rem;
  font-size: 14px;
}
.newsletter-success.show {
  display: block;
  background: var(--vert-clair);
  color: var(--vert);
  border-left: 3px solid var(--vert);
}
.newsletter-error.show {
  display: block;
  background: var(--rouge-clair);
  color: var(--rouge);
  border-left: 3px solid var(--rouge);
}
.newsletter-disclaimer {
  font-size: 12px;
  color: var(--gris-moyen);
  margin-top: .75rem;
  font-style: italic;
}

/* =========================================================
   FORMULAIRE DE RECHERCHE (page recherche.html)
   ========================================================= */
.search-form {
  display: flex;
  gap: 8px;
  margin: 1.5rem 0;
}
.search-form input[type=text] {
  flex: 1;
  padding: .8rem 1rem;
  border: 1.5px solid var(--gris-clair);
  background: var(--gris-fin);
  font-family: inherit;
  font-size: 1rem;
}
.search-form input[type=text]:focus { outline: none; border-color: var(--rouge); }
.search-form button {
  padding: .8rem 1.5rem;
  background: var(--rouge);
  color: #fff;
  font-weight: 600;
}
.search-form button:hover { background: var(--rouge-medium); }

.search-results-info {
  color: var(--gris-moyen);
  font-size: .95rem;
  margin: 1rem 0;
  font-style: italic;
}
.search-empty {
  padding: 2rem;
  text-align: center;
  background: var(--gris-fin);
  border: 1px dashed var(--gris-clair);
  color: var(--gris-moyen);
}

/* Highlight des termes recherchés */
mark {
  background: #fff3b3;
  color: inherit;
  padding: 0 .15em;
}

/* =========================================================
   BANDEAU URGENCES (numéros d'aide)
   ========================================================= */
.emergency-bar {
  background: var(--rouge-clair);
  border-left: 4px solid var(--rouge);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.emergency-bar strong {
  color: var(--rouge);
  display: block;
  margin-bottom: .75rem;
  font-family: var(--serif);
  font-size: 1.05rem;
}
.emergency-numbers {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.emergency-numbers a {
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: .75rem 1rem;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--rouge);
  border: 1px solid var(--rouge-medium);
  min-width: 100px;
}
.emergency-numbers a:hover {
  background: var(--rouge);
  color: #fff;
  border-color: var(--rouge);
}
.emergency-numbers a small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  color: var(--gris-moyen);
  margin-top: 2px;
}
.emergency-numbers a:hover small { color: rgba(255,255,255,.9); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--gris-clair);
  background: var(--gris-fin);
  padding: 2rem 1.25rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 13px;
}
.footer-inner a {
  color: var(--gris-moyen);
  text-decoration: none;
}
.footer-inner a:hover { color: var(--rouge); }
.footer-copy {
  margin-left: auto;
  color: var(--gris-moyen);
  font-size: 12px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 700px) {
  main { padding: 1.5rem 1rem; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.25rem; }

  .menu-toggle { display: block; margin-left: auto; }
  .main-nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--gris-clair);
    margin-top: 8px;
    display: none;
  }
  .main-nav.open { display: flex; }

  .emergency-numbers { flex-direction: column; }
  .emergency-numbers a { width: 100%; }

  .footer-copy { margin-left: 0; width: 100%; }
}
