/* Variables globales */
:root {
  --primary-color: #2b5797;
  --secondary-color: #e63946;
  --background-color: #f8f9fa;
  --text-color: #333;
  --link-color: #0366d6;
  --border-color: #e0e0e0;
  --amazon-color: #FF9900;
  --amazon-hover: #e68a00;
}

/* Styles de base */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

/* Reset pour les images et éléments de base */
img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

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

/* Typographie */
h1, h2, h3, h4, h5, h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #222;
}

h1 {
  font-size: 2.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 1.8rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.3rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Layout principal */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.main__content {
  width: 100%;
}

/* Boutons et éléments interactifs */
.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: #1e4479;
}

.amazon-button {
  display: inline-block;
  background-color: var(--amazon-color);
  color: black;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.2s;
}

.amazon-button:hover {
  background-color: var(--amazon-hover);
  text-decoration: none;
}

.amazon-button-small {
  display: inline-block;
  background-color: var(--amazon-color);
  color: black;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.amazon-button-small:hover {
  background-color: var(--amazon-hover);
  text-decoration: none;
}

/* Formulaires */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  margin-top: 3rem;
  background-color: var(--background-color);
  border-top: 1px solid var(--border-color);
}

.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer__link {
  margin-right: 1.5rem;
  color: var(--link-color);
}

.footer__copyright {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Page d'accueil */
.home-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.category-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.category-image {
  height: 180px;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary-color);
}

.category-content {
  padding: 1.5rem;
}

.category-content h3 {
  margin-top: 0;
  font-size: 1.4rem;
}

/* Produits - Styles communs */
.product-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.product-price {
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.product-description {
  color: #555;
  margin-bottom: 1.5rem;
}

/* IMPORTANT : Reset spécifique pour les images de produit - avec priorité maximale */
.product-card .product-image,
.product-card .product-image a,
.product-card .product-image a img {
  display: block !important;
  max-width: 100% !important;
  width: auto !important;
}

.product-card .product-image {
  height: 200px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  text-align: center !important;
  margin-bottom: 15px !important;
}

.product-card .product-image a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
}

.product-card .product-image a img {
  max-height: 180px !important;
  height: auto !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  margin: 0 auto !important;
}

.product-image-placeholder {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: 100%;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: background-color 0.2s;
}

.product-image-placeholder:hover {
  background-color: #e9ecef;
}

.product-icon {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.view-on-amazon {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

/* Cartes produit - Liste des produits */
.product-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
  transition: box-shadow 0.3s ease;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
}

.product-card:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Cartes produit - Version petite */
.product-card-small {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  transition: box-shadow 0.3s ease;
}

.product-card-small:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Pages produits détaillées */
.product-page .post__title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.product-brand {
  font-weight: bold;
  color: #555;
  margin-right: 1rem;
}

.product-rating {
  color: var(--amazon-color);
  margin-right: 1rem;
}

.post-updated {
  font-size: 0.8rem;
  color: #777;
}

.toc {
  background-color: var(--background-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.toc__title {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.related-products {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Amazon disclaimer */
.amazon-disclaimer {
  background-color: var(--background-color);
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #666;
  margin-top: 3rem;
}

/* Blog */
.blog-post {
  margin-bottom: 3rem;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.blog-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.blog-card h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

.blog-meta {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 1rem;
}

.blog-excerpt {
  color: #555;
}

.read-more {
  display: inline-block;
  font-weight: bold;
  margin-top: 1rem;
  color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .product-card {
    grid-template-columns: 1fr;
  }
  
  .product-image {
    margin-bottom: 1.5rem;
  }
  
  .home-categories,
  .blog-list {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}