
main {
  padding: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

nav.main-nav {
  display: none;
}

/* ✅ Et laisse ton breadcrumb visible */
nav.breadcrumb {
  display: block;
}

#reading-progress {
  position: fixed;
  left: 0;
  right: 0;
  height: 4px;
  opacity: 0;
  background-color: #393be5;
  z-index: 9999;
  top: 102.8px; /* valeur desktop par défaut */
  transition: width 0.25s ease;
}

#reading-progress.active {
  opacity: 1;
}

h1 {
  color: #1e293b;
  font-size: 2rem;
  margin-bottom: 1rem;
}

h2 {
  color: #222;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  color: #1e293b;
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.toc {
  background: #f9f9ff;
  border-left: 4px solid #393be5;
  padding: 1rem;
  margin: 2rem 0;
  border-radius: 8px;
  font-size: 0.95rem;
}

.toc strong {
  color: var(#1d4ed8);
  font-size: 1.1rem;
}

.toc ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.toc li {
  margin: 0.4rem 0;
}

.toc a {
  color: #393be5;
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* ========== PARAGRAPHES & LIENS ========== */

p {
  margin-bottom: 1em;
}

a {
  color: #393be5;
  text-decoration: underline;
}

a:hover {
  color: #1d4ed8;
}

/* ========== LISTES ========== */

ul,
ol {
  margin-left: 0.5em;
  margin-bottom: 1em;
}

li {
  margin-bottom: 0.5em;
}

.article-header img,
.article-body img {
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: 600px; /* ou ce que tu veux */
  object-fit: contain;
  display: block;
  margin: 1em 0;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}


/* ========== TABLEAUX ========== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  overflow-x: auto;
}

th,
td {
  padding: 0.75em 1em;
  border: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

thead {
  background-color: #e2e8f0;
  font-weight: bold;
}

tbody tr:nth-child(even) {
  background-color: #e3edff; /* Blanc */
}

tbody tr:nth-child(odd) {
  background-color:  #ffffff; /* Bleu clair */
}



caption {
  caption-side: bottom;
  padding: 0.5em;
  font-style: italic;
  text-align: left;
  color: #666;
}

/* Petite adaptation pour mobile très petit */
@media screen and (max-width: 480px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ========== BLOCKQUOTES ========== */

blockquote {
  border-left: 4px solid #93c5fd;
  padding-left: 1em;
  color: #374151;
  margin: 1.5em 0;
  font-style: italic;
  background-color: #f9fafb;
}

/* ========== CODES ========== */

code {
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  background-color: #f3f4f6;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.95em;
}

pre {
  background-color: #f3f4f6;
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
}



.youtube-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  margin: 2rem auto;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  background-color: #000; /* utile si image absente */
}

.youtube-thumbnail {
  position: absolute;
  inset: 0; /* top: 0; right: 0; bottom: 0; left: 0; raccourci moderne */
  width: 100%;
  height: 100%;
  object-fit: cover;               /* rempli tout le conteneur */
  object-position: center center;  /* centre l’image, ajustable si besoin */
  display: block;
  border-radius: 8px;
  background-color: #f1f5f9;          
  transform: translateY(-7.5%);
}

.youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  background: url('/assets/images/icons/youtube-play.svg') no-repeat center;
  background-size: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.youtube-wrapper .youtube-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}





/* ========== FAQ / DÉTAILS ========== */

details {
  margin-bottom: 1.5em;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1em;
  background-color: #f9fafb;
}

details summary {
  font-weight: bold;
  cursor: pointer;
  color: #1e40af;
  margin-bottom: 0.5em;
}

/* ========== ALERTES ========== */

.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  border-left: 4px solid;
  background-color: #f9f9f9;
  font-weight: 500;
}

.alert.note {
  border-color: #393be5;
  background-color: #d1d9e6;
  color: #222;
}

.alert.info {
  border-color: #facc15;
  background-color: #fff8cc;
  color: #222;
}

.alert.danger {
  border-color: #ef4444;
  background-color: #fee2e2;
  color: #222;
}

.btn-cta {
  display: block;
  width: max-content;
  margin: 2em auto;
  background-color: #393be5;
  color: white;
  padding: 0.75em 1.5em;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  font-size: 1rem;
  border: none;
  text-align: center;
}


.btn-cta:hover,
.btn-cta:focus {
  color: #393be5;
  background-color: white; /* un peu plus foncé au hover/focus */
  border: 1px solid #393be5;
  outline: none;
}

.btn-cta:active {
  background-color: #24268f; /* encore plus foncé au clic */
}


