@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

.edito {
    position: relative;
    border: 1px solid #333;
    padding: 20px;
    overflow: hidden;
    transition: max-height 0.5s ease;
    max-height: 500px; 
}

.edito .article-container {
    margin: 0 auto;
    padding: 20px;
    letter-spacing: 0.8px;
    line-height: 1em;
    text-align: justify;
}

.edito .title {
    color: #4CAF50;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em; 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 2px; 
    margin-bottom: 20px; 
    position: relative; 
    transition: all 0.3s ease-in-out; 
}

.edito .content {
    color: #ffffff;
    font-size: 16px; 
    font-weight: 300; 
    color: #ffffff; 
    text-shadow: 4px 4px 4px rgba(0, 0, 0, 0.3); 
}

.edito.collapsed {
    max-height: 40px; 
}

.toggle-button {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    color: white;
    border: 2px solid #333;
    background-color: green;
    padding: 5px;
    border-radius: 40px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.3);
}

.toggle-button .arrow {
    transition: transform 0.3s ease;
}

.arrow {
    border: solid white;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 4px;
    transform: rotate(45deg); 
    transition: transform 0.3s ease;
}

 .edito:not(.collapsed) .arrow {
    transform: rotate(-135deg);
}

 article.article-container {
    position: relative;
    margin: 0 auto; 
    overflow: hidden; 
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
    letter-spacing: 0.8px;
    line-height: 1.5em;
    text-align: justify;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s, transform 0.5s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); 
}


article.article-container .date {
    color: #000000;
    font-size: 14px;
    margin-bottom: 10px;
    font-style: italic;
}

article.article-container p {
    color: #555;
}


article.article-container h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em; 
    font-weight: 700; 
    color: #333; 
    text-transform: uppercase;
    letter-spacing: 2px; 
    margin-bottom: 20px; 
    padding-left: 10px;
    position: relative; 
    transition: all 0.3s ease-in-out; 
}

article.article-container h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em; 
    font-weight: 700; 
    color: #333; 
    text-transform: uppercase;
    letter-spacing: 2px; 
    margin-bottom: 20px; 
    padding-left: 10px;
    position: relative; 
    transition: all 0.3s ease-in-out; 
}


article.article-container img.header {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

article.article-container img.headerarticle {
    height: 280px; 
    object-fit: cover; 
    object-position: left; 
    background-position: center;
    width: 100%; 
}

article.article-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

article.article-container.visible {
    opacity: 1;

}

.related-articles-list {
    display: flex;
    gap: 20px; 
}

.related-article-item {
    flex: 1; 
    text-align: left;
    position: relative;
    max-width: 33%; 
    border-radius: 8px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
    padding: 10px;
}

.related-article-item:hover {
    flex: 1; 
    text-align: left;
    max-width: 33%; 
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    padding: 10px;
}

.related-article-item button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9em;
}

.related-article-item img {
    width: 100%;
    height: auto;
}


div.partage {
    width:100%; 
    text-align: right; 
    padding-right: 10px
}

a.partage {
    color: #005DFF;
}

a.partage:hover {
    color: #6599F3;
}

a.button {
    color: #fff;
    text-decoration: none;
    padding: 10px;
    border-radius: 5px;
    background-color: #555;
    transition: background-color 0.3s ease, transform 1.5s ease; 
}

a.button:hover {
    background-color: #4CAF50; 
    color: #fff;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 80px;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #93D482;
    margin: 0 5px; 
    margin-top: 10px;
}

.pagination a.active {
   background-color: #93D482;
    color: #fff;
}

.pagination a:hover {
    background-color: #555;
    color: #fff;
}

.pagination a {
    font-size: 14px;
    font-weight: bold;
}

.btn {
  --color: #479f76;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all .5s;
  border: none;
  background-color: transparent;
}

.btn div {
  letter-spacing: 2px;
  font-weight: bold;
  background: var(--color);
  border-radius: 2rem;
  color: white;
  padding: 1rem;
}

.btn::before {
  content: '';
  z-index: -1;
  background-color: var(--color);
  border: 2px solid white;
  border-radius: 2rem;
  width: 110%;
  height: 100%;
  position: absolute;
  transform: rotate(10deg);
  transition: .5s;
  opacity: 0.2;
}

.btn:hover {
  cursor: pointer;
  filter: brightness(1.2);
  transform: scale(1.1);
}

.btn:hover::before {
  transform: rotate(0deg);
  opacity: 1;
}

.btn svg {
  transform: translateX(-200%);
  transition: .5s;
  width: 0;
  opacity: 0;
}

.btn:hover svg {
  width: 25px;
  transform: translateX(0%);
  opacity: 1;
}

.btn:active {
  filter: brightness(1.4);
}

button.share {
  width: 100px;
  height: 32px;
  background-color: #95D03A;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 10px;
  justify-content: space-between;
  transition: all 0.3s;
}

button.share:hover {
  opacity: 0.85;
  transform: translateY(-4px);
}

button.share .label {
  font-size: 12px;
  line-height: 32px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 auto;
}


button.open {
  width: 100px;
  height: 32px;
  background-color: #95D03A;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 10px;
  justify-content: space-between;
  transition: all 0.3s;
  background-color: #D15629; 
  color: white; 
  font-weight: bold
}

button.open:hover {
  opacity: 0.85;
  transform: translateY(-4px);
}

button.open .label {
  font-size: 12px;
  line-height: 32px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 auto;
}


.hidden {
    display: none;
}

.expanded {
  animation: fullarticle 0.2s;
}

@keyframes fullarticle {
  0% {
    opacity: 0; 
  }
  100% {
    opacity: 1; 
  }
}

@media screen and (max-width: 480px) {
    

        .edito .article-container {
            max-width: 100%;
        }

        
        article.article-container {
            max-width: 100%; 
            padding: 10px;
        }
    
        article.article-container img {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
        }
    
        article.article-container img.header {
            height: 150px; 
            object-fit: cover; 
            object-position: left; 
            width: 100%; 
        }
    
        article.article-container img.headerarticle {
            height: 150px; 
            object-fit: cover; 
            object-position: left; 
            width: 100%; 
        }
    
       .related-articles-list {
            flex-direction: column; 
            gap: 15px; 
        }

        .related-article-item {
            max-width: 100%; 
        }
    
        .related-article-item:hover {
            max-width: 100%; 
        }

    
}

@media screen and (min-width: 480px) {

        .edito .article-container {
            max-width: 90%;
            text-align: center
            
        }

        article.article-container {
            max-width: 85%; 
            padding: 20px;
        }
    
       
}