@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Loved+by+the+King&display=swap');

/* ___________________ */
/* Reset et variables */
/* ___________________ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #EDE9E1;
  --secondary-color: #A39377;
  --border: #a39377ab;
  --bg-dark: #18140f;
  --text-light: #EDE9E1;
  --text-gray: #413A31;
  --text-dark: #2C241A;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--primary-color);
  color: var(--text-gray);
  overflow-x: hidden;
  min-height: 100vh;
}

header {
  background-color: var(--bg-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 48vh;
  position: fixed;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/texture_3.jpg');
    background-blend-mode: multiply;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.02; /* Ajustez de 0 à 1 pour contrôler la transparence */
  pointer-events: none;
}


/* ___________________ */
/* Title */
/* ___________________ */

.site-title-mobile {
  display: none;
}

#site-title {
  font-family: 'Loved by the King', cursive;
  font-weight: 300;
  color: var(--primary-color);
  text-align: left;
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

#site-title .highlight-2 {
  color: var(--secondary-color);
}

.site-title-mobile .highlight-2 {
  color: var(--secondary-color);
}


#anim_scroll {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  z-index: 1000;
  transition: padding 0.5s ease-in-out, width 0.5s ease-in-out;
}

#anim_scroll.fixed-scroll {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  padding: 10px 20px;
}


#anim_scroll:not(.fixed-scroll) #site-title {
  font-size: 6rem;
  opacity: 1;
  transform: translateY(0);
}


#anim_scroll.fixed-scroll #site-title {
  font-size: 2.5rem;
  opacity: 1;
  -ms-transform-origin-y: translateY(50);
}


#anim_scroll #site-title {
  opacity: 0;
  transform: translateY(5px);
}


/* ___________________ */
/* Masquotte */
/* ___________________ */

.center-image {
  margin-top: 50px;
  /* Adjust spacing from the top */
  text-align: center;
  position: fixed;
  /* For adjusting position later */
}

.masquotte {
  max-width: 25%;
  position: fixed;
  top: 120px;
  right: 50px;
  /* Ajout du halo de lumière */
  filter: drop-shadow(0 0 60px rgba(200, 196, 201, 0.2))
          drop-shadow(0 0 120px rgba(200, 196, 201, 0.2))
          drop-shadow(0 0 180px rgba(200, 196, 201, 0.5));
}



/* ___________________ */
/* Selector */
/* ___________________ */

.language-selector {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  padding: 10px 15px;

}

.language-selector a {
  text-decoration: none;
  color: var(--secondary-color);
  font-family: sans-serif;
  font-size: 0.75em;
  padding: 0 5px;
  transition: color 0.3s ease;
  font-weight: 300;
}

.language-selector a.active {
  color: var(--secondary-color);
  font-weight: bold;
}

.language-selector .separator {
  color: var(--secondary-color);
  font-size: 0.5em;
  padding: 0 5px;
}

.language-selector a:hover:not(.active) {
  color: #F0E0D0;
}

.language-selector .lang-fr {
  order: 1;
}

.language-selector .separator {
  order: 2;
}

.language-selector .lang-en {
  order: 3;
}

/* ___________________ */
/* Blog */
/* ___________________ */


.blog-section {
  padding: 50px 10px;
  position: relative;
  z-index: 3;
  width: 35%;
  display: block;
  margin: auto;
}



.blog-controls {
  display: flex;
  justify-content: left;
  margin-bottom: 50px;
  flex-wrap: wrap;
  gap: 15px;
  background-color: var(--primary-color);
  border: solid 0.2px var(--border);
  border-radius: 5px;
  padding: 15px 30px;
  color: var(--text-gray);
  align-items: center;
}


.sort-controls {
  display: flex;
  gap: 5px;
  align-items: center;
  border: transparent;
}

.sort-btn {
  padding: 0px 10px;
  color: var(--bg-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 1em;
  border: transparent;
  background-color: transparent;
}

.sort-btn:hover,
.sort-btn.active {
  color: var(--text-dark);
  font-weight: 700;
}



.tag-filter {
  padding: 8px 5px;
  color: var(--text-gray);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1em;
  outline: none;
  background-color: transparent;
  border: 0.1px solid var(--border);
  border-radius: 5px;
}

.blog-title {
  font-size: 1.2em;
  font-weight: 300;
  color: var(--secondary-color);
  text-align: right;
  margin-bottom: 20px;

}

.articles-grid {
  margin: 0 auto;
  display: grid;
  gap: 40px;
}

.article {
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  background-color: #fdf8f0;
  border: solid 0.1px var(--border);
  border-radius: 5px;
  padding: 0 30px 30px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.article.visible {
  opacity: 1;
  transform: translateY(0);
}

.article-header {
  display: flex; 
  align-items: center; 
  gap: 15px; 
  padding: 30px 15px 40px 15px; 
}

/* AJOUTEZ CES NOUVELLES RÈGLES */
.article-icon {
  width: 50px;
  height: 50px;
  background-color: var(--bg-dark);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0; /* Empêche l'icône de se réduire */
}

.article-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.article-title {
  font-size: 1.3em;
  font-weight: 700;
  text-align: left;
  color: var(--text-dark);
  margin: 20px 0 10px 0;
  line-height: 1.2;
}

.article-meta {
  display: flex;
  gap: 6px;
  flex-direction: column;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  color: var(--text-dark);
  font-size: 1.3em;
  font-weight: 700;

}

.article-date {
  color: var(--text-gray);
  font-size: 0.9em;
  font-weight: 300;
}

.article-content {
  padding: 0 20px 20px;
}

.content-layout-full {
  display: flex;
  gap: 20px;
  align-items: left;
  flex-direction: column;
}

.content-layout-right {
  flex-direction: column;
}

.content-layout-full .article-text {
  margin-bottom: 10px;
}

.article-media {
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
}

.media-square {
  width: 100%;
  height: 95%;
}

.media-rectangle {
  width: 100%;
  height: 500px;
}

.media-portrait {
  width: 100%;
  height: 600px;
}

.article-media img,
.article-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-text {
  flex: 1;
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-gray);
  font-weight: 200;
}

.article-text p {
  margin-bottom: 15px;
}

.article-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.download-btn,
.cta-btn {
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.9em;
}

.download-btn {
  border: 2px solid var(--border);
  color: var(--border);
}

.cta-btn {
  background: var(--bg-dark);
  color: var(--primary-color);
  border: 2px solid transparent;
}

.download-btn:hover,
.cta-btn:hover {
  transform: translateY(-2px);
}

.no-articles {
  text-align: center;
  padding: 80px 20px;
  color: #666;
  font-size: 1.2em;
  font-weight: 300;
}


/* Indicateur de chargement */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #FC9700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-indicator p {
  color: #666;
  font-size: 16px;
  margin: 0;
}

