/* ============================ */
/*          VARIABLES           */
/* ============================ */
/* Variables CSS pour faciliter la maintenance et la modification du style */
:root {
  /* Couleurs et typographie */
  --affiliate-bg-color: #f5f5f5;
  --affiliate-header-color: #333;
  --affiliate-disclosure-font-size: 0.9em;
  --affiliate-disclosure-color: #777;

  /* Mise en page de la section */
  --affiliate-padding: 30px;
  --affiliate-margin: 30px auto;
  --affiliate-border-radius: 8px;

  /* Mise en page de la liste de produits */
  --product-list-gap: 20px;
  --product-width: 220px;

  /* Style de chaque produit */
  --product-bg-color: #fff;
  --product-border: 1px solid #e0e0e0;
  --product-border-radius: 8px;
  --product-padding: 15px;
  --product-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --product-text-align: center;
  
  /* Style de l'image produit */
  --product-img-border-bottom: 1px solid #f0f0f0;
  --product-img-padding-bottom: 10px;

  /* Typographie des titres produits */
  --product-title-font-size: 1.1em;
  --product-title-color: #333;
  
  /* Style des prix */
  --product-price-font-size: 1em;
  --product-price-font-weight: bold;
  --product-price-color: #FF9900;

  /* Bouton d'appel à l'action (si besoin) */
  --cta-bg-color: #FF9900;
  --cta-color: #fff;
  --cta-padding: 10px 20px;
  --cta-border-radius: 4px;
  --cta-font-size: 1em;
  --cta-text-transform: uppercase;


  /* Container général */
  --faq-container-max-width: 800px;
  --faq-container-padding: 20px;

  /* Titres des catégories */
  --faq-category-title-font-size: 1.5em;
  --faq-category-title-margin-top: 30px;
  --faq-category-title-margin-bottom: 10px;
  --faq-category-title-color: #1a73e8;

  /* Section FAQ */
  --faq-section-margin-bottom: 10px;

  /* Question */
  --faq-question-bg: #f9f9f9;
  --faq-question-padding: 10px;
  --faq-question-border-radius: 4px;
  --faq-question-transition: background 0.3s ease;
  --faq-question-hover-bg: #e9e9e9;
  --faq-question-font-weight: bold;
  --faq-question-cursor: pointer;

  /* Réponse */
  --faq-answer-max-height: 0;
  --faq-answer-transition: max-height 0.3s ease, padding 0.3s ease;
  --faq-answer-padding: 0 10px;
  --faq-answer-active-max-height: 500px;
  --faq-answer-active-padding: 10px;
  /* Polices et couleurs de base */
  --font-family: "Roboto", sans-serif;
  --background-color: #fafafa;
  --text-color: #000;

  /* Couleurs principales */
  --primary-color: #c95d8a;
  --primary-hover: #a94468;

  /* Couleurs pour l'entête et le footer */
  --header-bg-start: #ffffff;
  --header-bg-end: #ffffff;
  --header-text: #fff;
  --footer-bg: #000;
  --footer-text: #fff;

  /* Couleurs pour les titres */
  --h1-color: #d63384;
  --h2-color: #007bff;
  --h3-color: #28a745;
  --h4-color: #ffc107;

  /* Couleurs pour les tableaux */
  --table-bg: #f2f2f2;

  /* Boutons */
  --btn-bg: #c95d8a;
  --btn-hover-bg: #a94468;

  /* Sidebar */
  --sidebar-bg: #fff;
  --sidebar-border: #ccc;

  /* Style des sections pour plus de relief */
  --section-bg: #ffffff;
  --section-border: #e0e0e0;
  --section-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ============================ */
/*          RESET & BASE        */
/* ============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

#introduction {
  font-size: x-large;
  text-align: center;
}

/* Marge de base pour les sections */
.section {
  margin: 0 10px;
}

/* ============================ */
/*            LOGO              */
/* ============================ */
.logo img {
  padding: 9px;
  max-height: 50px;
}

/* ============================ */
/*       Liens & Paragraphes    */
/* ============================ */
p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* ============================ */
/*        Effet de Fondu        */
/* ============================ */
/* Ajout d'un fond, padding, marge et ombre pour plus de relief entre les sections */
.fade-section {
  width: 95%;
  background-color: var(--section-bg);
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--section-border);
  border-radius: 8px;
  box-shadow: var(--section-shadow);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================ */
/*            Titres            */
/* ============================ */
h1 {
  font-size: 3em;
  color: var(--h1-color);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
}

h2 {
  font-size: 2em;
  color: var(--h2-color);
  margin-top: 20px;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.75em;
  color: var(--h3-color);
  margin-top: 20px;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.5em;
  color: var(--h4-color);
  margin-bottom: 0.75rem;
}

/* ============================ */
/*       Header & Menu          */
/* ============================ */
header {
  background: linear-gradient(
    90deg,
    var(--header-bg-start),
    var(--header-bg-end)
  );
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  width: 100%;
  justify-content: space-around;
  align-items: center;
}

.logo a {
  color: var(--header-text);
  font-size: 1.5rem;
  font-weight: bold;
}

/* Menu principal centré */
nav {
  display: flex;
  justify-content: center;
  align-items: center;
}

ol,
ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

ul.menu {
  display: flex;
  gap: 1rem;
}

ul.menu > li {
  position: relative;
}

ul.menu > li > a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--header-text);
}

