:root {
  --space: 1rem;
  --bg: #09090b;
  --fg: #fffafa;
  --surface-1: #101012;
  --surface-2: #27272a;
  --surface-3: #52525b;
  --ease-out: cubic-bezier(0.5, 1, 0.89, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  color: var(--fg);
  background: var(--bg);
  padding: var(--space);
  min-height: 100vh;
}

/* Disposition du logo */
.icon-container {
  text-align: center; /* Centre le contenu horizontalement */
  margin: 10px 0; /* Petite marge en haut et en bas */
}

.icon-container svg {
  display: inline-block; /* Pour que le SVG soit centré */
  fill: none; /* On masque le remplissage pour mettre en valeur le contour */
  stroke: #ffffff; /* Couleur blanche pour le contour */
  stroke-width: 25; /* Épaisseur du contour */
}

/* Disposition de la grille principale */
main {
  display: grid;
  grid-template-columns: repeat(var(--count, 1), 1fr);
  gap: var(--space);
  margin: auto;
  inline-size: min(var(--max, 5rem), 100%);
}

@media (min-width: 25rem) {
  main {
    --count: 3;
    --max: 30rem;
  }
}

@media (min-width: 35rem) {
  main {
    --count: 4;
    --max: 40rem;
  }
}

/* Carte (rectangle) */
.card {
  position: relative;
  width: 160px;
  aspect-ratio: 1/1;
  border: 1px solid var(--surface-2);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 200ms var(--ease-out);
  user-select: none;
}

/* Pseudo-éléments pour l'effet d'arrière-plan */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at bottom left,
    transparent 55%,
    var(--surface-1)
  );
  pointer-events: none;
  box-shadow: var(--bg) -0.5cqi 0.5cqi 2.5cqi inset;
  transition: opacity 900ms var(--ease-out);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--bg), transparent 65%);
  opacity: 0;
  transition: opacity 800ms var(--ease-out);
}

/* Pixel-canvas en arrière-plan */
.card pixel-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Conteneur pour l'icône et le label */
.card .content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Style de l'icône SVG */
.card .content svg {
  width: 30%;
  height: auto;
  cursor: pointer;
  color: var(--surface-3);
  transition: 300ms var(--ease-out);
  transition-property: color, transform;
}

/* Style des icônes Font Awesome */
.card .content i {
  font-size: 48px;
  cursor: pointer;
  color: #52525b; /* affichées en blanc par défaut */
  transition: 300ms var(--ease-out);
  transition-property: color, transform;
}

/* Style du label sous l'icône */
.card .content .label {
  margin-top: 8px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--surface-3);
  transition: 300ms var(--ease-out);
  text-decoration: none;
  font-family: "Arial", serif;
}

/* Au survol ou au focus, icônes (SVG et Font Awesome) et label changent de couleur et grossissent */
.card:hover .content svg,
.card:hover .content i,
.card:hover .content .label,
.card:focus-within .content svg,
.card:focus-within .content i,
.card:focus-within .content .label {
  color: var(--active-color, var(--fg));
  transform: scale(1.1);
  transition: 300ms var(--ease-in-out);
}

/* Changement de bordure au survol/focus */
.card:hover,
.card:focus-within {
  border-color: var(--active-color, var(--fg));
  transition: border-color 800ms var(--ease-in-out);
}

.card:hover::before,
.card:focus-within::before {
  opacity: 0;
}

.card:hover::after,
.card:focus-within::after {
  opacity: 1;
}

/* Supprime le soulignement pour tous les liens */
a {
  text-decoration: none;
}

/* Styles du conteneur de recherche */
.search-container {
  margin: 20px 0;
  text-align: center;
}

.search-container form {
  display: inline-block;
}

.search-container input[type="text"] {
  background: var(--bg);
  border: 1px solid #52525b;
  color: var(--fg);
  padding: 0.5rem;
  outline: none;
  width: 200px;
}

.search-container select {
  background: var(--bg);
  border: 1px solid #52525b;
  color: var(--fg);
  padding: 0.3rem;
  margin-right: 0.5rem;
  outline: none;
}

.search-container button {
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border: 1px solid #52525b;
  color: var(--fg);
  cursor: pointer;
}

/* Styles du formulaire de mise à jour du planning */
.planning-container {
  margin-top: 20px; /* marge réduite */
  text-align: center;
  font-size: 0.7rem; /* taille de police globale réduite */
}

.planning-container form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* espacement réduit entre les éléments */
}

.planning-container input[type="text"] {
  background: var(--bg);
  border: 1px solid #52525b;
  color: var(--fg);
  padding: 0.2rem 0.4rem; /* padding réduit */
  font-size: 0.6rem;
  outline: none;
  width: 200px; /* largeur ajustée selon vos besoins */
}

.planning-container button {
  padding: 0.2rem 0.7rem; /* padding réduit */
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  color: var(--fg);
  font-size: 0.6rem;
  cursor: pointer;
}

.last-update {
  margin-top: 5px;
  font-family: "Arial", serif;
  font-size: 0.75rem;
  color: var(--surface-3);
}
