/* =============================================
   CanisTerra — Fiche Race
   Palette : #6B4226 #3B5323 #C8A97E #F5F0E8 #2C2C2C
   ============================================= */

/* Import typos */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=Source+Serif+4:wght@400;600&family=Inter:wght@400;500&display=swap');

/* Base */
body {
  background-color: #F5F0E8;
  color: #2C2C2C;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
}

/* Conteneur principal */
.canisterra-race {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* Titre H1 */
.race-title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #6B4226;
  margin: 40px 0 8px;
  line-height: 1.2;
}

/* Sections */
.race-section {
  margin: 48px 0;
  padding-bottom: 48px;
  border-bottom: 1px solid #C8A97E55;
}

.race-section:last-child {
  border-bottom: none;
}

/* Titres H2 */
.race-section h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 600;
  color: #3B5323;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #C8A97E;
}

/* Paragraphes */
.race-section p {
  margin: 0 0 1.2em;
}

/* Blockquote "À savoir" */
.race-section blockquote {
  background: #fff;
  border-left: 4px solid #6B4226;
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
  font-size: 0.95em;
  color: #444;
}

.race-section blockquote strong {
  color: #6B4226;
}

/* Tableau fiche identité */
.race-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

.race-table th,
.race-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #C8A97E44;
}

.race-table th {
  width: 50%;
  color: #6B4226;
  font-weight: 500;
  background: #F5F0E8;
}

.race-table td {
  background: #fff;
  letter-spacing: 0.05em;
}

.race-table tr:last-child th,
.race-table tr:last-child td {
  border-bottom: none;
}

/* Scores ●○ */
.race-table td {
  font-size: 1rem;
  color: #3B5323;
}

/* Gras dans les sections */
.race-section strong {
  color: #6B4226;
}

/* Liens */
.race-section a {
  color: #3B5323;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.race-section a:hover {
  color: #6B4226;
}

/* Sources officielles */
.race-sources ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.race-sources ul li a {
  display: inline-block;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #C8A97E;
  border-radius: 4px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #3B5323;
  transition: background 0.2s, color 0.2s;
}

.race-sources ul li a:hover {
  background: #3B5323;
  color: #fff;
}

/* Équipement affilié */
.race-produits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.race-produit {
  background: #fff;
  border: 1px solid #C8A97E55;
  border-radius: 8px;
  padding: 18px;
}

.race-produit strong {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #2C2C2C;
  margin-bottom: 4px;
}

.produit-categorie {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: #6B4226;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.race-produit p {
  font-size: 0.9rem;
  color: #555;
  margin: 8px 0 12px;
  line-height: 1.5;
}

.btn-affiliation {
  display: inline-block;
  padding: 8px 16px;
  background: #3B5323;
  color: #fff !important;
  text-decoration: none !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-affiliation:hover {
  background: #6B4226;
}

/* Mobile */
@media (max-width: 640px) {
  .canisterra-race {
    padding: 0 16px 40px;
  }

  .race-table th,
  .race-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .race-table th {
    border-bottom: none;
    padding-bottom: 4px;
  }

  .race-table td {
    padding-top: 4px;
    margin-bottom: 8px;
    border-bottom: 1px solid #C8A97E44;
  }

  .race-produits {
    grid-template-columns: 1fr;
  }

  .race-sources ul {
    flex-direction: column;
  }
}

/* ---- Image à la une ---- */
.race-featured-image {
  margin: 0 0 8px;
}

.race-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.race-photo-credit {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #999;
  text-align: right;
  margin: 6px 0 0;
  padding: 0 4px;
}

.race-photo-credit a {
  color: #999;
  text-decoration: none;
}

.race-photo-credit a:hover {
  color: #6B4226;
}

/* ---- Image contenu ---- */
.race-inline-img {
  margin: 0 0 28px;
  border-radius: 6px;
  overflow: hidden;
}

.race-content-img {
  width: 100%;
  height: auto;
  display: block;
}


/* Bouton Club de race sans lien */
.race-sources ul li span.sources-club-vide {
  display: inline-block;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #C8A97E;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #3B5323;
  opacity: 0.55;
  cursor: default;
}