/* Sous-menu dropdown */
ul.menu li ul.dropdown {
  padding: 0.5rem;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  border: 1px solid var(--sidebar-border);
  width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  z-index: 100;
}

ul.menu li:hover > ul.dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

ul.menu li ul.dropdown li a {
  color: var(--text-color);
  padding: 0.5rem 1rem;
  display: block;
}

/* ============================ */
/*        Menu Mobile           */
/* ============================ */
.menu-toggle {
  /* On masque le menu hamburger sur mobile */
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: var(--header-text);
  margin: 4px 0;
  transition: 0.3s;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================ */
/*           Sidebar            */
/* ============================ */
#sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  padding: 1rem;
  border-right: 1px solid var(--sidebar-border);
  position: sticky;
  top: 4rem;
  height: calc(100vh - 4rem);
}

#sidebar h3 {
  margin-bottom: 0.75rem;
}

#sidebar ul {
  list-style: none;
  padding: 0;
}

#sidebar ul li {
  margin-bottom: 0.5rem;
}

#sidebar ul li a {
  display: block;
  padding: 0.5rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 3px;
  transition: background 0.3s ease;
}

#sidebar ul li a:hover {
  background: var(--primary-hover);
}

/* ============================ */
/*      Layout: Sidebar + Main  */
/* ============================ */
.container {
  display: flex;
  max-width: 1200px;
  margin: 2rem auto;
  gap: 1.5rem;
  padding: 0 20px;
}

main {
  flex: 1;
}

/* ============================ */
/*           Tableaux           */
/* ============================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

table,
th,
td {
  border: 1px solid var(--sidebar-border);
}

th,
td {
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: var(--table-bg);
}

/* ============================ */
/*           Boutons            */
/* ============================ */
.boutique-btn,
.solde-btn {
  display: inline-block;
  background-color: var(--btn-bg);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 1.1em;
  margin: 1rem 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.boutique-btn:hover,
.solde-btn:hover {
  background-color: var(--btn-hover-bg);
  color: #000;
}

/* ============================ */
/*           Footer             */
/* ============================ */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  padding: 1rem;
  margin-top: 20px;
}

footer a {
  color: var(--footer-text);
  margin: 0 5px;
  font-size: 1.2em;
}

.footer-links {
  margin-top: 10px;
}

/* ============================ */
/*      Bouton Retour en Haut   */
/* ============================ */
#back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  cursor: pointer;
  display: none;
  transition: opacity 0.3s ease;
}

#back-to-top:hover {
  background: var(--primary-hover);
}
/* Section Éthylotest */
#ethylotest {
  text-align: center;
  padding: 30px;
  margin: 30px auto;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
#ethylotest h2 {
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #333;
}
#ethylotest img {
  max-height: 250px;
  width: auto;
  margin: 0 auto 20px;
  display: block;
}
#ethylotest p {
  font-size: 1em;
  color: #555;
  margin: 15px 0;
}
#ethylotest a.boutique-btn {
  display: inline-block;
  background-color: #FF9900;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-size: 1em;
  margin-top: 10px;
  transition: background-color 0.3s ease;
}
#ethylotest a.boutique-btn:hover {
  background-color: #e68a00;
}

