* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
    background-color: #0B3861;
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    text-align: center;
}


.header {
    position: sticky;
    display: flex;
    height: 60px;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    top: 0;
    z-index: 10;
    background-color: rgba(11, 56, 97, 0.9);
    backdrop-filter: blur(4px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f0f0f0;
}

.nav ul {
    display: flex;
    list-style-type: none;
    color: #f0f0f0;
    font-size: 1em;
    gap: 1rem;
}

.nav ul li a {
    text-decoration: none;
    color: #f0f0f0;
    border-radius: 5px;
    padding: 0.5rem 1rem;   
}

.nav ul li a:hover { /* tous liens lors du survol dans la balise nav */
    color: #ffde7d; /* couleur de fond */
}

/* Container centré avec padding */
.container {
  background: linear-gradient(145deg, #f8e9f0, #ffffff);
  padding: 30px 40px;
  border-radius: 16px;
  margin: 2rem auto;
  box-shadow:  0 12px 30px rgba(0, 0, 0, 0.15);
  max-width: 420px;
  width: 90%;
  animation: floatIn 0.8s ease-out;
}

@keyframes floatIn {
  0% {
    transform: translateY(-30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

h1 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.6rem;
  font-weight: 600;
}

/* Résultat */
.result-box {
  margin-top: 25px;
  text-align: left;
  max-height: 250px;
  overflow-y: auto;
  background-color: #f9fafb;
  padding: 15px 20px;
  border-radius: 10px;
  font-family: monospace;
  font-size: 14px;
  color: #1f2937;
  border: 1px solid #e5e7eb ;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.05);
}

.result-box p {
  margin: 8px 0;
  padding: 4px 0;
  border-bottom: 1px solid #e5e7eb;
}

.result-box p:last-child {
  border-bottom: none;
}

/* Animation palindrome */
@keyframes highlightGlow {
  0%, 100% {
    background-color: #d1fae5;
    box-shadow: 0 0 12px 3px #22c55e88;
  }
  50% {
    background-color: #a7f3d0;
    box-shadow: 0 0 20px 8px #16a34aaa;
  }
}

.palindrome-success {
  animation: highlightGlow 2s ease-in-out infinite;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  font-weight: 600;
  color: #065f46;
  background-color: #d1fae5;
}

/* Formulaire en flex avec espacement */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Input nombre */
form input[type="number"] {
  padding: 12px 15px;
  margin-bottom: 20px;
  font-size: 16px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  width: 100%;
  transition: border-color 0.3s ease;
}

form input[type="number"]:focus {
  border-color: #3b82f6; /* Bleu clair */
  outline: none;
}

/* Bouton */
form button {
  padding: 12px 25px;
  background-color: #74ebd5; /* Bleu */
  color: white;
  padding: 12px 25px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: #57c9ce;
}

.btn {
    border: none;
    border-radius: 5px;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-retour {
    text-align: center;
    margin: 2rem auto;
}

.btn-retour a {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: white;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transition: all 0.3s ease;
}

.btn-retour a:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(5, 150, 105, 0.5);
}

.footer {
    height: 100%;
    margin: 0;
    display: flex;
    background-color: #0B3861;
    color: white;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

.footer-container {
    margin: 0 auto;
    text-align: center;
}

.footer a {
    color: white;
}

.footer a:hover {
    color: #ffcc70;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    margin: 0 10px;
    color: white;
    text-decoration: none;
}

.footer-links a:hover{
    text-decoration: underline;
}