/* ========================================
   Base couleurs pastel TDAH Ensemble
======================================== */
:root {
  --mint: #a8e6cf;
  --coral: #ffaaa5;
  --yellow: #ffd3b6;
  --bg-light: #f7f9f7;
  --text-dark: #4a4a4a;
  --text-light: #7e7e7e;
  --footer-bg: #4a4a4a;
}

* {
  text-decoration: none !important;
}

/* ========================================
   Accordéons
======================================== */

.accordion-button {
  background-color: var(--yellow);
  color: black;
  font-weight: 500;
}

.accordion-button:not(.collapsed) {
  background-color: #8ed5b2;
  color: black;
}

.accordion-body {
  background-color: var(--bg-light); /* corps clair */
  padding: 1rem;
}

.accordion-item {
  border: none;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}
.accordion-button:focus,
.accordion-button.collapsed:focus,
.accordion-button:focus-visible,
.accordion-button.collapsed:focus-visible {
  outline: 3px solid #4a4a4a !important;
  outline-offset: -3px !important;
  box-shadow: 0 0 0 3px rgba(74, 74, 74, 0.4) !important;
}

/* ========================================
   Body et container
======================================== */
body {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

.min-vh-100 {
  min-height: 0vh !important;
}

/* ========================================
   Navbar
======================================== */
.navbar {
  background-color: var(--mint) !important;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.navbar .nav-link {
  font-weight: 500;
}

.navbar .navbar-brand h1 {
  color: white;
  font-weight: 600;
  margin-left: 10px;
}

/* ========================================
   Buttons
======================================== */
.btn-primary,
.btn-outline-success,
.btn-outline-dark,
.btn-outline-primary,
.btn-success {
  background-color: var(--mint);
  border-color: var(--mint);
  color: black;
}

.btn-primary:hover,
.btn-primary:active,
.btn-outline-success:hover,
.btn-outline-dark:hover,
.btn-outline-primary:hover {
  background-color: #8ed5b2;
  border-color: #8ed5b2;
}

.btn-danger,
.btn-warning {
  background-color: var(--coral);
  border-color: var(--coral);
  color: black;
}

.btn-success:hover,
.btn-warning:hover,
.btn-danger:hover {
  background-color: #ff8881;
  border-color: #ff8881;
}

.btn-secondary {
  background-color: var(--yellow);
  border-color: var(--yellow);
  color: black;
}

.btn-secondary:hover {
  background-color: #ffe29c;
  border-color: #ffe29c;
  color: black;
}

.btn-link {
  color: #6b6b6b !important;
}

.btn-link:hover {
  color: var(--mint) !important;
  text-decoration: underline;
}

.btn-fixed-width {
  min-width: 127px;
  text-align: center;
}

.btn-gris {
  background-color: #4a4a4a !important;
  border-color: #4a4a4a !important;
  color: white !important;
}
.btn-gris:hover {
  background-color: #7e7e7e !important;
  border-color: #7e7e7e !important;
  color: white !important;
}

/* ========================================
   Video Carousel (Sketch)
======================================== */
.video-carousel {
  position: relative;
  width: 100%;
  max-width: 450px;
  margin: auto;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.video-slide {
  width: 100%;
  flex-shrink: 0;
  height: 430px;
  position: relative;
}

.video-slide iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-carousel button {
  position: absolute;
  top: 45%;
  background: #ffffffcc;
  border: none;
  padding: 10px;
  font-size: 24px;
  z-index: 9999;
  cursor: pointer;
}

.prev {
  left: 10px;
}
.next {
  right: 10px;
}

/* ========================================
   Footer
======================================== */
footer {
  background-color: var(--footer-bg) !important;
  color: white;
}

.footer-link {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--yellow);
}

/* ========================================
   Cartes / sections
======================================== */
.card {
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  background-color: white;
  padding: 20px;
  margin-bottom: 1em;
}

.card-header {
  background-color: #ffd3b6;
}
/* ================================
   Styles des cartes de récompenses
=================================== */

.reward-card {
  border-radius: 12px;
  background-color: #fdebd0; /* même couleur qu'avant */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Effet au survol */
.reward-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Titre de la récompense */
.reward-title {
  margin: 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #2e2e2e;
}

/* Points */
.reward-points {
  font-weight: bold;
  margin: 0.3rem 0;
  color: #000;
}

/* Description */
.reward-description {
  font-size: 0.75rem;
  color: #333;
  margin: 0.3rem 0;
  line-height: 1.3;
}

/* Date */
.reward-date {
  font-size: 0.7rem;
  color: #555;
  margin-top: 0.2rem;
}

/* ========================================
   Titres
======================================== */

.site-title {
  padding: 0.5em;
  background-color: #a8e6cf;
  color: #4a4a4a !important;
}

h1 {
  background-color: #4a4a4a;
  color: white;
  border-radius: 7px;
}

h2 {
  background-color: #ffd3b6;
  color: #4a4a4a !important;
  border-radius: 7px;
}

h3 {
  color: #4a4a4a;
}

/* ========================================
   Tables / dashboard
======================================== */
.table thead {
  background-color: var(--mint);
  color: white;
}

.table tbody tr:hover {
  background-color: #dff4e1;
}

table td {
  word-break: break-word; /* coupe le texte long */
}

.table {
  width: 100%;
  table-layout: fixed;
  table-layout: fixed; /* optionnel, fixe les colonnes */
}

#bubble-container {
  display: flex;
  justify-content: center; /* centre horizontalement la bulle */
  align-items: flex-end; /* commence en bas */
  height: 200px;
  width: 150px;
  overflow: hidden;
  background-color: #e9f5fb;
}

#bubble {
  width: 40px; /* taille à l’expiration */
  height: 40px;
  background-color: #0dcaf0;
  border-radius: 50%;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%); /* centre horizontalement */
  transition: all 2.5s ease-in-out;
}

