/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f0f2f5; /* Light gray background for the page */
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.8em;
  line-height: 1.3;
  color: #1c1e21; /* Darker text for headings */
}

h1 { font-size: 2.2em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.4em; }

p {
  margin-bottom: 1em;
}

a {
  color: #007bff; /* Standard link color */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.responsive-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}


/* Header */
.site-header {
  /* background-color: #162f35; */ /* Commenté ou supprimé car l'image sera le fond principal */
  color: #ffffff;
  padding: 20px; /* Augmenter un peu le padding pour mieux voir l'image si nécessaire */
  border-bottom: 3px solid #0e1c20;
  background-image: url('Files/Image/ladybugs-insect.jpeg'); /* VOTRE IMAGE ICI */
  background-size: cover; /* S'assure que l'image couvre toute la zone, peut la rogner */
  background-position: center center; /* Centre l'image */
  background-repeat: no-repeat;
  position: relative; /* Nécessaire pour le positionnement de la surcouche ::before */
  min-height: 280px; /* S'assurer que l'en-tête est au moins aussi haut que l'annonce */
}

/* Surcouche pour améliorer la lisibilité sur l'image de fond */
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5); /* Noir semi-transparent. Ajustez l'opacité (0.0 à 1.0) */
  z-index: 1; /* La surcouche est au-dessus de l'image de fond */
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative; /* S'assure que le contenu est au-dessus de la surcouche ::before */
  z-index: 2; /* Le contenu est au-dessus de la surcouche */
}

.site-title-container {
  display: flex;
  align-items: center;

  text-shadow: 1px 1px 3px rgba(0,0,0,0.7); 
}



.header-ad {
  width: 336px;
  height: 280px;
  /* background-color: #f0f0f0; */ /* Peut être rendu transparent ou semi-transparent si désiré */
  /* border: 1px dashed #ccc; */ /* Peut être enlevé pour un look plus intégré */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.1); /* Léger fond pour l'annonce pour la distinguer, optionnel */
  border-radius: 5px; /* Optionnel */
}

.site-logo-char {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 24px; /* Match original P */
  color: rgb(191, 191, 191);
  border: 1px solid #bfbfbf;
  padding: 10px 20px;
  border-radius: 30px;
  background-color: #000;
  margin-right: 15px;
}
.site-main-title {
  font-size: 1.8em; /* Adjusted for header */
  color: #ffffff;
  margin: 0; /* Remove default margin for h1 in header */
}


