/* ============================================================
   Animothèque — Feuille de style principale
   ============================================================ */

:root {
  --primary:    #2E7D32;
  --primary-dk: #1B5E20;
  --accent:     #FF8F00;
  --bg:         #F5F5F0;
  --card:       #FFFFFF;
  --text:       #2C2C2C;
  --muted:      #666;
  --border:     #E0E0DC;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header double bande (Option A) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.site-logo:hover { opacity: .9; }
.site-name {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.25);
  white-space: nowrap;
}
.header-top {
  background: #1B5E20;
  padding: .2rem max(1.5rem, calc((100% - 1300px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo-img {
  height: 88px;
  width: auto;
  max-width: 220px;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.3));
}
.header-cta {
  display: flex;
  gap: .6rem;
  align-items: center;
}
.btn-cta {
  background: #FFD54F;
  color: #1B5E20;
  font-weight: 700;
  padding: .4rem 1rem;
  border-radius: 20px;
  font-size: .9rem;
  text-decoration: none;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}
.btn-cta:hover { background: #FFCA28; transform: translateY(-1px); text-decoration: none; }
.site-nav {
  background: #2E7D32;
  padding: .45rem max(1.5rem, calc((100% - 1300px) / 2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .1rem;
}
.nav-races, .nav-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.nav-sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,.35);
  margin: 0 .5rem;
  flex-shrink: 0;
}
.site-nav a {
  color: #fff;
  padding: .3rem .7rem;
  font-size: .92rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background .15s;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.site-nav a:hover { background: rgba(255,255,255,.18); color: #fff; text-decoration: none; }
.nav-mobile-cta { display: none; }

/* ── Hamburger mobile ── */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 6px;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: .2rem .6rem;
  line-height: 1.4;
}
@media (max-width: 768px) {
  /* ── Header top bar ── */
  .site-header { display: block; }
  .header-top {
    display: flex;
    align-items: center;
    padding: .25rem 1rem;
    position: relative;
    min-height: 66px;
  }
  .site-logo { flex: 1; min-width: 0; padding-right: 3rem; gap: .5rem; }
  .logo-img { height: 54px; max-width: 54px; flex-shrink: 0; }
  .site-name { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ── Cache les boutons CTA dans la barre ── */
  .header-cta { display: none !important; }

  /* ── Hamburger ── */
  .nav-toggle {
    display: block;
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
  }

  /* ── Nav (barre verte basse) cachée par défaut ── */
  .site-nav {
    display: none !important;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    background: #1B5E20;
    padding: .5rem 1rem 1rem;
    gap: 0;
  }
  .site-nav.open { display: flex !important; }
  .nav-races, .nav-content { flex-direction: column; align-items: flex-start; width: 100%; }
  .nav-sep { width: 100%; height: 1px; margin: .4rem 0; }
  .nav-mobile-cta { display: block; }
  .site-nav a {
    padding: .6rem 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
    font-size: 1rem;
    width: 100%;
    border-radius: 0;
  }
  .site-nav a:last-child { border-bottom: none; }
}

/* ── Breadcrumb ── */
.breadcrumb {
  padding: .6rem 1.5rem;
  font-size: .85rem;
  color: var(--muted);
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 .35rem; }

/* ── Main container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.2rem; }

/* ── Hero race ── */
.race-hero {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 700px) {
  .race-hero { grid-template-columns: 1fr; }
}
.race-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  background: #EEF0EC;
}
.race-photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 8px;
  background: linear-gradient(135deg,#E8F5E9,#C8E6C9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.race-title { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: .3rem; }
.race-scientific { font-style: italic; color: var(--muted); margin-bottom: .8rem; font-size: .95rem; }
.race-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.badge {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
}
.badge-type  { background: #E8F5E9; color: #2E7D32; }
.badge-pays  { background: #FFF8E1; color: #E65100; }
.badge-annee { background: #E3F2FD; color: #1565C0; }

/* ── Quick stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: .5rem;
    justify-items: center;
  }
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  display: block;
  border: 2px solid transparent;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  border-color: var(--primary);
  text-decoration: none;
}
.stat-value { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: .78rem; color: var(--muted); margin-top: .2rem; text-transform: uppercase; letter-spacing: .04em; }

/* ── Sections ── */
.section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dk);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ── Scores ── */
.scores-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media(max-width:600px){ .scores-grid { grid-template-columns: 1fr; } }
.score-item { display: flex; align-items: center; gap: .6rem; }
.score-label { font-size: .85rem; min-width: 130px; color: var(--text); }
.score-track { flex: 1; background: #E8F5E9; border-radius: 4px; height: 10px; overflow: hidden; }
.score-fill  { height: 100%; border-radius: 4px; transition: width .4s; }
.score-value { font-size: .8rem; font-weight: 600; min-width: 32px; text-align: right; color: var(--muted); }

/* ── Portrait tabs ── */
.portrait-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.portrait-tab {
  padding: .4rem 1rem;
  border-radius: 20px;
  font-size: .85rem;
  cursor: pointer;
  background: #E8F5E9;
  color: var(--primary);
  border: none;
  font-weight: 600;
  transition: background .2s;
}
.portrait-tab.active, .portrait-tab:hover {
  background: var(--primary);
  color: #fff;
}
.portrait-content { display: none; }
.portrait-content.active { display: block; }
.portrait-content p { margin-bottom: .8rem; }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border); padding: .8rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.faq-question::after { content: '▾'; font-size: 1.1rem; color: var(--primary); }
.faq-question.open::after { content: '▴'; }
.faq-answer { display: none; margin-top: .5rem; color: var(--muted); font-size: .95rem; }
.faq-answer.open { display: block; }

/* ── Maladies ── */
.disease-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.disease-tag {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFE0B2;
  border-radius: 4px;
  padding: .3rem .7rem;
  font-size: .82rem;
}

/* ── Pills de filtre (Toutes / Chiens / Chats / NAC) ── */
.filter-chips {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}
@media (max-width: 600px) {
  .filter-chips { gap: .4rem; }
  .filter-chips > a {
    flex: 1 1 calc(50% - .2rem);
    justify-content: center;
    text-align: center;
  }
}

/* ── Liste races ── */
.search-bar {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.2rem;
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  align-items: center;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: .6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--primary); }
.filter-select {
  padding: .6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .9rem;
  outline: none;
  background: #fff;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--primary); }
.result-count { font-size: .85rem; color: var(--muted); }

.breeds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.breed-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.breed-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  text-decoration: none;
}
.breed-card-img {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: linear-gradient(135deg,#E8F5E9,#C8E6C9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.breed-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.breed-card-body { padding: .8rem 1rem; }
.breed-card-name { font-weight: 700; font-size: 1rem; margin-bottom: .2rem; }
.breed-card-meta { font-size: .78rem; color: var(--muted); display: flex; gap: .6rem; }

/* ── Hero index ── */
/* ── Hero simple (races.php etc.) ── */
.index-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1B5E20 100%);
  color: #fff;
  padding: 1.2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.2rem;
}
.index-hero h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.index-hero p  { font-size: 1rem; opacity: .85; margin-bottom: 0; }

/* ── Hero splitté homepage ── */
.homepage-hero {
  background: #fff;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.2rem;
}
.homepage-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1100px;
  margin: 0 auto;
  /* overflow: hidden retiré — cachait le dropdown de recherche */
}
.hero-left {
  padding: 1rem 1.5rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: .5rem;
}
.hero-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.homepage-hero h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin: 0;
}
.homepage-hero p {
  font-size: .9rem;
  color: var(--muted);
  margin: 0;
}
.hero-right {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1rem 1.5rem;
}
.hero-right-intro {
  font-size: .85rem;
  color: var(--primary-dk);
  font-weight: 500;
  text-align: center;
  margin: 0;
}
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}
.animal-pill {
  background: rgba(255,255,255,.75);
  border-radius: 30px;
  padding: .4rem 1rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--primary-dk);
  text-decoration: none;
  transition: background .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.animal-pill:hover {
  background: #fff;
  transform: scale(1.04);
}
.pill-count {
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: .1rem .45rem;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.4;
}
@media (max-width: 720px) {
  .homepage-hero {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%) !important;
    border-bottom: none !important;
  }
  .homepage-hero-inner {
    grid-template-columns: 1fr !important;
  }
  .hero-right {
    display: flex !important;
    background: rgba(0,0,0,.15) !important;
    padding: .75rem 1.2rem 1.2rem !important;
    gap: .5rem !important;
  }
  .hero-right-intro {
    color: rgba(255,255,255,.8) !important;
    font-size: .78rem !important;
  }
  .animal-pill {
    background: rgba(255,255,255,.2) !important;
    color: #fff !important;
    font-size: .78rem !important;
    padding: .3rem .75rem !important;
  }
  .animal-pill:hover {
    background: rgba(255,255,255,.35) !important;
  }
  .pill-count {
    background: rgba(255,255,255,.3) !important;
    color: #fff !important;
  }
  .hero-left {
    padding: 1.4rem 1.2rem !important;
    color: #fff !important;
    align-items: center !important;
    text-align: center !important;
    max-width: 100% !important;
  }
  .hero-eyebrow {
    color: rgba(255,255,255,.8) !important;
  }
  .homepage-hero h1 {
    font-size: 1.35rem !important;
    color: #fff !important;
  }
  .homepage-hero p {
    color: rgba(255,255,255,.85) !important;
  }
  .hero-search {
    border: 2px solid rgba(255,255,255,.4) !important;
    box-shadow: none !important;
  }
  .hero-search button {
    background: rgba(255,255,255,.2) !important;
  }
}

/* ── Footer enrichi ── */
.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,.85);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  max-width: 1100px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
}
.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .5rem;
}
.footer-tagline {
  font-size: .85rem;
  opacity: .6;
  line-height: 1.6;
}
.footer-social {
  display: flex;
  gap: .6rem;
  margin-top: 1rem;
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.75);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.social-icon:hover {
  background: rgba(255,255,255,.25);
  color: #fff;
}
.footer-col-title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .5;
  margin-bottom: .8rem;
  font-weight: 700;
  color: #fff;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .88rem;
  margin-bottom: .5rem;
  transition: color .15s;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.2rem;
  text-align: center;
  font-size: .78rem;
  opacity: .45;
  max-width: 1100px;
  margin: 0 auto;
  color: #fff;
}
@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .footer-brand-col { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Pagination ── */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.page-btn {
  padding: .4rem .8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-size: .9rem;
  color: var(--primary);
  transition: background .15s;
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Badges réglementation (NAC + chiens) ── */
.detention-badge {
  display: inline-flex;
  flex-direction: column;
  gap: .2rem;
  padding: .5rem 1rem;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .8rem;
  border: 2px solid transparent;
}
.detention-libre {
  background: #E8F5E9;
  color: #2E7D32;
  border-color: #A5D6A7;
}
.detention-reglementee {
  background: #FFF3E0;
  color: #E65100;
  border-color: #FFCC80;
}
.detention-interdite {
  background: #FFEBEE;
  color: #B71C1C;
  border-color: #EF9A9A;
}
.detention-detail {
  font-size: .75rem;
  font-weight: 400;
  color: #555;
  display: block;
  margin-top: .15rem;
}

/* ── Pastille réglementation sur les cartes de liste ── */
.reg-dot-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .4rem;
}
.reg-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.reg-dot--green  { background: #43A047; }
.reg-dot--orange { background: #FB8C00; }
.reg-dot--red    { background: #E53935; }
.reg-dot-label {
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.2;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .index-hero h1 { font-size: 1.6rem; }
  .breeds-grid { grid-template-columns: repeat(2,1fr); }
  .race-title { font-size: 1.5rem; }

  .stat-card {
    padding: .6rem .4rem;
    width: 100%;
  }
  .stat-value {
    font-size: 1.1rem;
  }
  .stat-label {
    font-size: .62rem;
    letter-spacing: 0;
  }

}

/* ── Cards de contenu (articles / guides / comparatifs) ── */
.content-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.content-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-2px); text-decoration: none; }
.content-card-img {
  width: 100%;
  height: 72px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.content-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.content-card-body { padding: 1rem; flex: 1; }
.content-card-cat { font-size: .75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
.content-card-title { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.35; margin-bottom: .4rem; }
.content-card-resume { font-size: .83rem; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.content-card-meta { padding: .6rem 1rem; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); display: flex; gap: .6rem; align-items: center; }

/* ── Mobile : listings (articles / guides / comparatifs) ── */
@media (max-width: 600px) {
  .listing-grid { grid-template-columns: 1fr !important; gap: .8rem; }
  .content-card-img { height: 120px; font-size: 2.5rem; }
  .content-card-body { padding: .85rem; }
  .content-card-title { font-size: .95rem; }
}
}

/* ══════════════════════════════════════════════════════════════
   COMMENTAIRES / TÉMOIGNAGES
══════════════════════════════════════════════════════════════ */
.comments-wrapper { padding: 2rem 0 3rem; }
.comments-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; display: flex; align-items: center; gap: .5rem; color: var(--text); }
.comments-badge { background: var(--primary); color: #fff; border-radius: 20px; padding: .1rem .65rem; font-size: .82rem; font-weight: 700; }

/* Liste des commentaires */
.comments-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.comment-item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.4rem; }
.comment-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.comment-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.reply-avatar { background: #607D8B; width: 30px; height: 30px; font-size: .85rem; }
.comment-author { font-weight: 700; font-size: .93rem; display: block; }
.comment-date { font-size: .76rem; color: var(--muted); display: block; }
.comment-body { font-size: .92rem; line-height: 1.65; color: var(--text); }
.reply-toggle { background: none; border: none; color: var(--primary); font-size: .82rem; cursor: pointer; padding: .5rem 0 0; font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.reply-toggle:hover { text-decoration: underline; }

/* Réponses */
.replies-list { margin-top: 1rem; padding-left: 1rem; border-left: 3px solid var(--border); display: flex; flex-direction: column; gap: .75rem; }
.comment-reply { background: #f7f9f7; padding: .9rem 1rem; border-radius: 8px; box-shadow: none; }
.reply-to { font-size: .76rem; color: var(--muted); margin-bottom: .35rem; }

/* Formulaire de réponse inline */
.reply-form-wrap { margin-top: 1rem; display: none; }
.reply-form-wrap.open { display: block; }
.reply-form-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; font-weight: 600; font-size: .9rem; }
.reply-cancel { background: none; border: none; cursor: pointer; color: var(--muted); font-size: .85rem; padding: 0; }
.reply-cancel:hover { color: var(--text); }

/* Formulaire principal */
.comment-form-wrap {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.8rem;
  margin-top: .5rem;
}
.comment-form-wrap h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1.2rem; color: var(--text); }
.comment-form { display: flex; flex-direction: column; gap: 1rem; }
.comment-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-group { display: flex; flex-direction: column; gap: .3rem; }
.field-group label { font-size: .83rem; font-weight: 600; color: var(--text); }
.field-group label small { font-weight: 400; color: var(--muted); margin-left: .25rem; }
.field-group input,
.field-group textarea {
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .93rem;
  font-family: inherit;
  background: #fafafa;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  box-sizing: border-box;
}
.field-group input:focus,
.field-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(76,175,80,.12); }
.field-group textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.comment-legal { font-size: .78rem; color: var(--muted); margin: 0; }
.comment-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .8rem 1.8rem;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  transition: background .15s, transform .1s;
}
.comment-submit:hover { background: #388E3C; transform: translateY(-1px); }

/* Formulaire de réponse (même style, compact) */
.reply-form-wrap .field-group input,
.reply-form-wrap .field-group textarea { font-size: .88rem; padding: .55rem .8rem; background: #fff; }
.reply-form-wrap .comment-submit { padding: .6rem 1.2rem; font-size: .88rem; }

/* Notifications */
.comment-notice { padding: .75rem 1rem; border-radius: 8px; font-size: .88rem; }
.comment-notice.ok { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.comment-notice.err { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }

/* ── Mobile : commentaires ── */
@media (max-width: 640px) {
  .comment-fields-row { grid-template-columns: 1fr; }
  .comment-form-wrap { padding: 1.1rem 1rem; }
  .comment-item { padding: 1rem; }
  .comment-submit { width: 100%; text-align: center; align-self: stretch; }
  .replies-list { padding-left: .5rem; }
  .comments-title { font-size: 1.2rem; }
}

/* ── Utilitaires ── */
.text-muted { color: var(--muted); }
.mt-1 { margin-top: .5rem; }
.hidden { display: none; }

/* ══ Section commentaires ════════════════════════════════════ */
.comments-wrapper {
  margin-top: 0;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  border-top: 2px solid var(--border);
}
.comments-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.comments-badge {
  background: var(--primary);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 12px;
}
.comments-empty {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2rem;
}
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.comment-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.4rem;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: .75rem;
}
.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.comment-author {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
}
.comment-date {
  font-size: .8rem;
  color: var(--muted);
  margin-left: .4rem;
}
.comment-body {
  color: var(--text);
  line-height: 1.7;
  font-size: .93rem;
}
/* Formulaire */
.comment-form-wrap {
  background: var(--card)
}

/* ============================================================
   Autocomplete dropdown (races.php)
   ============================================================ */
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 200;
  max-height: 420px;
  overflow-y: auto;
}
.search-dropdown.open { display: block; }

.sd-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .9rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.sd-item:last-child { border-bottom: none; }
.sd-item:hover { background: var(--bg); }

.sd-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.sd-thumb-emoji {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.sd-name {
  font-weight: 600;
  font-size: .92rem;
  color: var(--text);
}
.sd-meta {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .1rem;
}
.sd-footer {
  display: block;
  padding: .55rem .9rem;
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  background: var(--bg);
  border-radius: 0 0 10px 10px;
}
.sd-footer:hover { text-decoration: underline; }
.sd-empty {
  padding: .8rem .9rem;
  color: var(--muted);
  font-size: .88rem;
  text-align: center;
}
