/* ============================= */
/* CARTE GARDE */
/* ============================= */

.garde-popup {
  width: 430px;
  max-width: calc(100vw - 40px);

  overflow: hidden;
  background: #fff;
  border-radius: 24px;

  font-family: "Roboto", sans-serif;

  box-shadow: 0 18px 45px rgba(35, 25, 85, 0.16);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.garde-popup:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 28px 65px rgba(35, 25, 85, 0.24);
}

/* ============================= */
/* IMAGE VIOLETTE */
/* ============================= */

.garde-popup-header {
    width: 100%;
    height: 160px;   /* identique aux Horaires */
    overflow: hidden;
}

.garde-popup-header img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;

    transition:transform .45s ease;
}

.garde-popup:hover .garde-popup-header img{
    transform:scale(1.05);
}

/* ============================= */
/* CONTENU */
/* ============================= */

.garde-popup-content {
  padding: 18px;
}

.garde-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  text-align: left;
}

.garde-divider {
  width: 2px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #ddd2fb;
}

.garde-heading h3 {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.2;
  color: #33245f;
}

.garde-heading p {
  margin: 2px 0 0;
  font-family: "Roboto", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.25;
  color: #74828c;
}

.garde-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f0ecff;
  color: #6149c8;
}

.garde-icon i {
  font-size: 1.8rem;
  line-height: 1;
}

/* ============================= */
/* MINI CALENDRIER GARDE */
/* ============================= */

.garde-calendar-mini {
  margin-bottom: 18px;
}

.mini-calendar {
  padding: 16px;

  border: 1px solid #e8e2fa;
  border-radius: 18px;

  background: #faf9ff;
}

/* EN-TÊTE */

.mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 14px;
}

.garde-popup {
  cursor: pointer;
}

.garde-popup:focus-visible {
  outline: 3px solid rgba(101, 73, 199, 0.35);
  outline-offset: 4px;
}

.garde-popup .mini-calendar {
  user-select: none;
}

.mini-calendar-header h3 {
  margin: 0;

  text-align: center;

  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 800;

  color: #33245f;
}

.mini-calendar-header button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  padding: 0;

  border: 1px solid #ded7f7;
  border-radius: 50%;

  background: #fff;
  color: #6549c7;

  cursor: pointer;

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

.mini-calendar-header button:hover {
  background: #6549c7;
  border-color: #6549c7;
  color: #fff;

  transform: scale(1.06);
}

.mini-calendar-header button i {
  font-size: 0.9rem;
}

/* GRILLE */

.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.mini-calendar-grid > div {
  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 0;
  min-height: 34px;

  border-radius: 10px;

  font-family: "Roboto", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;

  color: #4d4460;
}

.mini-calendar-day-name {
  min-height: 28px;

  font-size: 0.72rem;
  font-weight: 800;

  color: #8a8199;
}

.mini-calendar-day {
  background: #fff;
  border: 1px solid #eee9f8;
}

.mini-calendar-day:hover{
    background:#fff;
    border:1px solid #eee9f8;
    color:#4d4460;
    cursor:default;
    transform:none;
    box-shadow:none;
}

.mini-calendar-day{
    cursor:default;
    pointer-events:none;
}

.mini-garde-day{
    pointer-events:none;
}

/* JOUR DE GARDE */