.header-ad {
  width: 336px; /* Fixed size for ad */
  height: 280px;
  background-color: #f0f0f0; /* Placeholder bg */
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Main Container Layout */
.main-container {
  display: flex;
  max-width: 1300px; /* Wider to accommodate sidebar + content */
  margin: 20px auto;
  padding: 0 15px;
  gap: 20px; /* Space between sidebar and content */
}

/* Sidebar */
.sidebar {
  width: 366px; /* 336px for ad + 2*15px padding */
  flex-shrink: 0; /* Prevent sidebar from shrinking */
  background-color: #ffffff;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  height: fit-content; /* So it doesn't stretch full page height if content is short */
}

.sidebar-ad {
  width: 336px;
  height: 280px;
  background-color: #f0f0f0; /* Placeholder bg */
  border: 1px dashed #ccc;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.sidebar-nav h2 {
  font-size: 1.2em;
  color: #162f35;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
}

.sidebar-nav ul {
  list-style-type: none;
}

.sidebar-nav ul li a {
  display: block;
  padding: 8px 5px;
  color: #333;
  border-bottom: 1px solid #f5f5f5;
  transition: background-color 0.2s ease;
}

.sidebar-nav ul li a:hover {
  background-color: #e9ecef;
  text-decoration: none;
  color: #0056b3;
}

/* Content Area */
.content-area {
  flex-grow: 1; /* Takes remaining space */
  background-color: #ffffff;
  padding: 25px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.page-content h2 {
  color: #162f35; /* Dark teal for main content headers */
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 0.3em;
  margin-top: 1.5em;
}
.page-content h2:first-child {
    margin-top: 0;
}

.page-content h3 {
  color: #283522; /* Dark green for sub-headers */
  margin-top: 1em;
}

.content-section {
  margin-bottom: 30px;
  padding: 15px;
  border-radius: 5px;
}
.content-section.intro-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background-color: #f9f9f9; /* Light background for intro */
    padding: 20px;
}
.intro-image-container {
    flex: 0 0 40%; /* Image takes about 40% width */
}
.intro-text-container {
    flex: 1;
}


.dark-section {
  background-color: #13130b; /* Original dark background */
  color: #f0f0f0; /* Light text for dark background */
  padding: 20px;
  border-radius: 8px;
}

.dark-section h2, .dark-section h3 {
  color: #ffffff;
  border-bottom-color: #444;
}
.dark-section p, .dark-section li {
  color: #e0e0e0;
}
.dark-section a {
  color: #79a6d2;
}

.article-meta {
  margin: 20px 0;
  padding: 10px;
  background-color: #f8f9fa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  font-size: 0.9em;
  text-align: center;
}
.article-meta p {
    margin-bottom: 10px;
}

.share-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.share-buttons span {
    margin-right: 5px;
}
.share-buttons img {
    transition: transform 0.2s ease;
}
.share-buttons img:hover {
    transform: scale(1.1);
}

.content-ad-slot {
  margin: 25px auto;
  text-align: center;
}
.ad-in-section {
    margin-top: 15px;
    width: 336px;
    height: 280px;
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}


.read-more-link {
  margin-top: 15px;
  text-align: left;
}
.read-more-link a {
  display: inline-block;
  background-color: #162f35;
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.9em;
}
.read-more-link a:hover {
  background-color: #0e1c20;
  text-decoration: none;
}
.dark-section .read-more-link a {
    background-color: #3a5964;
}
.dark-section .read-more-link a:hover {
    background-color: #2c424a;
}


.flex-container {
    display: flex;
    gap: 20px;
    align-items: flex-start; /* Align items to the top */
}
.flex-item-text {
    flex: 1; /* Text takes available space */
}
.flex-item-image {
    flex: 0 0 45%; /* Image takes up to 45% width */
    max-width: 45%;
}
.flex-item-image .responsive-img {
    margin-bottom: 15px; /* Space between image and ad if present */
}


/* Footer */
.site-footer {
  background-color: #162f35; /* Original dark teal for footer */
  color: #bfbfbf; /* Light gray text */
  padding: 30px 20px;
  font-size: 0.9em;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #2a4a53; /* Slightly lighter separator */
}

.footer-section {
  flex: 1;
  min-width: 200px; /* Ensure sections don't get too narrow */
  margin-bottom: 20px;
}

.footer-section h4 {
  color: #ffffff; /* White headings in footer */
  margin-bottom: 15px;
  font-size: 1.1em;
}

.footer-section p, .footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul {
  list-style-type: none;
}

.footer-section a {
  color: #9ad3de; /* Lighter teal for links */
}

.footer-section a:hover {
  color: #ffffff;
}

.contact-info span {
  display: block;
  margin-bottom: 5px;
}
.contact-info i { /* Placeholder for icons */
    margin-right: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 0.85em;
  color: #a0b8bf;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .main-container {
    flex-direction: column;
  }
  .site-header {
    background-position: center 30%; /* Ajuster la position pour mobile si une partie importante de l'image est rognée */
  }
  
  .sidebar {
    width: 100%; /* Full width on smaller screens */
    margin-right: 0;
    margin-bottom: 20px;
  }
  .sidebar-ad, .header-ad, .ad-in-section {
    margin-left: auto;
    margin-right: auto;
  }
  .flex-container {
    flex-direction: column;
  }
  .flex-item-image {
    flex-basis: auto; /* Allow image to take full width in column layout */
    max-width: 100%;
    margin-top: 20px;
  }
  .content-section.intro-section {
    flex-direction: column;
  }
  .intro-image-container {
      flex-basis: auto;
      margin-bottom: 15px;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  .site-title-container {
    margin-bottom: 15px;
    justify-content: center;
  }
  .site-main-title {
    font-size: 1.3em;
  }
  .site-header {
    padding-top: 30px; /* Plus d'espace en haut sur mobile pour l'image */
    padding-bottom: 30px;
    min-height: auto; /* Permettre à la hauteur de s'adapter au contenu sur mobile */
  }
  .header-ad {
    margin-top: 15px; /* Espace entre le titre et l'annonce sur mobile */
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }
  h1 { font-size: 1.8em; }
  h2 { font-size: 1.5em; }
  h3 { font-size: 1.2em; }
  .site-main-title {
    font-size: 1.1em;
  }
  .site-logo-char {
    font-size: 20px;
    padding: 8px 15px;
  }
  .header-ad, .sidebar-ad, .ad-in-section {
    width: 300px; /* Adjust ad sizes for very small screens if necessary */
    height: 250px;
  }
  .adsbygoogle { /* Ensure ins tag scales */
      max-width: 100%;
  }
  .content-area, .sidebar {
      padding: 15px;
  }
}