/****************************************************
  HOME.CSS - version responsive propre
****************************************************/

main { margin: 110px 0 0 0; }

/* HERO */
div.home {
  width: 100%;
  height: 50vh;
  min-height: 360px;
  background-size: cover;
  background-position: top center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

div.home h1 {
  line-height: 1.1;
  text-align: left;
  color: #fff;
  font-size: clamp(28px, 4vw, 52px);
  margin: 0;
  padding: 12px 22px;
  border-radius: 15px;
  text-shadow: 4px 3px 10px rgba(0, 0, 0, 1);
  background: rgba(0, 0, 0, 0.4);
  position: relative;
  width: min(720px, 92vw);
}

div.home h1 span {
  font-family: "Caramel", cursive;
  display: block;
  line-height: 1;
  font-size: clamp(34px, 6vw, 60px);
}

div.home h1 strong {
  display: block;
  line-height: 1.05;
  color: #e3d737;
  font-size: clamp(28px, 5.5vw, 70px);
}

/* petit logo dans le h1 */
div.home h1 img {
  display: block;
  width: auto;
  height: 70px;
  position: absolute;
  top: -18px;
  right: 16px;
}

/* SVG sous le hero */
section.home div.svg {
  margin: 0;
  position: relative;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 150px;
  min-width: 0; /* IMPORTANT: supprime le débordement */
}

section.home div.svg svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 -10px 10px rgba(0, 0, 0, 0.9));
}

/* SHORTCUTS */
div.shortcuts{
    width: min(980px, 92vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 50px;
    row-gap: 40px;
    margin-top: -220px;
    position: relative;
    z-index: 90;
  }
  
  /* Le lien occupe toute la cellule grid */
  div.shortcuts a.shortcut{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #122b08;
  }
  
  /* Le cercle */
  div.shortcuts a.shortcut .icon{
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
    padding: 10px;
    box-shadow: 1px 1px 3px 2px rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: 0;
    transition: .2s;
  }
  
  div.shortcuts a.shortcut:hover .icon{
    top: -10px;
    background: #dbebff;
    transition: .2s;
  }
  
  div.shortcuts a.shortcut .icon img{
    width: 100%;
    height: auto;
    display: block;
  }
  
  /* Le texte est vraiment centré sous la cellule */
  div.shortcuts a.shortcut strong{
    display: block;
    margin-top: 15px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    transition: .5s;
  }
    
/* ACTU + AGENDA */
section.actualite {
  height: auto;                 /* IMPORTANT: on évite les hauteurs fixes en mobile */
  overflow: hidden;
  display: flex;
  gap: 0;
  margin: 55px 0 0 0;
}

section.actualite div.actualite {
  width: 60%;
  padding: 20px 40px;
  background: #fff;
}

section.actualite div.agenda {
  width: 40%;
  padding: 20px 40px;
  background: #fff6d9;
}

/* Listes scrollables sur desktop (ok), mais on limitera sur mobile */
section.actualite ul.agenda,
section.actualite ul.infos {
  width: 100%;
  max-height: 380px;            /* au lieu de height calc(...) */
  overflow: auto;
  margin: 10px 0;
  padding: 15px;
}

/* Tes styles existants conservés */
section.actualite ul.infos li {
  width: 100%;
  height: 70px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  vertical-align: top;
}

section.actualite ul.infos li:after {
  position: absolute;
  top: 0;
  left: -11px;
  width: 1px;
  height: 100%;
  content: '';
  display: block;
  background-color: rgba(0, 0, 0, .3);
}

section.actualite ul.infos li div.info {
  display: block;
  width: 100%;
  height: 65px;
  float: none;
  clear: both;
  padding: 5px 0;
}

section.actualite ul.infos li div.info div.image {
  display: block;
  float: left;
  width: 100px;
  height: 60px;
}

section.actualite ul.infos li div.info div.image div.illus {
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
}

section.actualite ul.infos li div.info div.texte {
  display: block;
  float: left;
  width: calc(100% - 100px);
  height: 54px;
  overflow: hidden;
  padding: 0 5px;
}

section.actualite ul.infos li div.info div.texte p {
  line-height: 18px;
  margin: 0;
  padding: 0;
}

section.actualite p a {
  color: #000;
  text-decoration: none;
}

section.actualite div h2.titre {
  border-bottom: solid 1px #333;
  text-align: center;
  margin: 10px 0 30px;
  line-height: 1px;
  font-size: 1em;
}

section.actualite div h2.titre strong {
  display: inline;
  padding: 0 15px;
}

section.actualite div.actualite h2.titre strong { background: #fff; }
section.actualite div.agenda h2.titre strong { background: #fff6d9; }

/* CHIFFRES (ton code est déjà bien, je garde) */
.section-chiffres {
  padding: 60px 0 80px;
  background: #f6f8fb;
}

.section-chiffres .chiffres-content {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 40px 30px 50px;
}

.section-chiffres h2 {
  text-align: center;
  color: #209551;
  font-size: 2.4em;
  margin-bottom: 10px;
}

.section-chiffres .chiffres-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 30px;
}

.chiffres-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 20px;
}

.chiffre-item {
  text-align: center;
  padding: 20px 10px;
  border-radius: 10px;
  background: #fdfdfd;
  box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.03);
}