#exercise-gif {
  transition: opacity 0.5s ease-in-out;
}

#exercise-gif,
#laugh-gif {
  width: 100%;
  max-width: 250px;
  max-height: 250px;
  object-fit: contain;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #a8e6cf; /* vert menthe */
  padding: 10px 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  justify-content: center; /* centre le logo dans le cercle */
  overflow: hidden;
  flex-shrink: 0; /* éviter que le logo se rétrécisse */
  gap: 10px;
}

/* Centrer le menu et espacer les liens */
.navbar-nav.mx-auto {
  gap: 1rem;
  display: flex;
}

.site-logo {
  height: 80px;
  width: auto;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.site-title {
  font-size: 1.4rem;
  color: #6b6b6b;
  margin: 0;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: #6b6b6b;
  font-weight: 500;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #ffd3b6;
}

/* Bagde */

.badge {
  background-color: #ffd3b6;
  color: #4a4a4a;
}

/* Supprime le fond bleu de tous les contacts */
.contact-item {
  background-color: #4a4a4a !important;
  border: 1px solid #4a4a4a; /* optionnel pour voir les bordures */
  color: white;
}

.list-group-item.active {
  border-color: #7e7e7e;
  background-color: #7e7e7e !important;
  color: white;
}

.alert-info {
  background-color: #7e7e7e !important;
  color: white;
  border: 1px solid #a8e6cf;
}

h1,
h2,
h3,
h4,
h5,
h6,
div,
section,
button,
a,
.navbar .navbar-brand h1 {
  font-family: "Lexend", sans-serif;
  line-height: 1.6;
}

.progress-bar-dark,
.progress-bar {
  background-color: #4a4a4a !important;
}

.progress-bar {
  color: black !important;
  font-weight: bold !important;
  text-align: center !important;
}

.progress {
  background-color: #ffaaa5 !important;
}
.bg-success {
  background-color: #a8e6cf !important;
}

.bg-danger {
  background-color: #ffaaa5 !important;
}

.bg-warning {
  background-color: #ffd3b6 !important;
}

/* Fiches */
.fiche-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  background-color: #ffff;
  border: 3px solid #dee2e6; /* petite bordure gris clair */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.fiche-img:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

#ajax-urls {
  position: absolute;
}

.rounded-circle {
  border-radius: 50%;
}

.dropdown-item:hover,
.dropdown-item:active,
.dropdown-item.active {
  background-color: #a8e6cf !important;
  --bs-dropdown-link-active-bg: #a8e6cf !important;
}

/* Responsive */

/* ================================
   Tablette
=================================== */

@media (max-width: 991.98px) {
  /* Bootstrap breakpoint 'lg' */

  /* Conteneur du menu ouvert */
  .navbar-collapse {
    text-align: center; /* centre tout le texte */
    background-color: #f8f9fa; /* fond clair pour lisibilité */
    border-radius: 0 0 12px 12px; /* coins arrondis */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
  }

  /* Liens du menu */
  .navbar-nav {
    flex-direction: column !important; /* force les éléments en colonne */
    gap: 0.5rem; /* espace vertical entre chaque lien */
    align-items: center;
  }

  .navbar-nav .nav-item {
    width: 100%;
    text-align: center;
  }

  .navbar-nav .nav-link {
    display: block;
    width: 100%;
    color: #333 !important;
    transition: background-color 0.2s ease;
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link:focus {
    border-radius: 8px;
    background-color: #d4f1e2;
  }
  .site-logo {
    height: 45px;
  }

  .navbar .navbar-brand h1 {
    font-size: 1rem;
    line-height: 1;
  }

  /* Dropdown (menu parent uniquement) */
  .dropdown-menu {
    position: static !important; /* le dropdown s’affiche en colonne */
    float: none;
    background-color: #ffffff;
    text-align: center;
    border: none;
    box-shadow: none;
  }

  .dropdown-item {
    padding: 0.5rem 1rem;
  }
}

/* ================================
   Responsive Mobile
=================================== */

@media (max-width: 768px) {
  .reward-card {
    width: 100%;
    max-width: 280px;
  }

  .reward-title {
    font-size: 1.1rem;
  }

  .reward-points {
    font-size: 0.9rem;
  }

  .reward-description,
  .reward-date {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .list-group-item.d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .list-group-item .text-end {
    text-align: left !important;
    margin-top: 0.5rem;
    width: 100%;
  }

  .list-group-item .btn {
    width: auto;
    margin-top: 0.5rem;
  }
}
