/*
============================================================
        Main
============================================================
*/

main {
  font-size: 20px;
  transition: font-size 0.3s ease;
  line-height: 1.75;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #222;
  background-color: #f2f4f8;
  padding: 40px;
  margin: 0 auto;
}

/* -------------------------------
        Texte
 -------------------------------*/
main h1 {
  font-size: 36px;
  color: #005999;
  font-weight: 700;
  margin: 50px 0 25px 0;
  border-bottom: 2px solid #005999;
  padding-bottom: 8px;
}

main h2 {
  margin: 40px 0 20px 30px;
  font-size: 30px;
  color: #003f73;
  font-weight: 600;
}

main h3 {
  margin: 30px 0 15px 50px;
  font-size: 24px;
  color: #002c4e;
  font-weight: 600;
}

main h4 {
  margin: 25px 0 10px 70px;
  font-size: 21px;
  color: #002c4e;
  font-weight: 600;
}

main img {
  display: block;
  margin: 0 auto;
}


main p {
  margin-bottom: 20px;
}

main ul,
main ol {
  margin: 0 0 20px 40px;
  padding-left: 10px;
}

main li {
  margin-bottom: 8px;
}

main strong {
  font-weight: 700;
  color: #0d3b66;
}

main em {
  font-style: italic;
  color: #444;
}

main a {
  color: #0077cc;
  text-decoration: underline;
}

main a:hover {
  color: #005999;
  background-color: #e0f0ff;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 60px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* -------------------------------
        Blog Post
-------------------------------*/
main .divpostBlog {
  margin: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column; /* ← empile les articles verticalement */
  gap: 20px; /* ← espace entre les articles */
}
main ul.listeArticle {
  display: flex;
  flex-direction: column; /* empile les <li> verticalement */
  gap: 20px; /* espace entre les articles */
  list-style: none;
  border: none !important; /* supprime toute bordure */
  outline: none;            /* au cas où */
  margin: 0;
  padding: 0;
}

main ul.postBlog,
main ol.postBlog {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

main .postBlog {
  border: 2px solid rgb(75, 70, 74);
  border-radius: 0.5em;
  padding: 20px 10px;
  display: flex;
}

main .postBlog li {
  margin-bottom: 8px;
  list-style: none;
  padding-left: 0;
}

main .postBlog p {
  line-height: 1.4;
  margin: 0;
}

main .postBlog a {
  border-radius: 21px;
  background-color: #f2f4f8;
  transition: all 0.5s ease-in-out;
}

main .postBlog a:hover {
  background-color: #f2f4f8;
}


main .postBlog a img {
  margin-right: 10px;
  border-radius: 21px;
  background-color: #f2f4f8;
  transition: all 0.5s ease-in-out;
  box-shadow: none;
}

main .postBlog a:hover img {
  box-shadow: 0 0 5px 3px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease-in-out;
  background-color: transparent; /* pas de blanchiment */
}


main .postBlog a.lien-image:hover {
  background-color: transparent;
  box-shadow: none;
  padding: 0;
}

main .postBlog .abstract {

  padding: 12px;
  margin-bottom: 20px;
  border-radius: 6px;
}


/* -------------------------------
        Article
------------------------------- */
main .illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

main .Titreprincipal {
  font-size: 70px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  margin: 0px 10% 30px 10%;
  padding: 24px;
  color: #f5f5f5;
  background-color: #1e3a8a;
  border: 3px solid #93c5fd;
  border-radius: 12px;
  line-height: 1.2;
  display: block;
}

/* Résumé */
main h2.Resume {
  margin-left: 0;
  border: 2px solid white;
  padding: 16px;
  background-color: #333;
  color: white;
  line-height: 1.2;
  border-bottom: 1px solid;
}

/*
============================================================
        modesombre
============================================================
*/
body.mode-sombre main {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

/* -------------------------------
        Texte
------------------------------- */
body.mode-sombre main h1,
body.mode-sombre main h2,
body.mode-sombre main h3,
body.mode-sombre main h4 {
  color: #93c5fd;
  border-color: #374151;
}

body.mode-sombre main strong {
  color: #60a5fa;
}

body.mode-sombre main em {
  color: #aaa;
}

body.mode-sombre main a {
  color: #7dd3fc;
}

body.mode-sombre main a:hover {
  background-color: #1e293b;
  color: #38bdf8;
}


/* -------------------------------
        Blog Post
-------------------------------*/
.mode-sombre .postBlog {
  background-color: #1e1e1e;
  border-color: #444;
  color: #f0f0f0;
}

.mode-sombre .postBlog p,
main.mode-sombre .postBlog li {
  color: #e5e7eb;
}

.mode-sombre .postBlog a,
.mode-sombre .postBlog img,
.mode-sombre .postBlog a:hover
{
  background-color: #1f1f1f;

}

.mode-sombre .postBlog a:hover img {
box-shadow: 0px 0px 8px 4px rgba(147, 197, 253, 0.8); /* bleu clair */
transition: all 0.3s ease-in-out;
}

/* -------------------------------
        Article
------------------------------- */
.mode-sombre .Titreprincipal {
  background-color: #1f2937;
  border-color: #4b5563;
  color: #f5f5f5;
}

.mode-sombre .Resume {
  background-color: #2c2c2c;
  border-color: #555;
  color: #f0f0f0;
}


/* -------------------------------
      Navigation Chapitres 
------------------------------- */

#div-naviagation {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto;
  flex-wrap: wrap;
}

#div-naviagation button,
#div-naviagation select {
  background-color: #0080ff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
/* Survol clair */
#div-naviagation button:hover,
#div-naviagation select:hover {
 background-color: #0080ff;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}
/* Style de base pour le select */
#chap_select {
  appearance: none;
  -webkit-appearance: none; /* pour Safari */
  -moz-appearance: none;    /* pour Firefox */
    
  background-color: white;
  color: #222;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.2s ease;

    min-width: 160px;
background-image: url("data:image/svg+xml,%3Csvg fill='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");

  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 24px;
  padding-right: 36px; /* espace pour la flèche */
}

/* Survol en mode clair : on ne change pas les couleurs */
#chap_select:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  background-color: white;

}