/* Centrage horizontal responsive du conteneur PayPal */
#paypal-container-KCVKV43WZWW44 {
  display: inline-block;
  max-width: 80%;
}

/* S'assurer que le parent aligne son contenu au centre */
#paypal-container-KCVKV43WZWW44-wrapper {
  text-align: center;
  width: 100%;
}

.elfsight-app-7b3b3b7b-7b3b-4b3b-8b3b-7b3b3b7b3b3b {
  margin: 0 auto;
  max-width: 100%;
}

/* ============================ */
/*    Conteneur Responsive      */
/* ============================ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 15px;
}

/* ============================ */
/*  Sticky CTA pour l'éthylotest */
/* ============================ */
#sticky-ethylotest {
  position: fixed;
  top: 10%;
  right: 20px;
  width: 250px;
  background-color: var(--section-bg);
  border: 1px solid #ddd;
  padding: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  text-align: center;
}

#sticky-ethylotest img {
  width: auto;
  height: 150px;

  margin-bottom: 10px;
}

/* Container général de la FAQ */
.faq-container {
  max-width: var(--faq-container-max-width);
  margin: 0 auto;
  padding: var(--faq-container-padding);
}

/* Titre de chaque catégorie FAQ */
.faq-category h2 {
  font-size: var(--faq-category-title-font-size);
  margin-top: var(--faq-category-title-margin-top);
  margin-bottom: var(--faq-category-title-margin-bottom);
  color: var(--faq-category-title-color);
}

/* Section individuelle de chaque question/réponse */
.faq-section {
  margin-bottom: var(--faq-section-margin-bottom);
}

/* Style de la question */
.faq-question {
  background: var(--faq-question-bg);
  padding: var(--faq-question-padding);
  cursor: var(--faq-question-cursor);
  font-weight: var(--faq-question-font-weight);
  border-radius: var(--faq-question-border-radius);
  transition: var(--faq-question-transition);
}

/* Effet de survol sur la question */
.faq-question:hover {
  background: var(--faq-question-hover-bg);
}

/* Style de la réponse, cachée par défaut */
.faq-answer {
  max-height: var(--faq-answer-max-height);
  overflow: hidden;
  transition: var(--faq-answer-transition);
  padding: var(--faq-answer-padding);
}

/* Réponse déployée lorsque la section est active */
.faq-section.active .faq-answer {
  max-height: var(--faq-answer-active-max-height);
  padding: var(--faq-answer-active-padding);
}

/* Style global de la section Produits Affiliés */
.affiliate-products {
  background-color: var(--affiliate-bg-color);
  padding: var(--affiliate-padding);
  margin: var(--affiliate-margin);
  border-radius: var(--affiliate-border-radius);
  font-family: 'Roboto', sans-serif;
}
.affiliate-products header {
  text-align: center;
  margin-bottom: 20px;
}
.affiliate-products h2 {
  color: var(--affiliate-header-color);
  font-size: 1.8em;
  margin-bottom: 10px;
}
.affiliate-disclosure {
  font-size: var(--affiliate-disclosure-font-size);
  color: var(--affiliate-disclosure-color);
}

/* Mise en page de la liste des produits */
.product-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--product-list-gap);
  justify-content: center;
}

/* Style de chaque produit */
.product {
  background-color: var(--product-bg-color);
  border: var(--product-border);
  border-radius: var(--product-border-radius);
  padding: var(--product-padding);
  width: var(--product-width);
  text-align: var(--product-text-align);
  box-shadow: var(--product-box-shadow);
  transition: transform 0.2s ease;
}
.product:hover {
  transform: translateY(-3px);
}
.product img {
  max-height: 200px;
  width: auto;
  
  border-bottom: var(--product-img-border-bottom);
  padding-bottom: var(--product-img-padding-bottom);
}
.product h3 {
  font-size: var(--product-title-font-size);
  color: var(--product-title-color);
  margin: 10px 0;
}
.product .price {
  font-size: var(--product-price-font-size);
  font-weight: var(--product-price-font-weight);
  color: var(--product-price-color);
}

