/*
Theme Name: CAS Theme
Theme URI: https://clubalpinsuisse.ch
Author: GPT
Description: Thème WordPress personnalisé pour le Club Alpin Suisse
Version: 1.2
*/



body {
  font-family: Arial, sans-serif;
  margin: 20px;
  padding: 0;
}

/* ---- HEADER ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* logo + menu alignés à gauche */
  background: #fff;
  border-bottom: 2px solid #ccc;
  padding: 10px 20px;
  position: relative;
}

.site-header img.logo {
  height: 60px;
  margin-right: 20px;
}

.site-branding {
  flex-shrink: 0;
}

/* ---- MENU ---- */
.main-menu {
  display: block;
  margin-left: 0;
}

.main-menu ul {
  display: flex;
  gap: 20px; /* espace entre items */
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-menu li {
  margin: 0;
  position: relative;
}

.main-menu a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #000;
  font-weight: bold;
}

.main-menu a:hover {
  background: #eee;
  color: #000;
}

/* Sous-menus */
.main-menu ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #ccc;
  z-index: 1000;
}

.main-menu li:hover > ul.sub-menu {
  display: block;
}

.main-menu ul.sub-menu li {
  display: block;
}

/* Supprimer les flèches WordPress automatiques */
.main-menu .menu-item-has-children > a:after {
  content: none !important;
}

/* ---- HERO ---- */
.hero {
  width: 100%;
  height: 450px;
  background: url('https://test.cas-la-dole.ch/wp-content/uploads/2025/09/La-Dole-hiver.jpg') no-repeat center;
  background-position: center 30%;
  background-size: cover;
}

/* ---- TILES ---- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.tile {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative; /* nécessaire pour le bandeau date */
  padding-bottom: 40px; /* (définition initiale) */
}

.tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* ---- TILES ---- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.tile {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

/* Bandeau image de la tuile */
/* CHANGEMENT: montrer l’image entière (sans crop) */
.tile-banner {
  height: 180px;               /* un peu plus grand pour voir davantage l’image */
  width: 100%;
  background-size: contain;    /* montre l’image entière */
  background-repeat: no-repeat;
  background-position: center;
  background-color: #f2f2f2;   /* fond neutre si bandes latérales */
}

/* Contenu textuel */
.tile-content {
  padding: 10px 12px 15px;
  flex-grow: 1;
}

.tile h3 {
  font-size: 1.2rem;
  margin: 5px 0 10px 0;
}

.tile h3 a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

.tile h3 a:hover {
  color: #0073aa;
}

/* Résumé */
.tile p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 15px;
}

/* Ligne avant la date */
.tile-separator {
  border: none;
  border-top: 1px solid #ddd;
  margin: 10px 0;
}

/* Date (ancienne définition) */
.tile-date {
  font-style: italic;
  font-size: 0.85rem;
  color: #888;
  margin-top: auto;
}

/* ---- OVERRIDES ciblés pour les tuiles ---- */
.tiles .tile { padding-bottom: 0; }            /* annule l'ancien padding-bottom */
.tile .tile-content { padding-bottom: 52px; }  /* espace pour le bandeau bas (36px + marges) */

/* Bandeau date fixe collé en bas de la tuile */
.tile-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;                  /* hauteur fixe */
  border-top: 1px solid #ddd;    /* ligne collée au-dessus de la date */
  display: flex;
  align-items: center;
  padding: 6px 12px;             /* aligné à gauche comme le texte */
  background: #fff;
}

.tile-bottom .tile-date {
  color: #888;                   /* gris assez clair */
  font-style: italic;            /* italique */
  font-size: 0.85rem;
}

/* --------- TUILES / CARTES ARTICLES --------- */

.post-tile {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 0;
  background: #fff;
  overflow: hidden;
  width: 300px;                /* Ajuste selon ton layout */
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.post-tile img {
  width: 100%;
  height: 160px;               /* Taille uniforme */
  object-fit: cover;           /* Cropping propre */
  display: block;
}

/* Contenu texte */
.post-tile .content {
  padding: 12px 14px;
  flex: 1;                     /* pousse le bas vers le bas */
}

.post-tile h2 {
  font-size: 18px;
  margin: 0 0 8px 0;
  font-weight: 700;
}

.post-tile .excerpt {
  font-size: 14px;
  color: #333;
  line-height: 1.3;
  margin-bottom: 12px;
}

/* Ligne séparatrice */
.post-tile .separator {
  width: 100%;
  height: 1.5px;
  background: #ccc;
  margin: 0;
}

/* Date en bas */
.post-tile .date {
  padding: 10px 14px;
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* ---- ABOUT ---- */
.about {
  padding: 40px;
  background: #fafafa;
}

/* ---- SINGLE ARTICLE ---- */
.single-article {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

.single-article h1 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.article-thumb img {
  width: 100%;
  height: auto;
  margin-bottom: 20px;
}

.article-content {
  font-size: 1rem;
  line-height: 1.6;
}

/* ---- FOOTER ---- */
.site-footer {
  background: #333 url('https://test.cas-la-dole.ch/wp-content/uploads/2025/10/chateau-de-nyon_2000.jpg') no-repeat center;
  background-size: cover;
  background-position: center 30%;
  color: #fff;
  text-align: center;
  height: 400px;
  padding: 100px 10px;
}

/* Section partenaires */
.footer-partners {
  background: #fff;
  text-align: left;
  padding: 30px 15px;
}

.footer-partners h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #222;
}

.partners-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: 30px;
}

.partners-logos img {
  max-height: 50px;
  width: auto;
}

/* ---- TABLE ---- */
.wp-block-table table,
.wp-block-table tr,
.wp-block-table td {
  border: none !important;
  background: transparent !important;
}

/* ---- COMITE ---- */
.comite {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

.comite h1 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.comite-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .comite-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .comite-grid {
    grid-template-columns: 1fr;
  }
}

.comite-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comite-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.comite-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

.comite-card h3 {
  font-size: 1.2rem;
  margin: 5px 0;
}

.comite-card p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.comite-card a.mailto-btn {
  display: inline-block;
  padding: 6px 12px;
  background-color: #0073aa;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

/* ---- INFO BOX ---- */
.info-box {
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: 1000px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.info-box img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.info-text {
  flex: 1;
  text-align: left;
}

.info-text h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.info-text p {
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
}



@media (max-width: 800px) {
  .info-box {
    flex-direction: column;
    text-align: center;
  }

  .info-box img {
    margin-bottom: 20px;
  }

  .info-text {
    text-align: center;
  }
}

/* ---- HR centrée ---- */
.hr-centree {
  width: 50% !important;
  margin: 20px auto;
  border: none;
  border-top: 1px solid #ccc;
}

/* ---- HAMBURGER ---- */
.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: none;
  border: none;
}

/* Desktop */
@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .main-menu {
    display: none;
    background: #fff;
    position: absolute;
    top: 60px;
    right: 0;
    width: 220px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex-direction: column;
  }

  .main-menu.open {
    display: flex;
  }

  .main-menu ul {
    flex-direction: column;
    padding: 10px;
    margin: 0;
  }

  .main-menu li {
    margin: 10px 0;
    text-align: left;
  }

  .main-menu a {
    padding: 8px 12px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
  }

  .main-menu a:hover {
    background: #f0f0f0;
  }

  .menu-toggle {
    display: block;
  }
}
