/* === POLICES LOCALES === */
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fontes/lora-v35-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fontes/lora-v35-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fontes/lora-v35-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === VARIABLES DE DESIGN === */
:root {
  --couleur-fond: #FDFDFD;
  --couleur-texte: #333333;
  --couleur-bordure: #DCDCDC;
  --couleur-lien: #f66b06;
  --couleur-lien-survol: #666666;
  --police-principale: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --police-titres: 'Lora', Georgia, 'Times New Roman', Times, serif;
  --largeur-max: 960px;
  --largeur-sidebar: 25%;
  --gap-colonnes: 40px;
}

/* === RESET ET STYLES DE BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--police-principale);
  font-size: 16px;
  line-height: 1.7;
  color: var(--couleur-texte);
  background-color: var(--couleur-fond);
  padding: 0;
}

.container {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--couleur-lien);
  text-decoration: underline;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--couleur-lien-survol);
  background: none !important;
  padding: 0 !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--police-titres);
  font-weight: bold;
  line-height: 1.3;
  color: var(--couleur-texte);
  margin-bottom: 1rem;
}

/* === HEADER MODIFIÉ === */
header {
  position: static;
  border-bottom: 1px solid var(--couleur-bordure);
  background-color: var(--couleur-fond);
  padding: 1.5rem 0;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0 20px;
}

.header-title {
  flex-grow: 1;
}

.site-title {
  font-family: var(--police-titres);
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--couleur-texte);
  margin: 0;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.site-title a {
  color: var(--couleur-texte);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--couleur-lien);
  text-decoration: none;
}

.site-subtitle {
  font-family: var(--police-principale);
  font-size: 0.9rem;
  color: #888;
  margin: 0;
  line-height: 1.3;
  font-style: italic;
}

.site-subtitle a {
  color: var(--couleur-lien);
  text-decoration: none;
  font-weight: 500;
}

.site-subtitle a:hover {
  color: var(--couleur-lien-survol);
  text-decoration: underline;
}

/* L'ancien logo n'est plus utilisé */
.logo {
  display: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin-left: 2rem;
}

.nav-links a {
  text-decoration: none;
  font-family: var(--police-principale);
  font-size: 0.9rem;
}

.burger {
  display: none;
}

/* === SUPPRESSION DU HERO === */
.hero {
  display: none;
}

/* === HEADER D'ARTICLE === */
.article-content {
  margin: 0;
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--couleur-bordure);
}

.article-title {
  font-family: var(--police-titres);
  font-size: 2.2rem;
  font-weight: bold;
  line-height: 1.2;
  color: var(--couleur-texte);
  margin-bottom: 0.5rem;
}

