body {
  max-width: 800px; /* limite élégante sur desktop */
  width: 90%; /* largeur fluide sur mobile */
  margin: 0 auto;
  font-family: sans-serif;
  /*border: 1px solid black;*/
}

p {
  text-align: justify;
}

address p {
  text-align: center;
}

hgroup {
  a {
    text-decoration: none;
    color: black;
    margin-bottom: 0pt;
  }
  p {
    margin-top: 0pt;
    font-variant-caps: small-caps;
    text-align: center;
  }
}

.sitebanner > img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin-left: auto; margin-right: auto;
}

figure > a > img, article > p > img {
  max-width: 75%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
figure > img {
  max-width: 75%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
figure > figcaption {
  margin-top: 0pt;
  text-align: center;
}

/* En gallerie */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; /* espace entre les cards */
  padding: 0;
  margin: 0;
  margin-bottom: 8px;
}

.imagecard {
  display: flex;
  flex-direction: column;
  background: #fff; /* optionnel */
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.imagecard img {
  width: 100%;
  height: auto;
  display: block;
  /*aspect-ratio: 1/1;*/
  object-fit: cover;
}

.caption {
  padding: 0.5rem;
  font-size: 0.9rem;
  color: #333;
  text-align: center;
}
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr; /* 1 imagecard par ligne sur mobile */
  }
}

@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}


/* ----- Header ----- */

.site-header {
  text-align: center;
  border-bottom: 2px solid black;
  padding-bottom: 1rem;
}

.site-header h1 {
  margin-bottom: 0.2rem;
}

.site-header .subtitle {
  margin-top: -10px;
  font-style: italic;
  color: #555;
}

.single-article-header {
  p {
    margin-bottom: 0pt;
  }
  h2 {
    margin-top: 0pt;
    a {
      text-decoration: none;
      color: black;
    }
  }
}

/* ----- Menu ----- */

.mobile-menubutton {
  width: 60%;
  height: 80px;
  display: none;
}

.main-nav {
  margin-top: 1rem;
}

/* Liste horizontale */
.menu, .footernav {
  display: flex;
  flex-wrap: wrap;         /* Passe à la ligne si petit écran */
  justify-content: center; /* Centre les items */
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 600px) {
  .mobile-menubutton {
    display: initial;
  }
  .menu {
    display: none;
  }
}

/* Chaque item */
.menu li{
  flex: 1 1 auto;           /* Ajuste la largeur selon l'espace */
  max-width: 180px;         /* Empêche un stretching trop large */
}

.footernav li {
  flex: 1 1 auto;
  max-width: 180px;
  display: flex;
  align-items: center;     /* centrage vertical */
  justify-content: center; /* centrage horizontal */
}

/* Style des liens */
.menu a, .footernav a {
  display: block;
  padding: 0.8rem 1rem;
  background: #eee;
  border-radius: 6px;
  text-decoration: none;
  color: #000;
  transition: background 0.2s ease;
}

.footernav a {
  background: #fff;
}

/* Hover */
.menu a:hover {
  background: #ddd;
}

/* Optionnel : petit écran */
@media (max-width: 600px) {
  .menu a {
    padding: 1rem;
    font-size: 1.1rem;
  }
}


/* CARDS */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 0;
}

/* Lien transformé en card */
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;        /* Pas de soulignement */
  color: inherit;               /* Couleur du texte normale */
  border: 1px solid #ccc;
  border-radius: 12px;
  overflow: hidden;             /* Coins arrondis aussi pour l’image */
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Effet hover */
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.card.card-span {
  grid-column: 1/3;
}
@media (max-width: 600px) {
  .card.card-span {
    grid-column: 1/2;
  }
} 

/* Image en haut avec ratio uniforme */
.card-img {
  width: 100%;
  aspect-ratio: 16/9;           /* ratio propre */
  object-fit: cover;            /* recadrage propre */
  border-bottom: 1px solid #ccc;
  min-height: 150px;
}

.card-img-sm {
  max-height: 150px;
}

/* Placeholder si pas d'image */
.card-img.placeholder {
  background-color: #eee;      /* gris clair */
  border: 1px solid #ccc;      /* liseré */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenu textuel */
.card-content {
  padding: 1rem 1.25rem;
}

.card-content :is(h2,h3,h4) {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.card-content .excerpt {
  margin: 0;
  color: #555;
}
.excerpt p {
    margin: 0;
}

.embedded_yt {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
  iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

table {
  border-collapse: collapse;
}
td, th {
  border: 1px solid lightgray;
  padding: 4px;
}


/* 
 * Boxes *
*/

.warning {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 5px solid #c0392b;   /* rouge sourd, non agressif */
  background-color: #fdf2f2;        /* fond très clair */
  color: #2c2c2c;
  font-size: 0.95rem;
  line-height: 1.5;
}

.warning strong {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.warning p {
  margin: 0;
}

.socialicon {
  max-width: 15px;
}

.leaflet-container {
  width: 100%;
  height: 400px;
  position: relative;
  align-content: center;
  margin: 0 auto;
}