:root {
  --bg: #0f1117;
  --card: #171a23;
  --champ: #0d0f15;
  --bord: #242938;
  --fg: #e8eaf0;
  --doux: #9aa3b5;
  --accent: #714B67;
  --accent-clair: #8d6180;
  --ok: #2f9e63;
  --alerte: #d9534f;
  --attente: #c78a2e;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.large { justify-content: flex-start; }

.carte {
  background: var(--card);
  border: 1px solid var(--bord);
  border-radius: 14px;
  padding: 28px 24px;
  width: 100%;
  max-width: 560px;
  margin: 24px auto;
}

.carte.wide { max-width: 1100px; }

.marque {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0 0 4px;
}
.marque span { color: var(--accent-clair); }

.sous { color: var(--doux); font-size: 14px; margin: 0 0 24px; }

h2 { font-size: 17px; margin: 0 0 18px; }

/* ---------- formulaire ---------- */
.grille { display: grid; gap: 16px; grid-template-columns: 1fr; }

@media (min-width: 620px) {
  .grille.deux { grid-template-columns: 1fr 1fr; }
  .carte { padding: 34px 32px; }
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg);
}

label .opt { font-weight: 400; color: var(--doux); }

input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  background: var(--champ);
  border: 1px solid var(--bord);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--fg);
  font-size: 16px;               /* >=16px : evite le zoom auto sur iOS */
  font-family: inherit;
  transition: border-color .15s;
}

input:focus {
  outline: none;
  border-color: var(--accent-clair);
}

input.faux { border-color: var(--alerte); }

.erreur { color: #ff9b98; font-size: 12.5px; margin-top: 5px; }

.pot { position: absolute; left: -9999px; opacity: 0; height: 0; }

button, .bouton {
  display: inline-block;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s;
}

button:hover, .bouton:hover { background: var(--accent-clair); }

button.mini { width: auto; padding: 7px 14px; font-size: 13px; }
button.gris { background: #333a4d; }
button.gris:hover { background: #414a61; }

.aide {
  background: var(--champ);
  border: 1px solid var(--bord);
  border-radius: 8px;
  padding: 13px 15px;
  font-size: 13px;
  color: var(--doux);
  margin-bottom: 22px;
}

.bandeau {
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 13.5px;
  margin-bottom: 20px;
}
.bandeau.rouge { background: rgba(217, 83, 79, .12); border: 1px solid rgba(217, 83, 79, .4); color: #ffb3b0; }
.bandeau.orange { background: rgba(199, 138, 46, .12); border: 1px solid rgba(199, 138, 46, .4); color: #f0c078; }

.pied {
  color: var(--doux);
  font-size: 12.5px;
  margin-top: 22px;
  border-top: 1px solid var(--bord);
  padding-top: 16px;
}

.centre { text-align: center; }

.coche {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(47, 158, 99, .15);
  border: 2px solid var(--ok);
  color: var(--ok);
  font-size: 27px;
  line-height: 50px;
  margin: 0 auto 18px;
}

/* ---------- tableau d'administration ---------- */
.tableau-hote { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }

th {
  text-align: left;
  color: var(--doux);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--bord);
  white-space: nowrap;
}

td { padding: 12px 10px; border-bottom: 1px solid var(--bord); vertical-align: top; }

tr:last-child td { border-bottom: 0; }

.etat {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.etat.en_attente { background: rgba(199, 138, 46, .15); color: #f0c078; }
.etat.en_cours   { background: rgba(113, 75, 103, .3);  color: #d7b4cc; }
.etat.cree       { background: rgba(47, 158, 99, .15);  color: #7fd6a4; }
.etat.refuse     { background: #262c3b; color: var(--doux); }
.etat.echec      { background: rgba(217, 83, 79, .15);  color: #ffb3b0; }

.slug {
  background: var(--champ);
  border: 1px solid var(--bord);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--fg);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  width: 150px;
}

.actions { display: flex; gap: 7px; flex-wrap: wrap; }

.note { color: var(--doux); font-size: 12px; margin-top: 5px; max-width: 280px; }

a { color: var(--accent-clair); }

/* sur petit ecran le tableau reste lisible grace au defilement horizontal */
@media (max-width: 560px) {
  body { padding: 10px; }
  .carte { padding: 22px 18px; margin: 12px auto; }
}

/* ---------- captcha ---------- */
.captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.captcha img {
  border: 1px solid var(--bord);
  border-radius: 8px;
  display: block;
  background: var(--champ);
}

.captcha input {
  flex: 1 1 130px;
  min-width: 120px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.rafraichir {
  width: auto;
  flex: 0 0 auto;
  background: #262c3b;
  color: var(--fg);
  font-size: 19px;
  line-height: 1;
  padding: 10px 13px;
  border-radius: 8px;
}
.rafraichir:hover { background: #333a4d; }

@media (max-width: 420px) {
  .captcha input { flex: 1 1 100%; }
}
