/************ Corps de page ************/

body {
  margin: 40px;
  padding: 0px;
  font-family: 'Arial', sans-serif;
  background: #555555;
  color: #36393B;
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);}


.contenu {
  background: #e0e0e0;
  padding: 10px;
}

@media (max-width: 560px) {
  body {
  margin: 20px;
  /*font-size: clamp(0.9rem, 2.5vw, 1.3rem);*/
  }

  .contenu {
  padding: 20px;
  margin-top: 0px;
  }
}


/************ Titres ************/

h1 {
  text-align: center;
  padding: 0.5em;
  font-size: clamp(2.5rem, 3vw, 3.5rem);
}
@media (max-width: 560px) {
  h1 {
  font-size: clamp(1.5rem, 2vw, 2.5rem);
  padding: 0em;
  }
}

h2 {
  text-align: center;
  padding: 1em;
  font-size: clamp(1rem, 2vw, 2rem);
}
@media (max-width: 560px) {
  h2 {
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  }
}


/************ Liens ************/

a{
  color: Darkblue;
    text-decoration: none;
}

/* unvisited link */
a:link {
  color: darkblue;
}
 /*visited link*/
a:visited {
  color: darkblue;
} 
/* mouse over link */
a:hover {
  color: hotpink;
}


/************ Bannière ************/

.banniere img {
  width: 100%;
  height: auto; /* pour garder les proportions */
  display: block; /* supprime les espaces blancs en bas */
}


/************ Boutons de navigation ************/

.nav-boutons {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  background-color: #e0e0e0;
  margin-bottom: 0px;
}
@media (max-width: 560px) {
  .nav-boutons {
  gap: 0.5rem;
  }
}

.nav-boutons a {
  padding: 0.5em 1.5em;
  background: #004080;
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  border-radius: 6px;
}

.nav-boutons a:hover {
  background: #0066cc;
  transform: scale(1.05);
}


/************ Vidéos ************/

.liste-videos {
  margin-top: 1em;
}
.liste-videos button {
  margin-right: 0.5em;
  padding: 0.5em;
}

.video-standard {
  width: 90%;
  height: auto;
  display: block;
  margin: 0.5rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
@media (min-width: 560px) {
  .video-standard {
  width: 60%;
  }
}

.origine-video {
  margin-top: 0.5em;
  font-style: italic;
  font-size: 1rem;
  color: #444;
  text-align: center;
}


/************ Images ************/

.image-standard {
  width: 90%;
  height: auto;
  display: block;
  margin: 0.5rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
@media (min-width: 560px) {
  .image-standard {
  width: 60%;
  }
}

/* Affichage de deux images : 1 colonne ou 2 colonnes */
.image-2a2-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    margin: 10px;
}

.image-2a2-item {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Nouveau style pour le lien */
.image-2a2-item a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.image-2a2-item img {
    max-width: 60%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
}

/* Version mobile */
@media (max-width: 768px) {
    .image-2a2-container {
        grid-template-columns: 1fr;
    }
    
    .image-2a2-item {
        min-height: 200px;
    }
}

/* Lightbox (fond sombre + centré) */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Conteneur pour bloquer le clic de fermeture */
.lightbox-content {
  position: relative;
  text-align: center;
  max-width: 90%;
  max-height: 90%;
  overflow: hidden; /* utile si image trop grande */
  z-index: 1;
}

/* Image agrandie */
.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  margin-bottom: 0.5em;
}

/* Légende */
.lightbox p {
  color: #fff;
  margin: 0.5em 0;
}

/* Compteur */
.lightbox-counter {
  color: #ccc;
  font-size: 0.9rem;
}

/* Flèches de navigation */
.lightbox-nav {
  position: absolute;
  top: 50%;
  font-size: 2.5rem;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  padding: 0 0.5em;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3); /* Optionnel : meilleure visibilité */
  border-radius: 0.2em;
}
.lightbox-nav.prev { left: 10px; }
.lightbox-nav.next { right: 10px; }

/* Croix de fermeture */
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
  padding: 0;
}

/* Miniatures (pour rappel) */
.miniatures-galerie {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  margin: 1em auto;
}

