/* --- Début : Réinitialisation et Box Sizing Global --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Variables CSS (Palette Bleue pour Ours Polaire) --- */
:root {
  /* Couleurs Bleues pour le thème Ours Polaire */
  --primary-color: #1A5276;  /* Bleu foncé principal */
  --secondary-color: #2980B9; /* Bleu moyen */
  --accent-color: #3498DB;   /* Bleu clair pour accents */
  --light-accent-color: #A9CCE3; /* Bleu très clair / Gris-bleu */
  
  --background-main: #F0F4F8; /* Fond général très clair, légèrement bleuté */
  --background-content: #FFFFFF;
  --text-color: #333333;
  --text-light: #FFFFFF;
  --header-height: 70px;

  /* Mapping des variables de how-to-fish-carp.css aux nouvelles couleurs */
  --header-footer-bg: var(--primary-color);        /* Était Vert Pêche #4A6B4C */
  --nav-bg: var(--secondary-color);              /* Était Vert plus clair #6E8B6E (pour nav-quick-links) */
  --nav-text: var(--text-light);                 /* Était #FFFFFF */
  --heading-color: var(--primary-color);         /* Était Marron Sienne #A0522D (pour H2/H3 dans le contenu) */
  --link-color: var(--secondary-color);          /* Était Vert pour liens #5D8B50 */
  --link-hover-color: var(--accent-color);       /* Était Orange foncé #FF8C00 */
  
  --border-color: #D6DBDF;                       /* Était #D7CCC8 */
  --conclusion-bg: #EBF5FB;                      /* Était #E8F5E9 (Fond bleuté clair) */
  --conclusion-border: var(--secondary-color);    /* Était #4A6B4C */
  --recipe-bg: #FAFBFC;                          /* Était #FAF8F0 */
  --shadow-color: rgba(0, 0, 0, 0.08);
}

/* --- Styles Généraux du Corps --- */
body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-main);
  color: var(--text-color);
  line-height: 1.7;
  overflow-x: hidden;
  padding-top: 70px; /* Hauteur du header fixe */
}

/* --- Header --- */
/* --- Header --- */
header {
  background-color: var(--header-footer-bg);
  padding: 0 20px;
  box-shadow: 0 2px 5px var(--shadow-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height); /* ex: 70px */
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Garde la nav à droite si présente */
  height: 100%;
  gap: 15px;
}

/* Nouveaux/Modifiés styles pour logo et titre principal */
.logo-and-title-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    margin-right: auto; /* Pousse la nav principale (si elle existe) à droite */
}

.logo {
  max-height: 50px; /* Ajustez selon votre logo */
  margin-right: 15px; /* Espace entre logo et titre */
  flex-shrink: 0;
}

h1.site-main-title { /* Style pour le H1 unique "Ours Polaire - Le Guide" */
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8em; /* Ajustez selon vos préférences */
  font-weight: 700;
  line-height: 1.2;
  margin: 0; /* Annule les marges par défaut du H1 */
  padding: 0;
  border: none; /* Annule les bordures par défaut du H1 si le style général en met */
  color: var(--text-light); /* Assure que le texte est blanc */
}
.main-site-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em; /* Ajuster */
    font-weight: 700;
    line-height: 1.1;
}
.page-header-title { /* Le H1 spécifique à la page, plus petit */
    font-family: 'Roboto', sans-serif;
    font-size: 0.9em; /* Ajuster */
    font-weight: 400;
    color: var(--light-accent-color); /* Un peu plus discret */
    margin: 0;
    border: none; /* Annule les styles H1 globaux */
    padding: 0;
    line-height: 1.1;
}


nav.main-header-nav ul { /* Votre navigation principale */
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}
nav.main-header-nav li {
    margin-left: 15px; /* Un peu moins d'espace */
}
nav.main-header-nav a {
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 10px; /* Plus petit que la nav-quick-links */
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
}
nav.main-header-nav a:hover, nav.main-header-nav a.active {
    background-color: rgba(255,255,255,0.15);
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: var(--nav-text);
    font-size: 1.8em;
    cursor: pointer;
    padding: 5px;
    margin-left: 15px; /* Espace par rapport à la nav */
}