.chiffre-number {
  display: block;
  font-size: 2.4em;
  font-weight: 700;
  color: #209551;
  margin-bottom: 8px;
}

.chiffre-label {
  display: block;
  font-size: 0.95em;
  line-height: 1.4;
}



/* --- RESPONSIVE HOME --- */
@media (max-width: 1100px) {
  div.shortcuts { column-gap: 30px; row-gap: 30px; }
}

@media (max-width: 992px) {
  /* actu/agenda en colonne */
  section.actualite {
    flex-direction: column;
  }
  section.actualite div.actualite,
  section.actualite div.agenda {
    width: 100%;
    padding: 18px 18px;
  }

  .chiffres-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    main {
        margin-top: 60px;
    }   

}
@media (max-width: 775px) {
    section.home div.svg {
        display: none;
    }

  /* shortcuts en 1 colonne + icônes un peu plus petites */
  div.shortcuts{
    grid-template-columns: repeat(2, 1fr);
    margin-top: 0;
    padding: 30px 0;
  }
}
@media (max-width: 600px) {

  div.shortcuts{
    grid-template-columns: 1fr;
    row-gap: 24px;
  }

  div.shortcuts a.shortcut .icon{
    width: 90px;
    height: 90px;
  }

  div.home { min-height: 320px; }
  div.home h1 { padding: 12px 16px; }
  div.home h1 img { height: 56px; top: -16px; right: 10px; }

  .section-chiffres .chiffres-content { padding: 30px 20px 40px; }
  .chiffres-grid { grid-template-columns: 1fr; }
  .chiffre-number { font-size: 2em; }
}
@media (max-width: 400px) {
    section.actualite ul.agenda, section.actualite ul.infos {
        height: auto;
        padding: 0 15px;
        list-style: none;
        max-height: none;
    }
    section.actualite ul.infos li {
        height: auto;
    }
    section.actualite ul.infos li:after {
        position: absolute;
        top: 0;
        left: -11px;
        width: 1px;
        height: 100%;
        content: '';
        display: block;
        background-color: rgba(0, 0, 0, .3);
        display: none;
      }
      section.actualite ul.infos li div.info {
        height: auto;
      }
      section.actualite ul.infos li div.info div.image {
        clear: both;
        float: none;
        height: 150px;
        width: 100%;
        overflow: hidden;
      }
      section.actualite ul.infos li div.info div.texte {
        clear: both;
        float: none;
        height: auto;
        width: 100%;
      }

      
}

@media (min-width: 1600px) {
    section.home div.svg {
        height: 180px;
    }
}