* {
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  min-height: 100vh;
  background: linear-gradient(to bottom right, #fff5f9 50%, #ffdce9 100%);
}

a:link,
a:visited {
  color: inherit;
}

/* Début du Header */

/* Gestion taille et aspect global du header */

.header-form {
  background-color: rgb(255, 255, 255);
  position: relative;
  height: 80px;
  top: 0;
  border-bottom: 1px solid #ffc3d8;
  box-shadow: 2px 2px rgba(0, 0, 0, 0.2);
}

header > * {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 30px 0 30px;
}

/* Gestion du menu de navigation */

.menu a:hover:not(#historique-active) {
  border: 2px solid transparent;
  background-color: #fed6e6d0;
  padding: 0.4rem 0.8rem;
}

#historique-active {
  background: linear-gradient(135deg, #ff5f95, #ff758c);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
}

.menu {
  right: 0;
  text-decoration: none;
}

.menu-text {
  color: #495871;
  font-family: "Poppins";
  font-size: 18px;
  margin: 5px;
  font-weight: 600;
  display: inline-block;
  list-style: none;
}

.menu a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  border: 2px solid transparent;
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
}

.menu-icon {
  width: 22px;
  height: 22px;
  display: block;
}

/* Fin du Header */

/* Début Main Page */

.main-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: center;
  margin: 40px auto 0;
  width: 80%;
  gap: 20px;
  color: #2e2e2e;
  font-family: "Poppins", sans-serif;
}

/* Gestion des rectangles */

/* Section stats */
.stats-section {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 40px;
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 150, 190, 0.4);
  border-radius: 16px;
  padding: 22px 34px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(255, 120, 160, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(255, 120, 160, 0.4);
}

.stat-number {
  font-size: clamp(1.7rem, 3vw + 0.5rem, 3rem);
  font-weight: 800;
  color: #ff447a;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 1rem;
  color: #4b5563;
  font-weight: 600;
}

/* Titre Historique */
.history-title {
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.3rem, 3vw + 0.4rem, 2.2rem);
  font-weight: 700;
  background: linear-gradient(90deg, #f472b6, #ec4899, #db2777);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 20px;
  margin-bottom: 25px;
}

/* Liste cartes cadeau */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(600px, 90%);
  margin: 0 auto;
}

/* Carte cadeau style polaroid */
.history-card {
  background: #ffffff;
  border: 1px solid #ffc3d8;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease;
}

.history-card:hover {
  transform: translateY(-6px);
}

.history-emoji {
  font-size: 1.7rem;
}

.history-name {
  font-weight: 600;
  font-size: 1.2rem;
  flex-grow: 1;
  color: #333;
}

.history-date {
  font-size: 0.9rem;
  font-weight: 500;
  color: #666;
}

.new-card {
  animation: pop-in 0.6s ease forwards;
  box-shadow: 0 0 0px 0 rgba(255, 92, 153, 0.5);
}

.gift-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #ff5f95; /* Rose assorti */
  margin-right: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

@keyframes pop-in {
  0% {
    transform: scale(0.6);
    opacity: 0;
    box-shadow: 0 0 0px 0 rgba(255, 92, 153, 0.5);
  }
  60% {
    transform: scale(1.08);
    opacity: 1;
    box-shadow: 0 0 20px 6px rgba(255, 92, 153, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }
}

/* Footer */

footer {
  margin-top: 30px;
  position: relative;
  width: 100%;
  height: 60px;
  background-color: white;
  border-top: 1px solid #ffc3d8;
  box-shadow: 0 px 5px rgba(0, 0, 0, 0.2);
}

.footer-text {
  font-size: 20px;
  font-weight: 600;
  background: linear-gradient(90deg, #f472b6, #ec4899, #db2777);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 20px;
  text-align: center;
}

/* Mobile */
@media screen and (max-width: 600px) {
  .stats-section {
    flex-direction: column;
    align-items: center;
  }

  .history-card {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Gestion responsive */

@media screen and (max-width: 700px) {
  /* Gestion du header  */

  .menu .menu-label {
    display: none;
  }

  .menu a {
    gap: 0.25rem;
  }

  header > a {
    font-size: 18px;
  }
}