/* Message d'erreur */
.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.error-message p {
  color: #d32f2f;
  font-size: 16px;
  margin-bottom: 20px;
  max-width: 500px;
  line-height: 1.5;
}

.retry-btn {
  background-color: #FC9700;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.retry-btn:hover {
  background-color: #e8860a;
}

/* Message aucun article */
.no-articles {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 16px;
  font-style: italic;
}


/* ___________________ */
/* Footer */
/* ___________________ */

.footer {
  background: var(--bg-dark);
  color: var(--primary-color);
  padding: 40px 0 20px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  justify-items: end;
}

.author-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-container {
  position: relative;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-right: 2rem;

}

.logo img {
  width: 60px;
  height: 60px;

}



.author-info h2 {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 8px;

}

.description {
  color: var(--primary-color);
  line-height: 1.6;
  font-size: 0.95em;
  font-weight: 200;
  max-width: 400px;
}

.github-section {
  display: flex;
  align-items: center;
  gap: 50px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.github-section:hover {
  color: var(--secondary-color);
}

.github-icon {
  width: 60px;
  height: 60px;
  fill: var(--primary-color);
  transition: fill 0.3s ease;
}

.github-section:hover .github-icon {
  fill: var(--secondary-color);
}

.github-text {
  display: flex;
  flex-direction: column;
}

.github-title {
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 6px;
}

.github-url {
  color: #888;
  font-size: 0.9em;
  font-family: 'Inter', sans-serif;
}

.copyright {
  text-align: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9c9c9c;
  font-size: 0.7em;
}



/* Animation for elements */
.footer-content>* {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.footer-content>*:nth-child(1) {
  animation-delay: 0.1s;
}

.footer-content>*:nth-child(2) {
  animation-delay: 0.2s;
}

.footer-content>*:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pour la plupart des navigateurs */
::selection {
  background-color: var(--secondary-color);
  /* La couleur de fond de la surbrillance */
  color: var(--bg-dark);
  /* La couleur du texte sélectionné */
}

/* Pour Firefox */
::-moz-selection {
  background-color: var(--secondary-color);
  color: var(--bg-dark);
}



/* RESPONSIVE */
@media (max-width: 768px) {


  header {
    background-color: var(--bg-dark);
    width: 100%;
    height: 62vh;
    position: relative;
  }

  /* ___________________ */
  /* Title */
  /* ___________________ */

  .site-title-mobile {
    padding-top: 10px;
    display: block;
    font-family: 'Loved by the King', cursive;
    font-weight: 300;
    color: var(--primary-color);
    font-size: 5rem;
    text-align: center;
  }


  #anim_scroll {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    padding: 20px !important;
    text-align: center;
  }

  #anim_scroll #site-title {
    display: none !important;
  }

  #anim_scroll.fixed-scroll {
    position: relative !important;
    padding: 20px !important;
    width: 100% !important;

  }


  /* ___________________ */
  /* Masquotte */
  /* ___________________ */

  .center-image {
    margin-top: -100px;
    margin-left: 50px;
    text-align: center;
    position: relative;
  }

  .masquotte {
    max-width: 100%;
    position: relative;
  }


  /* ___________________ */
  /* Selector */
  /* ___________________ */


@media (max-width: 768px) {
    .language-selector {
        position: relative;
        top: auto;
        right: auto;
        margin: auto auto;
        width: fit-content;
        padding: 12px 15px;
        border-radius: 10px;
        border: none;
    }

    .language-selector a {
        font-size: 0.9em;
        padding: 0 8px;
    }

    .language-selector .separator {
        font-size: 0.5em;
        padding: 0 8px;
    }
}
  /* ___________________ */
  /* Blog */
  /* ___________________ */


  .blog-section {
    padding: 0px 10px;
    position: relative;
    z-index: 3;
    width: 100%;
    display: block;
    margin: 50px auto ;
  }

  .blog-controls {
    justify-content: center;
  }

  .article {
  
  padding: 0 10px 0px;
}

.blog-title{
  color: var(--bg-dark);
}


.media-square {
  width: 100%;
  height: 95%;
}

.media-rectangle {
  width: 100%;
  height: 380px;
}

.media-portrait {
  width: 100%;
  height: 420px;
}
  /* ___________________ */
  /* Footer */
  /* ___________________ */


  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
    justify-items: center;
  }

  .author-section {
    flex-direction: column;
    gap: 15px;
  }

  .description {
    text-align: center;
    max-width: none;
  }

  .github-section {
    align-self: center;
    max-width: 300px;
    flex-direction: column;
  }

}

;