* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #eef2f5;
  color: #1f2933;
}

.app {
  width: min(1000px, 92%);
  margin: 10px auto;
}

.header {
  background: #15324a;
  color: white;
  padding: 28px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.header h1 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.header p {
  margin: 0;
  opacity: 0.85;
}

.panel,
.resultat {
  background: white;
  padding: 22px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.panel h2 {
  margin-top: 0;
}

.buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  background: #dce6ee;
  color: #15324a;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.95);
}

#serviceActif {
  margin-bottom: 0;
  font-weight: bold;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stats div {
  background: white;
  padding: 18px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.stats span {
  display: block;
  font-size: 1.7rem;
  font-weight: bold;
  color: #15324a;
}

.stats small {
  color: #667085;
  padding-bottom: 10px;
  display: block;
}

.generate {
  width: 100%;
  background: #15324a;
  color: white;
  font-size: 1.2rem;
  padding: 18px;
  margin-bottom: 20px;
}

.recette h2 {
  margin-top: 0;
}

.badge {
  display: inline-block;
  padding: 8px 12px;
  background: #f0f4f8;
  border-left: 5px solid #15324a;
  border-radius: 8px;
  font-weight: bold;
  margin-bottom: 18px;
}

ol {
  padding-left: 22px;
}

li {
  margin-bottom: 10px;
  line-height: 1.45;
}

.result-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  margin-top: 18px;
}

.empty {
  color: #667085;
  font-style: italic;
}


@media (max-width: 700px) {
  .app {
    width: 94%;
    margin: 14px auto;
  }

  .header {
    padding: 20px;
  }

  .header h1 {
    font-size: 1.45rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .buttons {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .generate {
    font-size: 1rem;
  }
}

.extra-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.info-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  border-left: 5px solid #15324a;
  margin-bottom: 20px;
}

.info-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.info-card p {
  margin: 0;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .extra-info {
    grid-template-columns: 1fr;
  }
}

#imaginationOverlay {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.4);

    opacity: 0;
    visibility: hidden;

    z-index: 99999;

    pointer-events: none;
}

#imaginationOverlay img {
    width: min(90vw, 900px);
    max-height: 90vh;

    transform: scale(0.5);
}

#imaginationOverlay.imagination-active {
    visibility: visible;
    opacity: 1;
}

#imaginationOverlay.imagination-active img {
    animation: imaginationZoom 2.5s ease;
}

.imagination-active img {
    animation: imaginationZoom 2.5s ease;
}

.back-link {
    display: inline-block;
    margin-bottom: 15px;
    color: #555;
    text-decoration: none;
}

.go-back{
  display: block;
  text-align: center;
  margin-top: 20px;
}

@keyframes imaginationZoom {

    0% {
        transform: scale(0.3);
    }

    20% {
        transform: scale(1);
    }

    80% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.8);
    }
}