:root {
  --couleur-primaire: #008ad4;
  --couleur-secondaire: #000099;
  --couleur-fond: #f8f9fa;
  --couleur-texte: #2c3e50;
}

/* --------- Base --------- */
body {
  background: var(--couleur-fond);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--couleur-texte);
}

/* --------- Conteneur --------- */
.conteneur {
  max-width: 850px;
  margin: 2rem auto;
  padding: 1rem;
}

.carte {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.carte:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.titre-section {
  text-align: center;
  color: var(--couleur-secondaire);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* --------- Formulaire --------- */
.formulaire-generateur .champ {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--couleur-secondaire);
}

.entree-style {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.entree-style:focus {
  border-color: var(--couleur-primaire);
  box-shadow: 0 0 0 3px rgba(0, 138, 212, 0.2);
  outline: none;
}

/* --------- Champs en ligne --------- */

.ligne-champs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.ligne-champs .champ {
  flex: 0 0 calc(50% - 0.5rem);
  box-sizing: border-box;
}

.champ .entree-style {
  width: 100%;
}



/* --------- Info-bulle et badge --------- */
.info-bulle {
  display: inline-block;
  margin-left: 6px;
  cursor: help;
  font-size: 0.9rem;
  color: #0078d4;
  transition: transform 0.2s ease;
}
.info-bulle:hover {
  transform: scale(1.2);
}

.badge-max {
  background-color: #0078d4;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: 6px;
  font-weight: bold;
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
}

/* --------- Liste déroulante amis --------- */
#liste-amis {
  margin-top: 1rem;
}
#liste-amis select.entree-style {
  background-color: #fff;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  color: var(--couleur-texte);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  max-height: 12rem;
  overflow-y: auto;
}
#liste-amis select.entree-style:focus {
  border-color: var(--couleur-primaire);
  box-shadow: 0 0 0 3px rgba(0, 138, 212, 0.2);
  outline: none;
}

/* --------- Boutons --------- */
.boutons-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.bouton-primaire,
.bouton-secondaire {
  border: none;
  cursor: pointer;
  padding: 0.9rem 1.6rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bouton-primaire {
  background-color: #2c3e50;
  color: #fff;
}
.bouton-primaire:hover {
  background-color: #1a252f;
}

.bouton-secondaire {
  background: #e9ecef;
  color: var(--couleur-texte);
}
.bouton-secondaire:hover {
  background: #dee2e6;
}

/* --------- Résultats --------- */
.resultat-jour {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 14px;
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.resultat-jour h3 {
  color: var(--couleur-secondaire);
  font-weight: 700;
  margin-bottom: 1rem;
}

.grid-jours-speciaux {
  display: grid;
  gap: 1.2rem;
}

.jour-special {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.4rem;
  background: white;
  border-left: 4px solid var(--couleur-primaire);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}
.jour-special:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.titre-jour {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--couleur-primaire);
  margin-bottom: 0.3rem;
}

.date-jour {
  color: #6c757d;
  font-size: 0.95rem;
}

.jours-restants {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--couleur-secondaire);
}

/* --------- Actions sur résultats --------- */
.actions-resultats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.actions-resultats .bouton-primaire {
  background: var(--couleur-secondaire);
  color: #fff;
  font-size: 0.9rem;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
}
.actions-resultats .bouton-primaire:hover {
  background: var(--couleur-primaire);
  transform: scale(1.04);
}

/* --------- Actions individuelles --------- */
.actions-individuelles {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.actions-individuelles button {
  background-color: #2c3e50;
  color: #fff;
  border: none;
  padding: 6px 12px;
  font-size: 0.9em;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}
.actions-individuelles button:hover {
  background-color: #1a252f;
}

/* --------- Animations --------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-pop {
  animation: popIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------- Confirmation flottante --------- */
.confirmation-timpo {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #0078d4;
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 9999;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0%   { opacity: 0; transform: translateY(20px); }
  10%  { opacity: 1; transform: translateY(0); }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(20px); }
}

/* --------- Jalons remarquables --------- */
.celebration-10000 {
  text-align: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: #0078d4;
  margin-bottom: 1rem;
  animation: pulse 0.6s ease-in-out infinite alternate;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.8; }
  to   { transform: scale(1.1); opacity: 1; }
}

/* --------- Impression --------- */
@media print {
  body {
    font-family: Georgia, serif;
    color: #000;
    background: none;
  }

  header, footer, nav,
  .boutons-actions,
  .actions-resultats,
  .actions-individuelles,
  #calcul-en-cours {
    display: none !important;
  }

  .resultat-jour {
    margin-top: 20px;
    page-break-inside: avoid;
  }

  h3 {
    font-size: 1.4em;
    margin-bottom: 0.5em;
  }

  .jour-special {
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
  }

  .jour-special p {
    font-size: 1em;
    line-height: 1.4;
  }
}

/* --------- Responsive ajusté --------- */
@media (max-width: 600px) {
  .carte {
    padding: 1.5rem;
  }

  .jour-special {
    flex-direction: column;
    align-items: flex-start;
  }

  .jours-restants {
    align-self: flex-end;
    margin-top: 0.8rem;
  }

  .boutons-actions,
  .actions-resultats {
    flex-direction: column;
  }

  .bouton-primaire,
  .bouton-secondaire {
    width: 100%;
  }

  .actions-individuelles {
    flex-direction: column;
    align-items: stretch;
  }

  .actions-individuelles button {
    width: 100%;
    font-size: 1em;
  }

}