.ads-header { /* Style pour la pub header de l'exemple carpe, si vous la remettez */
  flex-shrink: 0;
  /* width: 336px; height: 280px; */ /* Commenté pour l'instant */
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ads-header ins.adsbygoogle { display: inline-block; max-width: 100%; height: auto; }


/* --- Navigation Rapide (Sticky) --- */
.nav-quick-links {
  background-color: var(--nav-bg);
  text-align: center;
  padding: 12px 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-quick-links a {
  color: var(--nav-text);
  text-decoration: none;
  margin: 0 12px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-quick-links a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* --- Conteneur Principal (Flexbox) --- */
.main-container {
  display: flex;
  max-width: 1280px;
  margin: 30px auto;
  padding: 0 20px;
  gap: 30px;
  align-items: flex-start;
}

/* --- Sidebar --- */
.sidebar {
  width: 360px; /* Largeur de la sidebar de l'exemple carpe */
  flex-shrink: 0;
  position: sticky;
  top: calc(70px + 50px + 20px); /* Header + NavQuickLinks + MargeSouhaitée */
  /* overflow-x: hidden; Pas nécessaire si width est fixe */
}

.ads-sidebar, .sidebar-widget {
  background-color: var(--background-content);
  padding: 20px; /* Un peu plus de padding */
  border-radius: 8px;
  box-shadow: 0 2px 5px var(--shadow-color);
  margin-bottom: 25px; /* Plus d'espace */
  border: 1px solid var(--border-color);
}

.ads-sidebar ins.adsbygoogle { /* Pour la pub dans la sidebar */
  display: block;
  width: 340px; height: 280px; 
  margin: 0 auto;
  max-width: 100%;
}

.sidebar-widget h3 {
    margin-top: 0;
    color: var(--heading-color); /* Titres de widget en bleu foncé */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px; /* Plus d'espace sous la bordure */
    font-size: 1.2em; /* Taille conservée de l'exemple */
    margin-bottom: 15px;
}
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget ul li { margin-bottom: 10px; /* Plus d'espace */ }
.sidebar-widget ul li a {
    color: var(--link-color); /* Liens en bleu moyen */
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95em; /* Un peu plus lisible */
}
.sidebar-widget ul li a:hover {
    text-decoration: underline;
    color: var(--link-hover-color); /* Lien survolé en bleu clair */
}

/* --- Contenu Principal --- */
.content {
  flex: 1;
  background-color: var(--background-content);
  padding: 35px;
  border-radius: 8px;
  box-shadow: 0 3px 8px var(--shadow-color);
  border: 1px solid var(--border-color);
  opacity: 0; /* Pour animation fade-in */
  /* animation: fadeInAnimation 0.8s ease-out forwards; */ /* Géré par JS */
  /* animation-delay: 0.2s; */
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Animation d'Apparition (interactive-element est la classe utilisée par le JS) */
.interactive-element {
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  opacity: 0;
  transform: translateY(20px);
}
.interactive-element.fade-in-visible { /* Classe ajoutée par JS */
  opacity: 1;
  transform: translateY(0);
}
/* Fallback si JS/IntersectionObserver ne fonctionne pas */
.no-js .interactive-element, .content.fade-in {
    opacity: 1;
    transform: translateY(0);
}


/* --- Titres dans le Contenu (H2, H3) --- */
.content h1, .content h2, .content h3, .content h4 {
  color: var(--heading-color);
  border-bottom: 2px solid var(--nav-bg); /* Bleu moyen pour bordure */
  padding-bottom: 8px;
  margin-bottom: 25px;
  font-family: 'Montserrat', sans-serif; /* Police des titres de l'exemple */
}
/* Le H1 principal de l'article est dans le header pour cet exemple */
.content h2 { font-size: 1.7em; margin-top: 0px; } /* Premier H2 collé en haut de section */
.content section:not(:first-child) h2 { margin-top: 40px; } /* Marge pour les H2 suivants */

.content h3 { font-size: 1.4em; margin-top: 30px; color: var(--secondary-color); border-bottom-width: 1px;}
.content h4 { font-size: 1.2em; color: var(--heading-color); margin-top: 25px; margin-bottom: 15px; border-bottom: 1px dotted var(--nav-bg); }

/* Styles pour highlight-box et stats-grid (de votre CSS original) */
.highlight-box {
  background-color: var(--conclusion-bg); /* Fond bleu très clair */
  border-left: 5px solid var(--conclusion-border); /* Bordure bleu moyen */
  padding: 20px; margin: 25px 0; border-radius: 0 5px 5px 0;
}
.highlight-box h3 { color: var(--secondary-color); margin-top: 0; margin-bottom: 10px; font-size: 1.2em; border-bottom: none; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 30px 0; }
.stat-card { background-color: var(--background-main); border: 1px solid var(--border-color); border-radius: 6px; padding: 20px; box-shadow: 0 1px 3px var(--shadow-color); text-align: center; }
.stat-card h3 { font-size: 1.1em; color: var(--secondary-color); margin-top: 0; margin-bottom: 10px; border-bottom: none; }
.stat-card .value { font-size: 1.8em; font-weight: bold; color: var(--accent-color); }
.stat-card p { margin-top: 10px; font-size: 0.9em; margin-bottom: 0; }


/* Paragraphes, Listes dans le Contenu */
.content p, .content ul, .content ol, .content dl {
  font-size: 1em; margin-bottom: 20px; color: var(--text-color);
}
.content ul, .content ol { padding-left: 25px; }
.content ul li, .content ol li { margin-bottom: 10px; }
.content ul li::marker, .content ol li::marker { color: var(--heading-color); }
.content dl dt { font-weight: bold; color: var(--heading-color); margin-top: 15px; }
.content dl dd { margin-left: 20px; margin-bottom: 10px; }
.content strong, .content b { color: #000000; font-weight: 700; }
.content a { color: var(--link-color); text-decoration: underline; transition: color 0.2s ease; }
.content a:hover { color: var(--link-hover-color); }

/* Images Internes */
.content-section-image, .content img {
  display: block; max-width: 100%; height: auto;
  margin: 20px auto 25px auto; border-radius: 5px;
  box-shadow: 0 2px 4px var(--shadow-color);
}

/* --- Blocs Publicitaires DANS le Contenu (style de how-to-fish-carp) --- */
.ads-content {
    text-align: center; margin: 35px auto; padding: 10px 0;
    max-width: 100%; width: 100%;
}
.ads-content ins.adsbygoogle { display: inline-block; max-width: 100%;}

.share-buttons {
  display: flex;
  align-items: center; 
  gap: 0.75rem;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: white; 
  font-weight: bold;
  font-size: 1.2rem;
}

.share-btn-fb {
  background-color: #1877F2; /* Facebook Blue */
}
.share-btn-tw {
  background-color: #1DA1F2; /* Twitter Blue */
}

.share-btn:hover {
  background-color: var(--accent) !important; 
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* --- Footer --- */
footer {
  background-color: var(--header-footer-bg);
  color: var(--light-accent-color); /* Texte un peu plus clair */
  padding: 30px 20px;
  text-align: center;
  font-size: 0.9em;
  margin-top: 40px;
}
.footer-container {
    max-width: 1200px; margin: 0 auto;
    /* Utilisation de la structure footer de votre contenu Ours Polaire */
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px; text-align: left;
}
.footer-section h3 { color: var(--accent-color); margin-bottom: 15px; font-size: 1.2rem; font-family: 'Roboto', sans-serif;}
.footer-section ul { list-style: none; padding: 0; }
.footer-section li { margin-bottom: 8px; }
.footer-section a, .footer-section p { color: var(--light-accent-color); text-decoration: none; transition: color 0.3s ease; }
.footer-section a:hover { color: var(--text-light); text-decoration: underline; }
.footer-bottom { grid-column: 1 / -1; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.9em; }
.social-icons { margin-top: 15px; display: flex; gap: 15px; } /* S'assurer que .footer-section peut les centrer si text-align: center */
.social-icons a { color: var(--light-accent-color); font-size: 1.3em; }
.social-icons a:hover { color: var(--text-light); }


/* --- Bouton "Retour en Haut" --- */
#backToTopBtn {
  display: none; opacity: 0; visibility: hidden;
  position: fixed; bottom: 25px; right: 25px; z-index: 1001;
  border: none; outline: none;
  background-color: var(--nav-bg); /* Bleu moyen */
  color: var(--nav-text);
  cursor: pointer; padding: 10px 14px; border-radius: 50%;
  font-size: 16px; box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: opacity 0.4s ease, visibility 0.4s ease, background-color 0.3s ease;
}
#backToTopBtn.show {
  display: flex; align-items: center; justify-content: center;
  opacity: 0.85; visibility: visible;
}
#backToTopBtn:hover {
  background-color: var(--link-hover-color); /* Bleu clair */
  opacity: 1;
}

/* --- Tablettes et Petits Laptops --- */
@media (max-width: 992px) {
  .main-container {
    flex-direction: column; /* Empile sidebar et contenu */
    padding: 0 15px;
  }
  .sidebar {
    width: 100%;
    margin-bottom: 30px;
    position: static; /* Sidebar n'est plus sticky */
    max-height: none;
    overflow-y: visible;
    padding: 0;
  }
  .ads-sidebar, .sidebar-widget {
      max-width: 600px; /* Limite largeur widgets sidebar */
      margin-left: auto;
      margin-right: auto;
  }
  .content {
    width: 100%;
  }
}

/* --- Petites Tablettes et Grands Smartphones --- */
@media (max-width: 768px) {
  body { font-size: 0.98em; } /* Léger ajustement taille police base */

  .header-container {
      justify-content: center; /* Centre les éléments restants quand la pub disparaît/réduit */
      gap: 10px; /* Réduit l'espace sur tablette */
  }
   /* Ajustement taille H1 tablette */
  .header-title h1 { font-size: 2em; }

   /* L'image header reste à 330px max, mais 100% width max */

  .content { padding: 25px; }
  .content h2 { font-size: 1.6em; }
  .content h3 { font-size: 1.3em; }

  .nav-quick-links a { margin: 0 8px; font-size: 0.9em; }

  /* Ajustement responsive Ads */
  .ads-header, .ads-sidebar, .ads-content { text-align: center; } /* Centre le contenu des blocs pub */

   .ads-header ins.adsbygoogle,
   .ads-sidebar ins.adsbygoogle,
   .ads-content ins.adsbygoogle {
       /* S'assurer qu'ils ne dépassent pas */
       max-width: 100%;
       width: 338; 
       height: 280;
       
   }
   /* Exemple spécifique pour la pub contenu */
   .ads-content ins.adsbygoogle[data-ad-slot="7088878457"] { /* Cible par slot ID si besoin */
        max-width: 468px; /* Largeur commune tablette */
        /* height: 60px; */ /* Hauteur correspondante */
   }
}

/* --- Smartphones --- */
@media (max-width: 600px) {
  header { padding: 10px 15px; } /* Réduit padding header */

  .header-container {
      flex-direction: column; /* Empile TOUT dans le header */
      align-items: center;
      text-align: center;
      gap: 10px; /* <<<< ESPACE VERTICAL réduit entre logo, titre/img, pub */
  }
  .logo { margin-bottom: 0; } /* Enlève marge si le gap suffit */
  .header-title-container {
      margin: 0; /* Enlève marge horiz qd empilé */
      gap: 5px;  /* Réduit encore gap titre/img */
  }
   /* Ajustement taille H1 mobile */
  .header-title h1 { font-size: 1.8em; }
  /* L'image header est déjà gérée par max-width: 100% */

  .ads-header { margin-top: 5px; order: 3; /* Met la pub en dernier si désiré */ }

  .nav-quick-links { padding: 10px 5px; position: static; } /* Nav n'est plus sticky */
  .nav-quick-links a { display: inline-block; margin: 5px 5px; font-size: 0.85em; }

  .content { padding: 20px; }
  .content h2 { font-size: 1.5em; margin-top: 30px;}
  .content h3 { font-size: 1.2em; margin-top: 25px;}

  #backToTopBtn { bottom: 15px; right: 15px; padding: 10px 13px; font-size: 16px; }

  /* Ads mobile */
  .ads-sidebar ins.adsbygoogle, .ads-content ins.adsbygoogle {
      /* Tailles communes mobile AdSense */
      /* max-width: 300px; */
      /* height: 250px; */
      max-width: 100%;
  }
   .ads-header ins.adsbygoogle {
       max-width: 100%;
        /* max-width: 320px; height: 100px; */
   }
}

/* --- Très Petits Écrans (< 480px) --- */
@media (max-width: 480px) {
    body { font-size: 0.92em; line-height: 1.6; }
    .main-container { padding: 0 10px; margin-top: 20px; }
    .content { padding: 15px; }

     /* Ajustement taille H1 petit mobile */
    .header-title h1 { font-size: 1.6em; }
    .header-title-image { width: 280px; max-width: 100%; } /* Image un peu plus petite */

    .content h2 { font-size: 1.4em; margin-top: 25px; margin-bottom: 20px;}
    .content h3 { font-size: 1.1em; margin-top: 20px; margin-bottom: 15px;}
    .content p, .content ul, .content ol, .content dl { margin-bottom: 15px; }

    .nav-quick-links a { font-size: 0.8em; margin: 5px 3px; }

    .content-section { padding: 15px; }
    .content-section-image { margin: 15px auto 20px auto; }

  /* Gestion Finale Blocs Publicitaires */
  .ads-sidebar, .sidebar-widget, .ads-header, .ads-content {
      width: 100%; max-width: 100%; padding: 10px 0;
      margin-left: 0; margin-right: 0; text-align: center; margin-bottom: 15px;
  }
   .ads-header { margin-top: 5px; margin-bottom: 10px; }
   .ads-content { margin: 25px auto; }

   /* AdSense tags specific styles for small screens */
  .ads-header ins.adsbygoogle,
  .ads-sidebar ins.adsbygoogle,
  .ads-content ins.adsbygoogle {
      width: auto; max-width: 100%; height: auto;
      display: inline-block;
      /* Exemple de taille fixe si auto pose pb */
      /* width: 300px; height: 100px; */
  }

   #backToTopBtn { bottom: 10px; right: 10px; padding: 8px 11px; font-size: 14px; }

   /* Gestion du texte pour éviter débordement */
   .content, .content p, .content li, .content dd, .content dt {
       overflow-wrap: break-word;
       word-wrap: break-word;
       -webkit-hyphens: auto;
       -moz-hyphens: auto;
       hyphens: auto;
   }
   .content pre, .content code {
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-x: auto; /* Scroll si vraiment trop long */
        max-width: 100%;
   }
   .content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap; /* Empêche le retour à la ligne dans les cellules */
   }
}