.mini-calendar-day.mini-garde-day {
  background: linear-gradient(135deg, #4f36b8, #7a5ce0);
  border-color: transparent;

  color: #fff;

  box-shadow: 0 6px 16px rgba(101, 73, 199, 0.24);
}

.mini-calendar-empty {
  background: transparent;
  border: 0;
}

/* ============================= */
/* CARTE GARDE — VERSION PAGE */
/* ============================= */

.garde-page-version {
  width: 100%;
  max-width: none;

  cursor: default;
}

.garde-page-version:hover {
  transform: none;

  box-shadow:
    0 18px 45px rgba(35, 25, 85, 0.16);
}

.garde-page-version .garde-popup-header {
  height: 160px;
}

.garde-page-version .garde-popup-content {
  padding: 0;
}

.garde-page-version .garde-title {
    padding: 28px 30px 12px;
}

.garde-page-version .calendar-card {
  margin: 0;
  padding: 0 30px 24px;
  border: 0;
  box-shadow: none;
}

.garde-page-version .full-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.garde-page-version .full-calendar-grid > div {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 50px;

  border-radius: 16px;

  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.garde-page-version .calendar-day-name {
  min-height: 40px;

  color: #7c748e;
  font-size: 0.9rem;
  font-weight: 800;
}

.garde-page-version .calendar-day {
  border: 1px solid #e8e2fa;

  background: #fff;
  color: #33245f;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.garde-page-version .calendar-day:hover {
  transform: translateY(-2px);

  border-color: #cfc4f4;

  box-shadow:
    0 8px 18px rgba(101, 73, 199, 0.10);
}

.garde-page-version .garde-day {
  border-color: transparent;

  background:
    linear-gradient(
      135deg,
      #4f36b8,
      #7657dc
    );

  color: #fff;

  box-shadow:
    0 8px 18px rgba(101, 73, 199, 0.22);
}

.garde-page-version .is-today:not(.garde-day) {
  border: 2px solid #6549c7;
  color: #6549c7;
}

.garde-page-version .calendar-empty {
  background: transparent;
  border: 0;
}

/* ============================= */
/* INDICE VISUEL CARTE CLIQUABLE */
/* ============================= */

.garde-popup-wrapper.active .garde-arrow {
  animation: gardeArrowHalo 4s ease-in-out infinite;
}

.garde-popup-wrapper.active .garde-arrow i {
  animation: gardeArrowMove 4s ease-in-out infinite;
}

@keyframes gardeArrowHalo {
  0%, 50%, 100% {
    box-shadow: 0 0 0 0 rgba(101,73,199,0);
  }
  56% {
    box-shadow: 0 0 0 12px rgba(101,73,199,.20);
  }
  60% {
    box-shadow: 0 0 0 6px rgba(101,73,199,.10);
  }
}

@keyframes gardeArrowMove {
  0%, 50%, 100% {
    transform: translateX(0);
  }
  56% {
    transform: translateX(9px);
  }
  60% {
    transform: translateX(5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .garde-popup-wrapper.active .garde-arrow,
  .garde-popup-wrapper.active .garde-arrow i {
    animation: none;
  }
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 700px) {

  .garde-page-version .garde-popup-content {
    padding: 24px 18px;
  }

  .garde-page-version .full-calendar-grid {
    gap: 7px;
  }

  .garde-page-version .full-calendar-grid > div {
    min-height: 42px;
    border-radius: 11px;
    font-size: 0.84rem;
  }

  .garde-page-version .calendar-day-name {
    min-height: 30px;
    font-size: 0.72rem;
  }
}

@media (max-width: 520px) {

  .mini-calendar {
    padding: 12px;
  }

  .mini-calendar-header {
    grid-template-columns: 38px 1fr 38px;
    margin-bottom: 12px;
  }

  .mini-calendar-header button {
    width: 38px;
    height: 38px;
  }

  .mini-calendar-grid {
    gap: 4px;
  }

  .mini-calendar-grid > div {
    min-height: 30px;
    font-size: 0.76rem;
  }

  .mini-calendar-day-name {
    font-size: 0.66rem;
  }
}

@media (max-height: 850px) {

  .mini-calendar {
    padding: 12px;
  }

  .mini-calendar-header {
    margin-bottom: 10px;
  }

  .mini-calendar-header button {
    width: 36px;
    height: 36px;
  }

  .mini-calendar-grid {
    gap: 4px;
  }

  .mini-calendar-grid > div {
    min-height: 28px;
    font-size: 0.75rem;
  }
}

/* ============================= */
/* BOUTON DU BAS */
/* ============================= */

.garde-bottom-button{
    display:flex;
    justify-content:flex-end;
    align-items:flex-end;

    margin-top:20px;
    padding:0;

    background:transparent;
    border:none;
    min-height:0;

    text-decoration:none;
}

/* ============================= */
/* FLÈCHE */
/* ============================= */

.garde-arrow {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 58px;
  height: 58px;
  flex-shrink: 0;

  border: 3px solid #6549c7;
  border-radius: 50%;

  background: transparent;

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

.garde-arrow i {
  font-size: 1.8rem;

  color: #6549c7;

  transition: color 0.3s ease;
}

.garde-bottom-button:hover .garde-arrow,
.garde-popup:hover .garde-arrow {
  background: #6549c7;
  border-color: #6549c7;
}

.garde-bottom-button:hover .garde-arrow i,
.garde-popup:hover .garde-arrow i {
  color: #fff;
}

.garde-page-version .garde-heading p {
    display: none;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 700px) {
  .garde-popup-header {
    height: 130px;
  }
}

@media (max-width: 520px) {
  .garde-popup {
    width: calc(100vw - 32px);
  }

  .garde-popup-header {
    height: 130px;
  }

  .garde-popup-content {
    padding: 16px;
  }

  .garde-calendar-placeholder {
    min-height: 190px;
  }

  .garde-bottom-button {
    min-height: 0;
    padding: 0;
  }

  .garde-bottom-left img {
    width: 54px;
    height: 54px;
  }

  .garde-arrow {
    width: 52px;
    height: 52px;
  }
}

@media (max-height: 850px) {
  .garde-popup-header {
    height: 105px;
  }

  .garde-popup-content {
    padding: 12px 16px 14px;
  }

  .garde-title {
    gap: 12px;
    margin-bottom: 12px;
  }

  .garde-icon {
    width: 58px;
    height: 58px;
  }

  .garde-icon i {
    font-size: 1.6rem;
  }

  }

/* ============================= */
/* NOTE D'INFORMATION — VERSION PAGE */
/* ============================= */

.garde-page-version .garde-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  margin: 0 30px 24px;
  padding: 14px 16px;

  border: 1px solid #e8e2fa;
  border-radius: 12px;

  background: #faf9ff;
  color: #4d4460;
}

.garde-page-version .garde-note i {
  margin-top: 2px;

  color: #6549c7;
  font-size: 1rem;
}

.garde-page-version .garde-note p {
  margin: 0;

  font-size: 0.88rem;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .garde-page-version .garde-note {
    margin: 0 18px 20px;
  }
}

/* =============================
   LIEN CARTE GARDE
============================= */

.garde-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.garde-card-link:hover,
.garde-card-link:focus,
.garde-card-link:visited {
  text-decoration: none;
  color: inherit;
}