/* Bouton d'appel à l'action, si utilisé en interne */
.affiliate-products .cta-btn {
  display: inline-block;
  background-color: var(--cta-bg-color);
  color: var(--cta-color);
  padding: var(--cta-padding);
  border-radius: var(--cta-border-radius);
  font-size: var(--cta-font-size);
  text-transform: var(--cta-text-transform);
  text-decoration: none;
  margin-top: 15px;
}
/* === Styles pour le Carousel === */
.carousel-section {
  margin: 30px auto;
  max-width: 800px;
  position: relative;
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-slide {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide img {
  width: 100%;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

/* Adaptation responsive */
@media screen and (max-width: 600px) {
  .carousel-btn {
    padding: 8px;
  }
}


/* ============================ */
/*          Responsive          */
/* ============================ */
/* Adaptation responsive */
@media screen and (max-width: 600px) {
  .product-list {
    flex-direction: column;
    align-items: center;
  }
  .product {
    width: 90%;
  }
}

@media (max-width: 1024px) {
  /* Ajustements de typographie ou marges si souhaité */
  #mobile-menu-toggle {
    display: none;
  }
  #sticky-ethylotest {
    width: 150px;
    top: 60%;
    right: 20px;
    height: 300px;
  }
  #sticky-ethylotest img {
    width: auto;
    height: 100px;

    margin-bottom: 10px;
  }
  header {
    display: flex;
    height: 50px;
  }
  body,
  p {
    text-align: justify;
  }
  body {
    font-size: 0.7em;

    max-width: 100%;
  }
  .fade-section {
    top: 500px;
    font-size: 1.2em;
    justify-content: center;
    margin: auto;
    width: 95%;
    margin-bottom: 10px;
  }
  .container {
    padding: 0;
    flex-direction: column;
  }
  #sidebar {
    text-align: center;
    width: 100%;
    font-size: 0.6em;
    border-right: none; /* On retire la bordure à droite */
    border-bottom: 1px solid var(--sidebar-border); /* On ajoute une bordure inférieure */
    position: sticky;
    top: 0;
    height: auto;
    padding: 0.5rem; /* Ajustement du padding pour une barre plus compacte */

    /* Passage en mode horizontal */
    display: inline;
    align-items: center;
    justify-content: space-around;
    z-index: 1000; /* Répartit les éléments sur toute la largeur */
  }
  #sidebar h3 {
    display: none;
  }
  #sidebar ul {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    width: 100%;
  }
  #sidebar ul li {
    margin: 0;
  }
  /* Réduction de la taille de police dans les tableaux */
  table,
  th,
  td {
    font-size: 0.8em;
  }
  .footer {
    font-size: 1.5em;
    z-index: 2000;
  }
  /* Réduction de la taille des images pour mieux s'adapter à l'écran mobile */
  img {
    max-width: 90%;
  }

  /* Conserver la disposition horizontale du menu */
  ul.menu {
    flex-direction: row;
    gap: 1rem;
    width: auto;
  }

  ul.menu > li > a {
    padding: 0.5rem 1rem;
  }
  ul.menu li ul.dropdown li a {
    padding: 0.5rem 1rem;
  }

  /* La sidebar reste visible en mobile, on ne masque pas #sidebar */

  /* Masquer le menu hamburger */
  .menu-toggle {
    display: none;
  }

  /* Rétablissement des tailles de titres (identiques au desktop) */
  h1 {
    font-size: 1.6em;
  }
  h2 {
    font-size: 1.3em;
    text-align: left;
    margin: 1rem 0;
  }
  h3 {
    font-size: 1em;
  }

  /* Prévenir le débordement en forçant le rétrécissement si besoin */
  .container,
  #sidebar,
  main {
    flex-shrink: 1;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
  ul.menu > li > a {
    padding: 0.5rem 0.75rem;
  }
}

@media (orientation: landscape) and (max-width: 1024px) {
  #sticky-ethylotest {
    top: 10%;
  }
}
/* Adaptations responsives */
@media screen and (max-width: 600px) {
  .faq-question {
    font-size: 16px;
  }
  .faq-answer {
    font-size: 14px;
  }
}
