:root {
  /* Variables initialisées avec les couleurs du style existant (Thème Classic) */
  --theme-background: #faf0ce; /* Fond du body */
  --theme-text: #2c3e50;       /* Couleur du texte principal, titres */
  --theme-primary: #c39b77;    /* Couleur principale (sidebar background, toggle btn background, strong text) */
  --theme-secondary: #f2e3b3;  /* Couleur secondaire (header background, section:hover background, action buttons background) */
  --theme-tertiary: #fef9e7;   /* Couleur tertiaire (section background) */
  --theme-quaternary: #f8f9fa; /* Couleur quaternaire (pour les sections) */            
  --theme-quaternary: #f8f9fa; /* Couleur quaternaire (pour les sections) */
  --theme-header: #eed498;     /* Couleur du footer header */
  --theme-footer: #eed498;     /* Couleur du footer background */
  --theme-accent: #9a4c18;     /* Couleur d'accent (utilisée pour boutons génériques background dans .content) */

  /* Ombres */
  --theme-header-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  --theme-section-shadow: 0 2px 5px rgba(0,0,0,0.1);
  --theme-sidebar-shadow: 0 2px 6px rgba(0,0,0,0.2);
  --theme-selector-shadow: 0 2px 6px rgba(0,0,0,0.2);

  /* Autres styles dynamiques */
  --theme-font-family: 'Georgia', serif;
  --theme-section-hover-transform: translateY(-5px);

  /* Couleurs de texte spécifiques */
  --theme-button-primary-text: white;
  --theme-button-secondary-text: var(--theme-text);
  --theme-sidebar-text-titre: white;
  --theme-sidebar-text: white;
  --theme-footer-text: white;
  --theme-text-shadow: none;
}

/* === Styles Généraux === */
body {
    font-family: var(--theme-font-family);
    background-color: var(--theme-background);
    color: var(--theme-text);
    text-shadow: var(--theme-text-shadow);
    margin: 0;
    padding: 0;
}

main {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

/* === Sections et Conteneurs === */
.section {
    background-color: var(--theme-tertiary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--theme-section-shadow);
}

.conteneur {
    background-color: var(--theme-secondary);
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
}

.conteneur h3 {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contenu {
    display: none;
    padding: 10px;
    background-color: var(--theme-background);
}

/* === Boutons Généraux === */
button {
    background-color: var(--theme-primary);
    color: var(--theme-button-primary-text);
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--theme-primary);
}

/* === Style des tableaux === */
.conteneur table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 1rem;
  background-color: white;
  overflow-x: auto;
  display: block;
}

.conteneur table th {
  background-color: var(--theme-primary);
  color: var(--theme-button-primary-text);
  font-weight: bold;
  padding: 0.75em 0.5em;
  text-align: left;
  border: 1px solid var(--theme-primary);
}

.conteneur table td {
  padding: 0.75em 0.5em;
  border: 1px solid var(--theme-primary);
  color: var(--theme-text);
}

.conteneur table tr:nth-child(even):hover {
  background-color: var(--theme-secondary);
  color: var(--theme-button-primary-text);
  transition: all 0.3s ease;
}

.conteneur table tr:nth-child(odd):hover {
  background-color: var(--theme-secondary);
  color: var(--theme-button-primary-text);
  transition: all 0.3s ease;
}


/*
 * Applies a different background color to even rows (2nd, 4th, 6th, etc.) in a table
 * Uses the custom property --theme-background as the background color
 * Creates a striped/alternating row effect for better readability
 * Works when placed within a container element with class 'conteneur'
 */
.conteneur table tr:nth-child(even) {
  background-color: var(--theme-background);
}
/*
 * Applies a different background color to odd rows (1st, 3rd, 5th, etc.) in a table
 * Uses the custom property --theme-background as the background color
 * Creates a striped/alternating row effect for better readability
 * Works when placed within a container element with class 'conteneur'
 
.conteneur table tr:nth-child(odd) {
  background-color: var(--theme-tertiary);
}
*/

.conteneur table caption {
  caption-side: top;
  text-align: left;
  font-style: italic;
  margin-bottom: 0.5em;
  color: var(--theme-text);
}

@media (max-width: 600px) {
  .conteneur table th,
  .conteneur table td {
    padding: 0.5em;
    font-size: 0.9rem;
  }
}

/* === Grille dynamique === */
.conteneur.dynamique .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1em;
  margin-top: 10px;
}