.faq-section {
  max-width: 800px;
  margin: 1.5rem auto;
  padding: 0 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


/* Style des questions */
.faq-question {
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-radius: 6px;
  margin-top: 1rem;
  cursor: pointer;
  position: relative;
  user-select: none;
}

/* Icône + avant la question */
.faq-question::before {
  content: '+';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

/* Style des réponses */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  font-size: 1rem;
  color: #222;
  padding: 0 1rem;
  margin: 0;
}

/* FAQ ouverte */
.faq-question.active::before {
  content: '−';
  transform: translateY(-50%);
}

.faq-question.active + .faq-answer {
  max-height: 500px; /* assez grand pour la réponse */
  padding: 0.75rem 1rem 1rem;
  margin-bottom: 1rem;
}

 .similar-articles {
    margin-top: 4rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

 .similar-article {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.1);
  overflow: hidden;
  color: inherit;
  text-decoration: none; /* lien parent sans soulignement par défaut */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.similar-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
  text-decoration: none; /* important pour annuler underline globale */
}

/* Image */
.similar-article img {
  width: 100%;
  height: auto;
  border-radius: 12px 12px 0 0;
  object-fit: cover;
  margin-bottom: 0.8rem;
}

/* Contenu */
.similar-article-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Titre */
.similar-article h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: #393be5;
  text-decoration: none; /* pas de soulignement par défaut */
}

/* Soulignement uniquement au hover sur toute la carte */
.similar-article:hover h3 {
  text-decoration: underline;
  color: #393be5; /* même couleur */
}

/* Résumé */
.similar-article p {
  margin: 0 0 0.8rem;
  flex-grow: 1;
  text-decoration: none; /* pas de soulignement jamais */
  color: inherit; /* garder la couleur par défaut */
}

/* Date */
.date {
  font-size: 0.85rem;
  margin-top: auto;
  text-decoration: none; /* pas de soulignement jamais */
  color: inherit;
}

.similar-article:hover p,
.similar-article:hover .date {
  color: #222; /* ou une couleur fixe que tu veux */
}


  
/* ========== RESPONSIVE ========== */

/* Tablettes & petits desktops */
@media (min-width: 768px) and (max-width: 1024px) {
  #reading-progress {
    top: 102.8px; /* valeur tablette/mobile */
  }

  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.35rem;
  }
  main {
    padding: 2rem;
    max-width: 900px;
  }

  .youtube-wrapper {
    width: auto;        /* prend la largeur naturelle */
    max-width: none;    /* supprime max-width */
    max-height: 600px;  /* limite hauteur max */
    aspect-ratio: 16 / 9;
    margin-left: 0;
    margin-right: auto;
  }
  .youtube-thumbnail {         
  transform: translateY(-3.2%);
}

.youtube-play-button {
    width: 80px;
    height: 80px;
  }

  .alert {
    font-size: 1rem;
    padding: 1.25rem;
  }

  .btn-cta {
    font-size: 1.1rem;
    padding: 0.85em 1.8em;
    border-radius: 8px;
  }

  .faq-section {
    max-width: 1200px;
    padding: 0 0;
  }

  .faq-question {
    font-size: 1.25rem;
    padding: 1rem 1.5rem;
  }
  .faq-answer {
    font-size: 1.1rem;
  }

  .articles-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .similar-article {
    flex: 1 1 calc(50% - 0.75rem);
  }
  
 footer.site-footer {
    min-height: 60px;
  }
}

/* Grands écrans desktops */
@media (min-width: 1025px) {
  #reading-progress {
    top: 112.8px; /* valeur tablette/mobile */
  }

  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
  h3 {
    font-size: 1.5rem;
  }
  main {
    padding: 3rem;
    max-width: 1000px;
  }
  .alert {
    font-size: 1.1rem;
    padding: 1.5rem;
  }
  .youtube-wrapper {
    width: auto;        /* prend la largeur naturelle */
    max-width: none;    /* supprime max-width */
    max-height: 600px;  /* limite hauteur max */
    aspect-ratio: 16 / 9;
    margin-left: 0;
    margin-right: auto;
  }

  .youtube-thumbnail {         
  transform: translateY(-3.2%);
}

  .youtube-play-button {
    width: 80px;
    height: 80px;
  }

  .btn-cta {
    font-size: 1.2rem;
    padding: 1em 2em;
    border-radius: 10px;
  }
  
  .faq-section {
    max-width: 1200px;
    padding: 0 0;
  }
  
  .faq-question {
    font-size: 1.3rem;
    padding: 1.25rem 2rem;
  }
  .faq-answer {
    font-size: 1.15rem;
  }

  .articles-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .similar-article {
    flex: 1 1 calc(33.333% - 1rem);
  }

  footer.site-footer {
    min-height: 60px;
  }
}