/* Survol sombre */
body.mode-sombre #div-naviagation button,
body.mode-sombre #div-naviagation select{
  background: #444;
  color: #e5e5e5;
  border: 1px solid #666;
}

body.mode-sombre #div-naviagation button:hover,
body.mode-sombre #div-naviagation select:hover {

  
 background: #666;
  color: #fff;
}


/* Mode sombre : fond et texte inversés */
.mode-sombre #chap_select {
  appearance: none;
  -webkit-appearance: none; /* pour Safari */
  -moz-appearance: none;    /* pour Firefox */
  color: #f0f0f0;
  border: 1px solid #374151;
  background-image: url("data:image/svg+xml,%3Csvg fill='white' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 24px;
  padding-right: 36px; /* espace pour la flèche */

}

/* Survol mode sombre : on ne modifie pas le fond/texte */
.mode-sombre #chap_select:hover {
  background-color: #1f2937;
  color: #f0f0f0;
  box-shadow: 0 0 10px rgba(147, 197, 253, 0.6);
}


/* -------------------------------
      bouton telecharger
------------------------------- */


/* Conteneur centré */
.telecharger-wrapper {
  display: flex;
  justify-content: center;
  margin: 20px auto;
}

/* Bouton de téléchargement */

.telecharger-wrapper a  {
  background-color: #0080ff;
  border: none;
     color: white;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Survol du bouton entier */

.telecharger-wrapper  a:hover {
    color: white;
  background-color: #005999;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}



/* Icône */
.telecharger-wrapper  a::before {
  content: "📥";
  font-size: 18px;
}



/* Mode sombre */

body.mode-sombre .telecharger-wrapper a  {
  background: #444;
  border: 1px solid #555;
}

body.mode-sombre .telecharger-wrapper a:hover  {
   background: #666;
 transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}




