/* =====================================================
   Terra Nova : pages Profil, Contact, Suppression de compte
   (remplace profil.css, contact.css et supprimer_compte.css)
   ===================================================== */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #e8efff;
  background-color: #050b1f;
  background-image:
    radial-gradient(circle at 85% 0%, rgba(138, 92, 255, .3), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(63, 160, 255, .25), transparent 50%);
}

:focus-visible { outline: 3px solid #ffd54a; outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.piege { position: absolute; left: -9999px; }

/* ---------- Haut de page ---------- */
.top {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 560px; margin: 0 auto; padding: 16px 20px;
}
.back {
  color: #e8efff; text-decoration: none;
  border: 1px solid rgba(80, 140, 255, .6);
  border-radius: 999px; padding: 8px 16px;
  background: rgba(12, 24, 58, .7);
}
.back:hover { border-color: #3fa0ff; }
.logo { font-weight: bold; letter-spacing: 3px; display: flex; align-items: center; gap: .5rem; }

/* ---------- Carte ---------- */
main { max-width: 560px; margin: 0 auto; padding: 0 20px 40px; }

.card {
  background: rgba(12, 24, 58, .75);
  border: 1px solid rgba(80, 140, 255, .45);
  border-radius: 20px; padding: 28px 24px;
  box-shadow: 0 0 40px rgba(63, 160, 255, .15);
}

/* ---------- Messages (toujours avec un symbole, jamais la couleur seule) ---------- */
.message {
  margin: 0 0 14px; padding: 12px 16px; border-radius: 12px;
  background: rgba(63, 160, 255, .15); border: 1px solid #3fa0ff;
}
.message.erreur {
  background: rgba(255, 107, 138, .12);
  border-color: rgba(255, 107, 138, .7); color: #ffd3dc;
}
.message.succes {
  background: rgba(95, 227, 154, .12); border-color: #5fe39a; color: #d6ffe9;
}

/* ---------- Photo ---------- */
.profil { text-align: center; }

.avatar {
  position: relative; width: 132px; height: 132px; margin: 0 auto 12px;
  border-radius: 50%; padding: 3px;
  background: linear-gradient(135deg, #3fa0ff, #8a5cff);
  box-shadow: 0 0 28px rgba(100, 130, 255, .5);
}
.avatar .img {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: #0a1535; display: grid; place-items: center;
}
.avatar .img img { width: 100%; height: 100%; object-fit: cover; }
.avatar .img span { font-size: 3rem; font-weight: bold; color: #cfe0ff; }

.cam {
  position: absolute; right: 2px; bottom: 2px; width: 38px; height: 38px;
  border-radius: 50%; border: 2px solid #050b1f;
  background: linear-gradient(135deg, #3fa0ff, #8a5cff); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.cam:focus-within { outline: 3px solid #ffd54a; outline-offset: 2px; }
.cam input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.hint { font-size: .875rem; color: #b5c4e6; margin: 0; }
.sub  { font-size: .95rem; color: #b5c4e6; margin: 4px 0 0; }
h1 { font-size: 1.5rem; margin: 6px 0 0; }

/* ---------- Champs ---------- */
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.champs { display: grid; gap: 14px; }
.champs label { display: block; font-size: .95rem; color: #b5c4e6; }

.champs input[type="text"],
.champs input[type="email"],
.champs input[type="tel"],
.champs input[type="password"],
.champs select {
  display: block; width: 100%; margin-top: 6px; height: 46px; padding: 0 14px;
  font-size: 1rem; color: #e8efff;
  background: rgba(5, 11, 31, .7);
  border: 1px solid rgba(80, 140, 255, .55); border-radius: 12px;
}
.champs textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  min-height: 140px; resize: vertical; font-family: inherit; font-size: 1rem;
  color: #e8efff; background: rgba(5, 11, 31, .7);
  border: 1px solid rgba(80, 140, 255, .55); border-radius: 12px;
}
.champs input:focus, .champs textarea:focus, .champs select:focus {
  outline: none; border-color: #3fa0ff; box-shadow: 0 0 0 3px rgba(63, 160, 255, .35);
}

/* ---------- Boutons ---------- */
.btn { height: 48px; border-radius: 12px; font-size: 1rem; font-weight: bold; cursor: pointer; color: #fff; }
.bleu {
  margin-top: 12px; border: none;
  background: linear-gradient(90deg, #3fa0ff, #8a5cff);
  box-shadow: 0 6px 22px rgba(90, 120, 255, .35);
}
.bleu:hover { filter: brightness(1.1); }
.rouge { background: transparent; color: #ff9db3; border: 1px solid rgba(255, 107, 138, .7); }
.rouge:hover { background: rgba(255, 107, 138, .12); }

.lien-discret {
  display: block; text-align: center; margin-top: 18px;
  font-size: .95rem; color: #b5c4e6;
}
.lien-discret:hover { color: #ff9db3; }

/* ---------- Page contact et suppression : une seule colonne ---------- */
.card.contact { display: block; max-width: 560px; margin: 0 auto; padding: 28px 24px; }
.card.contact h1 { margin-top: 0; }
.card.contact .champs { margin-top: 24px; }

/* ---------- Suppression de compte ---------- */
.alerte {
  background: rgba(255, 107, 138, .12); border: 1px solid rgba(255, 107, 138, .7);
  color: #ffd3dc; border-radius: 12px; padding: 14px 16px; font-size: 1rem;
}
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 1rem; color: #e8efff; }
.case input { margin-top: 5px; width: 1.1rem; height: 1.1rem; }

/* ---------- Petit téléphone ---------- */
@media (max-width: 420px) { .ligne { grid-template-columns: 1fr; } }

/* ---------- Tablette ---------- */
@media (min-width: 640px) {
  .top, main { max-width: 640px; }
  .card { padding: 36px; }
}

/* ---------- Ordinateur : photo à gauche, formulaire à droite (profil) ---------- */
@media (min-width: 900px) {
  .top, main { max-width: 980px; }
  .card:not(.contact) {
    display: grid; grid-template-columns: 300px 1fr;
    gap: 56px; align-items: center; padding: 48px;
  }
  .card.contact { max-width: 640px; }
}