.conteneur.dynamique .card {
  background-color: white;
  border: 2px solid var(--theme-primary);
  border-radius: 8px;
  padding: 1em;
  box-shadow: var(--theme-section-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.conteneur.dynamique .card:hover {
  transform: var(--theme-section-hover-transform);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.conteneur.dynamique .card h4 {
  margin: 0 0 0.5em;
  font-size: 1.1rem;
  color: var(--theme-quaternary);
  border-bottom: 2px solid var(--theme-primary);
  padding-bottom: 0.3em;
}

.conteneur.dynamique .card p {
  margin: 0.3em 0;
  line-height: 1.4;
  color: var(--theme-quaternary);
}

@media (max-width: 600px) {
  .conteneur.dynamique .grid {
    grid-template-columns: 1fr;
  }
  .conteneur.dynamique .card {
    padding: 0.75em;
  }
  .conteneur.dynamique .card h4 {
    font-size: 1rem;
  }
}

.conteneur.dynamique .grid.contenu {
  display: none;
}

.conteneur.dynamique .grid.contenu.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1em;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .conteneur.dynamique .grid.contenu.active {
    grid-template-columns: 1fr;
    gap: 1.5em;
  }
}





















/* === Styles pour les boutons de la section "Full Width" === */
/* Conteneur pour les boutons de pleine largeur */

.full-width-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.full-width-buttons button {
  width: 100%;
  padding: 12px;
  margin: 5px 0;
  border: 1px solid var(--theme-primary);
  border-radius: 4px;
  background-color: var(--theme-secondary);
  cursor: pointer;
  text-align: left;
  font-size: 16px;
  transition: all 0.3s ease;
  color: var(--theme-text);
  position: relative;
}

.full-width-buttons button:hover {
  background-color: var(--theme-primary);
  transform: var(--theme-section-hover-transform);
  box-shadow: var(--theme-section-shadow);
  color: var(--theme-button-primary-text);
  padding-right: 30px;
}

.full-width-buttons button:hover::after {
  content: "→";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--theme-button-primary-text);
}

.full-width-buttons button i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}













/* === Conteneur PDF (affichage optimisé) === */
.conteneur.pdf .contenu {
    display: none;
    width: 100%;
    height: 700px;
    margin-top: 10px;
}

.conteneur.pdf iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.button-group {
    margin-top: 10px;
}

.button-group button {
    margin-right: 5px;
}




/* Conteneur du carrousel avec positionnement relatif et largeur fixe */
.carousel-container {
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px; /* Coins arrondis pour un look moderne */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Ombre portée subtile */
}

/* Piste qui contient toutes les diapositives, permettant des transitions fluides */
.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* Animation plus fluide */
  /*height: 800px;  Hauteur fixe pour uniformité */
}

/* Style des diapositives individuelles */
.carousel-slide {
  min-width: 100%;
  position: relative;
  opacity: 0.8; /* Légère transparence par défaut */
  transition: opacity 0.3s ease; /* Transition douce pour l'opacité */
}

/* Style actif pour la diapositive courante */
.carousel-slide.active {
  opacity: 1;
}

/* Style des images dans les diapositives */
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Couvre tout l'espace disponible */
  object-position: center;
}

/* Style de la légende en superposition pour chaque diapositive */
.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8)); /* Dégradé pour meilleure lisibilité */
  color: white;
  padding: 20px;
  text-align: center;
  transform: translateY(100%); /* Caché par défaut */
  transition: transform 0.3s ease; /* Animation de la légende */
}

/* Style du titre en haut de l'image */
.carousel-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
}

/* Style du conteneur des droits d'auteur */
.carousel-copyright {
  background-color: var(--theme-background);
  padding: 15px;
  text-align: center;
  font-size: 0.9em;
  box-shadow: var(--theme-section-shadow);
  position: relative;
  width: 100%;
  display: block;
  border-top: 3px solid var(--theme-primary);
}

.carousel-copyright a {
  color: var(--theme-accent);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.carousel-copyright a:hover {
  color: var(--theme-primary);
  text-decoration: underline;
}

/* Style de la légende toujours visible */
.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 20px;
  text-align: center;
}

/* Styles communs pour les boutons de navigation */
.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--theme-primary);
  color: white;
  border: none;
  padding: 15px 20px; /* Boutons plus grands */
  cursor: pointer;
  z-index: 1;
  border-radius: 50%; /* Boutons circulaires */
  font-size: 20px; /* Icônes plus grandes */
  transition: all 0.3s ease; /* Animation au survol */
}

/* Effet de survol pour les boutons de navigation */
.carousel-button:hover {
  background: var(--theme-accent);
  transform: translateY(-50%) scale(1.1); /* Légère augmentation de taille */
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Position pour le bouton précédent */
.prev {
  left: 20px;
}

/* Position pour le bouton suivant */
.next {
  right: 20px;
}

/* Indicateurs de pagination */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

/* Style des points de navigation */
.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Point actif */
.carousel-dot.active {
  background: white;
  transform: scale(1.2);
}

/* Animation de transition entre les diapositives */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}