/* ============================
   ARTICLE — STRUCTURE GÉNÉRALE
   ============================ */

article {
    font-family: Inter, sans-serif;
    line-height: 1.6;
    font-size: 18px;
    color: #000;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Encadrés d'information / notes */
.info-box {
    border-left: 4px solid #d1fae5ff;
    background-color: #f0f8ff;
    padding: 12px 16px;
    margin: 1em 0;
    border-radius: 4px;
}

/* ============================
   TITRES (H1, H2, H3)
   ============================ */

article h1, article h2, article h3 {
    font-weight: bold;
    margin-top: 0.0em;
    margin-bottom: 0.5em;
}

article h1 {
    font-size: 2.2rem;
    color: rgb(92, 25, 146);
    margin-top: 1.2em;
}

article h2 {
    font-size: 1.7rem;
    color: #ff6600;
    margin-top: 1.1em;
}

article h3 {
    font-size: 1.3rem;
    color: #009933;
    margin-top: 1em;
}

/* ============================
   IMAGES DANS L'ARTICLE
   ============================ */

/* Images principales */
.article-image {
    display: block;
    margin: 0 auto;
    max-width: 70%;
    height: auto;
    border-radius: 12px;
}

/* Toutes les images dans article */
article img, 
.article-image {
    display: block;
    margin-left: auto;
    margin-right: auto;  /* centre l'image */
    max-width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Tailles d'images */
.img-small  { width: 225px; }
.img-medium { width: 450px; }
.img-large  { width: 900px; }

/* Figure + légende */
figure.img-center {
  display: block;
  text-align: center;
  margin: 20px auto;   /* centre horizontalement le bloc */
}

figure figcaption {
    font-size: 14px;
    color: #1900ff;              /* Légende en bleu */
    margin-top: 6px;
    font-style: italic;
}

/* Centrer d'autres éléments si besoin */
.img-center {
    text-align: center;
}

/* Mettre deux images (ou plus) côte à côte + légendes */
.img-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}

.img-row figure {
    flex: 1;
    text-align: center;
}

.img-row img {
    width: 100%;
    max-width: 700px; /* limite pour éviter d'être trop grand */
    border-radius: 8px;
}

/* Style des images des sous-menus : */
.section-cover {
  display: block;
  max-width: 900px;
  width: 100%;
  margin: 20px auto 40px auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative; /* nécessaire pour le pseudo-élément */
  overflow: hidden;   /* pour que le shine ne déborde pas */
}

.section-cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  z-index: 2;
}

.section-cover:hover::before {
  animation: shine-image 0.7s forwards;
}

@keyframes shine-image {
  0% { left: -75%; }
  100% { left: 125%; }
}

.section-cover:hover {
  transform: scale(1.05); /* zoom */
  box-shadow: 0 6px 25px rgba(0,0,0,0.25); /* profondeur */
}

/* Images miniatures des sous-menus — Mobile optimisé */
.submenus img,
.articles-grid .card img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ============================
   SOMMAIRE
   ============================ */

.toc {
    border-left: 4px solid #1900ff;
    padding: 10px 16px;
    background-color: #f5f4ff;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
}

.toc h2 {
    margin-top: 0;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li a {
    text-decoration: none;
    color: #1900ff;
    transition: color 0.2s ease;
}

.toc li a:hover {
    color: #ff6600;
}

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

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    font-size: 18px;
    transition: all 0.3s ease;
}

/* Bordure globale */
table, th, td {
    border: 1px solid #777;
}

/* En-tête */
thead tr {
    background-color: #d1fae5ff;
    color: #6b21a8ff;
    font-weight: bold;
}

/* Lignes paires / impaires pour alternance de couleur */
tbody tr:nth-child(even) {
    background-color: #f7f7f7;
}

tbody tr:hover {
    background-color: #ede9feff;
}

/* Cellules */
th, td {
    padding: 10px;
    text-align: left;
}

/* Bordures épaisses en haut et bas */
thead tr {
    border-bottom: 3px double #000; 
}
tfoot tr {
    border-top: 3px double #000;
}

/* ============================
   LINKS — LIENS CLIQUABLES
   ============================ */

/* Supprimer le soulignement de tous les liens dans les cartes, articles et sous-menus */
article a,
.articles-grid a,
.latest-grid a,
.submenus a,
.left-column a,
.right-column a {
    text-decoration: none;
    color: #0011ff;
}

/* Ajouter un effet au survol pour indiquer que c’est cliquable */
article a:hover,
.articles-grid a:hover,
.latest-grid a:hover,
.submenus a:hover,
.left-column a:hover,
.right-column a:hover {
    text-decoration: underline;
    color: #0011ff;
}

/* ============================
   ANIMATIONS
   ============================ */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(8px);
    transition: opacity 0.9s ease, transform 0.9s ease, filter 1s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}


/* Génèrer des <h1> et <h2> en dehors de <article> */

.content-column h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 0.0em;
    margin-bottom: 12px;
}

.articles-grid h2 {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 12px;
}

/* ============================
   Version MOBILE
   ============================ */

@media (max-width: 900px) {
/* Coins plus petits, marge réduite */
  .section-cover {
    margin: 15px auto 25px auto;
    border-radius: 8px;
  }

/* Hover Desktop */
    .submenus img:hover,
    .articles-grid .card img:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    }

/* Hover Desktop seulement */
    .section-cover:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    }

  /* Article général */
  article {
    padding: 12px 10px !important; /* réduit l'espace */
    font-size: 16px !important;    /* texte plus petit sur mobile */
    line-height: 1.5 !important;
  }

  /* Titres */
  article h1 { font-size: 1.6rem !important; }
  article h2 { font-size: 1.3rem !important; }
  article h3 { font-size: 1.1rem !important; }

/* Images des articles — version mobile */
  .article-body img {
        max-width: 100%;
        width: 100%;
        height: auto;
        border-radius: 10px;
    }

  /* Images */
  article img,
  .article-image,
  .img-row img,
  figure img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .img-row {
    flex-direction: column !important; /* empile les images au lieu de les mettre côte à côte */
    gap: 12px !important;
  }

  figure figcaption {
    font-size: 12px !important; /* légendes plus petites */
  }

  /* Sommaire */
  .toc {
    padding: 8px 10px !important;
    font-size: 14px !important;
  }

  .toc li a {
    font-size: 14px !important;
  }

  /* ===== Tableaux ===== */
  table, th, td {
    font-size: 12px !important;
    padding: 6px 8px !important;
    overflow-x: auto;
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }

  thead, tfoot { display: none !important; } /* masquer header/footer pour mobile */

  tbody tr {
    display: block !important;
    margin-bottom: 12px !important;
    border-bottom: 2px solid #ddd !important;
  }

  tbody tr td {
    display: block !important;
    text-align: right !important;
    border: none !important;
    position: relative !important;
    padding-left: 50% !important;
  }

  tbody tr td::before {
    content: attr(data-label); /* tu peux ajouter data-label dans tes td pour mobile */
    position: absolute;
    left: 10px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
    text-align: left;
  }

  /* ===== Info-box ===== */
  .info-box {
    padding: 8px 10px !important;
    font-size: 14px !important;
  }

}

