/* ----------- Styles globaux ----------- */
body {
    font-family: Arial, sans-serif;
    margin: 0; padding: 0;
    min-height: 100vh;
}

/* Centrage vertical générique */
.center-vh {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pages publiques (accueil, inscription, connexion) */
body.public {
    background: linear-gradient(135deg, #b6dcff 0%, #a3bde6 100%);
    color: #175085;
    min-height: 100vh;
    /* PAS de display: flex ici ! */
}
body.public .box {
    background: rgba(255,255,255,0.82); /* Blanc à 82% d'opacité */
    border-radius: 20px;
    box-shadow: 0 0 24px #bcd2ea99;
    padding: 48px 42px 36px 42px;
    min-width: 320px;
    max-width: 480px;
    text-align: center;
    margin: 0 auto;
    backdrop-filter: blur(6px);  /* Optionnel : effet de flou derrière la box (supporté sur Chrome, Edge, Safari) */
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid #e0eaff40; /* Optionnel : fine bordure translucide */
}
body.public h1 {
    color: #1561ad;
    font-size: 2.2em;
    margin-bottom: 24px;
}
body.public .links {
    margin-top: 18px;
    font-size: 1.1em;
}
body.public .links a {
    text-decoration: none;
    color: #1776c9;
    margin: 0 10px;
    font-weight: bold;
    transition: color 0.18s, background 0.18s;
    padding: 2px 8px;
    border-radius: 5px;
}
body.public .links a:hover {
    color: #fff;
    background: #339cff;
}
body.public .accueil-btns {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
body.public .accueil-btns a {
    display: inline-block;
    background: #2776d1;
    color: #fff;
    padding: 14px 36px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.12em;
    font-weight: bold;
    margin: 0 8px;
    box-shadow: 0 3px 14px #bcd2ea2f;
    transition: background 0.2s, transform 0.14s;
}
body.public .accueil-btns a:hover {
    background: #14497d;
    transform: scale(1.06);
}
body.public .register-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 0 16px #bcd2ea;
    max-width: 410px;
    margin: 50px auto;
    padding: 40px 38px 28px 38px;
    text-align: center;
}
body.public h2 {
    color: #1561ad;
    margin-bottom: 28px;
}
.form-inscription {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}
.form-inscription label {
    text-align: left;
    font-weight: bold;
    margin-bottom: 5px;
    color: #1561ad;
}
.form-inscription input[type="text"],
.form-inscription input[type="email"],
.form-inscription input[type="password"] {
    padding: 10px;
    border-radius: 7px;
    border: 1px solid #bcd2ea;
    font-size: 1em;
    margin-bottom: 0;
    background: #f7fbff;
}
.form-inscription button, 
.form-inscription input[type="submit"] {
    margin-top: 18px;
    padding: 13px 0;
    background: #2776d1;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background 0.18s, transform 0.11s;
    cursor: pointer;
    width: 100%;
}
.form-inscription button:hover, 
.form-inscription input[type="submit"]:hover {
    background: #14497d;
    transform: scale(1.04);
}
/* Lien bouton sous le formulaire */
.register-links {
    margin-top: 24px;
}
.register-links a {
    display: inline-block;
    background: #2776d1;
    color: #fff;
    padding: 11px 28px;
    border-radius: 10px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1em;
    transition: background 0.16s, transform 0.11s;
}
.register-links a:hover {
    background: #14497d;
    color: #fff;
    transform: scale(1.04);
}

/* Page dashboard élève (espace privé) */
body.dashboard {
    background: linear-gradient(135deg, #ffd6ec 0%, #ff69b4 100%);
    color: #6c214e;
}
body.dashboard h1, body.dashboard h2 {
    color: #b02560;
}
body.dashboard a {
    color: #c83280;
}
body.dashboard .box {
    background: #fff0fa;
    border-radius: 15px;
    box-shadow: 0 0 12px #ffbee6;
    max-width: 650px;
    margin: 30px auto;
    padding: 30px 40px;
}
/* Tableaux résultats dashboard */
.dashboard table {
    background: #fff;
    border-collapse: collapse;
    margin: 20px 0;
    width: 100%;
    box-shadow: 0 2px 10px #fdbbe3;
}
.dashboard th, .dashboard td {
    border: 1px solid #ffc8e7;
    padding: 10px 16px;
    text-align: left;
}
/* Liens d’activités espace élève */
.dashboard .activites a {
    display: inline-block;
    margin: 14px 18px 0 0;
    padding: 13px 26px;
    border-radius: 8px;
    text-decoration: none;
    background: #ff69b4;
    color: #fff;
    font-size: 1.12em;
    transition: background 0.2s;
}
.dashboard .activites a:hover {
    background: #b02560;
}
/* Liens logout */
.logout {
    color: #888;
    margin-top: 30px;
    display: block;
}

/* Méli-mélo page */
body.melimelo {
    background: linear-gradient(135deg, #fffbe6 0%, #f5e6ff 100%);
}
body.melimelo .phrase {
    margin: 15px 0;
    padding: 10px;
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 0 6px rgba(0,0,0,0.08);
}
body.melimelo .mot {
    padding: 6px 12px;
    background: #ddd;
    border-radius: 5px;
    cursor: grab;
    user-select: none;
}
body.melimelo .zone-reponse, body.melimelo .mots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 40px;
    padding: 7px;
    border: 2px dashed #b68af9;
    background: #faf6ff;
}
/* Constitution page */
body.constitution {
    background: linear-gradient(135deg, #ffe7e7 0%, #e2eafc 100%);
}
/* Capital Hunt page */
body.capitalhunt {
    background: linear-gradient(135deg, #eaf6ff 0%, #cce5ff 100%);
}
@media (max-width: 700px) {
    .dashboard .box, body.dashboard .box {
        padding: 15px 5vw;
        max-width: 98vw;
    }
    body.public .box {
        padding: 18px 4vw 18px 4vw;
        min-width: unset;
        max-width: 98vw;
    }
}
body.public::before {
    content: '';
    position: fixed;
    z-index: 0;
    inset: 0;
    background: rgba(255,255,255,0.40); /* voile blanc, ajuste à 0.40-0.55 selon tes goûts */
    pointer-events: none;
}
.center-vh, .box {
    position: relative;
    z-index: 1;
}
.form-inscription,
.form-inscription label,
.form-inscription input,
.form-inscription button {
    text-align: left;
}

.form-inscription {
    align-items: stretch;
}
.form-inscription button {
    text-align: center;
}

.form-inscription label,
.form-inscription input[type="text"],
.form-inscription input[type="email"],
.form-inscription input[type="password"] {
    text-align: left;
    display: block;
    width: 100%;
}

.barre {
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0;
}
.barre .remplissage {
  height: 26px;
  background: linear-gradient(90deg, #61baff, #157ffb);
  width: 0;
  text-align: center;
  color: white;
  font-weight: bold;
  transition: width 1.2s ease-in-out;
}
.fiche-simplifiee {
  max-width: 480px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 0 12px #ccc;
}
.fiche-simplifiee {
  background: #fff;
  padding: 30px;
  box-shadow: 0 0 12px #ccc;
}


.barre {
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0;
}
.barre .remplissage {
  height: 26px;
  background: linear-gradient(90deg, #61baff, #157ffb);
  width: 0;
  text-align: center;
  color: white;
  font-weight: bold;
  /* Animation fluide */
  transition: width 1.4s cubic-bezier(0.6, 0, 0.2, 1);
}

.recompenses {
  margin-top: 5px;
  font-size: 1.08em;
  color: #c83280;
  text-align: center;
  font-weight: bold;
  animation: popreward 1s;
}
@keyframes popreward {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1;}
  100% { transform: scale(1); opacity: 1;}
}
.barre-milestones {
  position: relative;
  height: 0;
  width: 100%;
  pointer-events: none;
}
.barre-milestones .milestone {
  position: absolute;
  top: -20px;
  width: 32px;
  text-align: center;
  transform: translateX(-50%);
  font-size: 1.1em;
}
.barre-milestones .milestone img {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto 2px auto;
}
