:root {
  --color-bg: linear-gradient(to bottom, #e6faff, #fdf6e3);
  --color-primary: #009688;
  --color-accent: #ff7043;
  --color-light: #fffef9;
  --text-color: #222;
  --danger: #e53935;       /* rouge hibiscus */
  --danger-hover: #c62828; /* rouge foncé au hover */
}

/* ====== Base ====== */
body {
  margin: 0;
  padding: 0 15px;
  font-family: 'Fredoka', sans-serif;
  background: var(--color-bg);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  background: var(--color-light);
  border-radius: 24px;
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
  padding: 40px 30px;
  max-width: 800px;
  width: 100%;
  text-align: center;
  border: 2px solid #cdeae5;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 0.4em;
  color: var(--color-primary);
}

p { font-size: 1.1rem; margin-bottom: 2em; }

/* ====== Search Input ====== */
.search-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.input-wrapper {
  display: flex;
  width: 100%;
  max-width: 500px;
  border: 2px solid var(--color-accent);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  border-radius: 16px; /* container */
}

.input-wrapper input {
  flex: 1;
  padding: 1em 1.2em;
  font-size: 1rem;
  border: none;
  outline: none;
  color: var(--text-color);
  border-radius: 12px 0 0 12px; /* arrondi gauche uniquement */
}

.input-wrapper input::placeholder { color: #aaa; }

/* ====== Bouton du champ (à droite seulement) ====== */
.input-wrapper button {
  position: relative;
  overflow: hidden;
  background: var(--color-accent);
  border: none;
  color: #fff;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s ease;
  padding: 0.9em 1.4em;
  border-radius: 0 12px 12px 0; /* arrondi droit uniquement */
}
.input-wrapper button:hover { background: #ff5722; }

/* Effet de lumière glassy (champ + actions) */
.input-wrapper button::after,
.actions button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.2) 0%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0.2) 100%
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.input-wrapper button:hover::after,
.actions button:hover::after { left: 125%; }

/* ====== Résultats ====== */
#resultat {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 30px 0 10px;
  min-height: 3.5rem;
  line-height: 1.4;
  transition: all 0.3s ease;
  text-align: center;
}
.result-visible { animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== Actions ====== */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.actions[hidden] { display: none !important; }

.actions button {
  position: relative;
  overflow: hidden;
  background-color: var(--color-primary);
  color: #fff;
  padding: 10px 15px;
  font-size: 1rem;
  border: none;
  border-radius: 12px;  /* tous à 12px */
  transition: background 0.3s ease;
}
.actions button:hover { background-color: #00796b; }

/* Bouton "Signaler" en rouge via classe dédiée (plus robuste qu’un nth-child) */
.actions .btn-signal { background-color: var(--danger); }
.actions .btn-signal:hover { background-color: var(--danger-hover); }

/* ====== Footer ====== */
footer { margin-top: 40px; font-size: 0.8rem; opacity: 0.7; }
#google-ads { margin-bottom: 20px; }

.footer-links {
  margin-top: 10px;
  font-size: 0.75rem;
  opacity: 0.6;
}
.footer-links a {
  color: inherit;
  text-decoration: none;
  margin: 0 4px;
}
.footer-links a:hover { text-decoration: underline; }

/* ====== Accessibilité ====== */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  #resultat { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .input-wrapper {
    flex-direction: column;
    border-radius: 14px;
  }
  .input-wrapper input {
    border-radius: 14px 14px 0 0;
    text-align: center;
  }
  .input-wrapper button {
    border-radius: 0 0 10px 10px;
    width: 100%;
  }
  #resultat { font-size: 1.4rem; }
}