.article-date {
  font-family: var(--police-principale);
  font-size: 0.8rem;
  color: #888;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === MISE EN PAGE PRINCIPALE À DEUX COLONNES === */
.blog-layout {
  display: flex;
  gap: var(--gap-colonnes);
  padding: 40px 0;
}

/* COLONNE DE GAUCHE (NAVIGATION) */
.blog-sidebar {
  order: 1;
  flex-basis: var(--largeur-sidebar);
  flex-shrink: 0;
  max-width: var(--largeur-sidebar);
  position: static;
  height: auto;
  background: none;
  padding: 0;
  border: none;
  overflow-y: visible;
}

/* COLONNE DE DROITE (CONTENU) */
.blog-content {
  order: 2;
  flex-grow: 1;
  min-width: 0;
}

/* Image d'en-tête pour l'accueil seulement */
.blog-content::before {
  content: '';
  display: block;
  width: 100%;
  height: 250px;
  background-image: url('https://bloug.be/images/chiensnoirs.webp');
  background-size: cover;
  background-position: center;
  margin-bottom: 40px;
  border: 1px solid var(--couleur-bordure);
}

body:has(.content) .blog-content::before {
  display: none;
}

.sidebar-section {
  border: 1px solid var(--couleur-bordure);
  padding: 20px;
  margin-bottom: 30px;
  background-color: #f9f9f9;
}

.sidebar-title {
  font-family: var(--police-titres);
  font-size: 1.1rem;
  font-weight: bold;
  border-bottom: 1px solid var(--couleur-bordure);
  padding-bottom: 10px;
  margin-bottom: 15px;
  color: var(--couleur-texte);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  margin-bottom: 10px;
}

.sidebar-list a {
  font-family: var(--police-principale);
  font-size: 0.9rem;
  text-decoration: none;
  display: block;
  color: #666666;
}

.sidebar-list a:hover {
  color: #f66b06;
}

.sidebar-date {
  font-family: var(--police-principale);
  font-size: 0.8rem;
  color: #888;
  display: block;
  margin-top: 2px;
}

.sidebar-section p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* === STYLES DES BILLETS (PAGE D'ACCUEIL) === */
.blog-preview {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e8e8e8;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  padding-bottom: 30px;
  border-bottom: 1px solid #e8e8e8;
}

.blog-preview:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.blog-title {
  font-family: var(--police-titres);
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-title a {
  text-decoration: none;
  color: var(--couleur-texte);
}

.blog-title a:hover {
  color: var(--couleur-lien);
}

.blog-date {
  font-family: var(--police-principale);
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
}

.blog-desc {
  color: var(--couleur-texte);
  text-align: justify;
  line-height: 1.4;
  margin-bottom: 1rem;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

.read-more {
  margin: 0;
  text-align: right;
  font-size: 0.9rem;
}

.read-more a {
  color: #666666;
  text-decoration: none;
  font-style: italic;
  font-family: var(--police-principale);
}

.read-more a:hover {
  color: #f66b06;
  text-decoration: none;
}

.icone-article {
  display: none;
}

/* === STYLE DU CONTENU D'UN ARTICLE === */
.content {
  padding: 0;
}

.content p, .content li {
  text-align: justify;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* Chapô : paragraphe avec class="chapo" */
.content p.chapo {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.content h2, .content h3 {
  font-family: var(--police-titres);
  font-weight: bold;
  margin-top: 2.5rem;
  border-bottom: 1px solid var(--couleur-bordure);
  padding-bottom: 0.5rem;
}

.content h2 { font-size: 1.5rem; }
.content h3 { font-size: 1.3rem; }

/* === IMAGES ET ILLUSTRATIONS === */
.content img,
.illustration,
.illustration-petite,
.illustration-moyenne {
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  display: block;
}

/* === VIDÉOS RESPONSIVE === */
.content video,
.content iframe {
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  display: block;
}

/* Container pour vidéos en ratio 16:9 */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin: 2rem auto;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Pour les images flottantes, on fait flotter le paragraphe conteneur */
.content p:has(.image-carree) {
  float: left;
  width: 300px;
  margin: 0.5rem 2rem 1rem 0;
  line-height: 0; /* Supprime l'espace vertical du paragraphe */
}

.content p:has(.image-carree-droite) {
  float: right;
  width: 300px;
  margin: 0.5rem 0 1rem 2rem;
  line-height: 0; /* Supprime l'espace vertical du paragraphe */
}

.image-carree, .image-carree-droite {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 4px;
  margin: 0; /* Pas de marge sur l'image elle-même */
  display: block;
}

/* Fallback pour navigateurs sans support :has() */
.content p .image-carree {
  float: left;
  margin: 0.5rem 2rem 1rem 0;
}

.content p .image-carree-droite {
  float: right;
  margin: 0.5rem 0 1rem 2rem;
}

/* On s'assure que ces paragraphes ne flottent que s'ils contiennent une image */
.content p:not(:has(.image-carree)):not(:has(.image-carree-droite)) {
  float: none;
  width: auto;
  margin: 0 0 1.5rem 0;
}

/* Clearfix pour éviter les débordements */
.content::after {
  content: "";
  display: table;
  clear: both;
}

/* === NAVIGATION ENTRE ARTICLES === */
.blog-navigation {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--couleur-bordure);
  display: flex;
  justify-content: space-between;
}

.nav-label {
  font-family: var(--police-principale);
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
}

.nav-link {
  font-family: var(--police-titres);
  font-size: 1rem;
  font-weight: bold;
}

.nav-next {
  text-align: right;
}

/* === PIED DE PAGE === */
footer {
  background: none;
  color: #777;
  padding: 3rem 0;
  border-top: 1px solid var(--couleur-bordure);
  margin-top: 40px;
  text-align: center;
  font-size: 0.9rem;
}

.footer-inner {
  padding: 0 20px;
}

.footer-brand, .footer-links, .footer-copyright {
  color: #777;
}

footer a {
  color: #555;
  font-weight: normal;
}

footer a:hover {
  color: var(--couleur-lien);
}

.footer-dot, footer img {
  display: none;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  /* Header responsive */
  header nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-title {
    width: 100%;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .nav-links {
    margin-left: 0;
    gap: 1rem;
  }

  /* Article header responsive */
  .article-title {
    font-size: 1.8rem;
  }

  .article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
  }

  /* Layout responsive */
  .blog-layout {
    flex-direction: column;
  }

  .blog-content, .blog-sidebar {
    max-width: 100%;
    order: 0;
  }

  .blog-sidebar {
    margin-bottom: 40px;
  }

  .blog-content::before {
    height: 180px;
  }

  /* Annulation complète du système flottant sur mobile */
  .content p:has(.image-carree),
  .content p:has(.image-carree-droite) {
    float: none !important;
    width: 100% !important;
    margin: 1.5rem 0 !important;
    line-height: normal !important;
  }

  .image-carree,
  .image-carree-droite {
    float: none !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }
}