.miniatures-galerie img {
  height: 200px;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease-in-out;
}

@media (max-width: 480px) {
  .miniatures-galerie {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: center;
    padding: 1em;
    box-sizing: border-box;
  }

  .miniatures-galerie img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    object-fit: contain;
  }
}

.miniatures-galerie img:hover {
  transform: scale(1.05);
}

/************ Galleries d'images pour liens ************/

.web-gallery {
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1em;
  gap: 1.2em;
  box-sizing: border-box;
}

.web-gallery a {
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: block;
}

.web-gallery img {
  width: 100%;
  /*aspect-ratio: 4 / 3;*/
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease-in-out;
}

.web-gallery img:hover {
  transform: scale(1.03);
}

.web-gallery span {
  display: block;
  margin-top: 0.5em;
  font-size: 0.95em;
}

/* Responsive : 2 images sur tablette, 1 sur mobile */
@media (max-width: 768px) {
  .web-gallery {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 480px) {
  .web-gallery {
    grid-template-columns: 1fr;
  }
}

.web-gallery:has(> a:only-child) {
  justify-content: center;
  max-width: 30%;
}


@media (max-width: 480px) {
  .web-gallery:has(> a:only-child) {
  justify-content: center;
  max-width: 100%;
  }
}


/************ Boîte pour inclusion de code ************/

.code-wrapper {
  position: relative;
  background: #f6f8fa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1em;
  overflow-x: auto;
  margin-top: 0.5em;
}

.code-content {
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 0.9em;
  line-height: 1.4;
  white-space: pre;
  margin: 0;
}

.copy-button {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  background: #eaeaea;
  border: none;
  border-radius: 4px;
  padding: 0.3em 0.5em;
  font-size: 0.8em;
  cursor: pointer;
  transition: background 0.3s;
}

.copy-button:hover {
  background: #d0d0d0;
}

.tab-buttons {
  display: flex;
  gap: 0.5em;
  margin-bottom: 0.5em;
}

.tab {
  background: #eee;
  border: none;
  padding: 0.3em 0.7em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
}

.tab.active {
  background: #d0d0d0;
  font-weight: bold;
}


/************ Boîte avertissement ************/

.boite-avertissement {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 1rem 1rem 1rem 2rem; /* espace pour les lignes à gauche */
  margin: 1rem 0;
  background-color: transparent;
  color: red;
  font-weight: bold;
  border-radius: 0 0 8px 0;
}

.boite-avertissement::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background-color: red;
  box-shadow: 4px 0 0 red; /* crée la 2e ligne à droite de la 1ère */
}

.boite-avertissement .icone {
  margin-right: 0.75rem;
  font-size: 1.5rem;
  line-height: 1;
}

.boite-avertissement .texte {
  line-height: 1.4;
}



/************ Boîte question ************/

.boite-question {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 1rem 1rem 1rem 2rem; /* espace pour les lignes à gauche */
  margin: 1rem 0;
  background-color: transparent;
  color: purple;
  font-weight: bold;
  border-radius: 0 0 8px 0;
}

.boite-question::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background-color: purple;
  box-shadow: 4px 0 0 purple; /* crée la 2e ligne à droite de la 1ère */
}

.boite-question .icone {
  margin-right: 0.75rem;
  font-size: 1.5rem;
  line-height: 1;
}

.boite-question .texte {
  line-height: 1.4;
}


/************ Boîte information ************/

.boite-information {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 1rem 1rem 1rem 2rem; /* espace pour les lignes à gauche */
  margin: 1rem 0;
  background-color: transparent;
  color: green;
  font-weight: bold;
  border-radius: 0 0 8px 0;
}

.boite-information::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background-color: green;
  box-shadow: 4px 0 0 green; /* crée la 2e ligne à droite de la 1ère */
}

.boite-information .icone {
  margin-right: 0.75rem;
  font-size: 1.5rem;
  line-height: 1;
}

.boite-information .texte {
  line-height: 1.4;
}
/************** Visionneuse pdf ***********************/
.pdf-container {
  margin-top: 1em;
  text-align: center;
}
.pdf-viewer{
  width:100%;
  height:600px;
  border:1px solid #ccc;  
}
