/* ====== Aquazone — design minimaliste rouge & blanc ====== */
:root {
  --rouge: #E2231A;
  --rouge-fonce: #B71C13;
  --rouge-clair: #fdecea;
  --blanc: #ffffff;
  --gris-texte: #2b2b2b;
  --gris-doux: #6b6b6b;
  --gris-bord: #e6e6e6;
  --gris-fond: #f6f6f7;
  --ombre: 0 10px 40px rgba(0, 0, 0, 0.10);
  --rayon: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--gris-texte);
  background: var(--gris-fond);
  -webkit-font-smoothing: antialiased;
}

/* Fond optionnel (photo du site).
   Voile blanc TRÈS léger (le texte est de toute façon sur la carte blanche),
   pas de "background-attachment: fixed" (bogué/saccadé sur iPad/iOS). */
body.with-bg {
  min-height: 100vh;
  background-image: linear-gradient(rgba(255,255,255,0.12), rgba(255,255,255,0.28)),
                    url("background.JPG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  border-top: 6px solid var(--rouge);
  padding: 32px 28px 28px;
}

.logo-wrap {
  text-align: center;
  margin-bottom: 18px;
}
.logo-wrap img {
  max-width: 240px;
  width: 70%;
  height: auto;
}

.titre {
  text-align: center;
  font-size: 1.05rem;
  color: var(--gris-doux);
  margin: 0 0 8px;
  font-weight: 500;
}

/* ====== Question principale mise en avant ====== */
.question {
  text-align: center;
  font-size: 1.45rem;
  line-height: 1.35;
  font-weight: 800;
  color: var(--gris-texte);
  margin: 6px 0 22px;
}
.question .accent { color: var(--rouge); }

/* ====== Choix OUI / NON ====== */
.choix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.choix input { position: absolute; opacity: 0; pointer-events: none; }
.choix label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  border: 2px solid var(--gris-bord);
  border-radius: 14px;
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}
.choix label:hover { border-color: var(--rouge); }
.choix input:checked + label.oui {
  background: var(--rouge);
  border-color: var(--rouge);
  color: #fff;
  box-shadow: 0 6px 18px rgba(226,35,26,.35);
}
.choix input:checked + label.non {
  background: var(--gris-texte);
  border-color: var(--gris-texte);
  color: #fff;
}
.choix input:focus-visible + label { outline: 3px solid var(--rouge-clair); }

/* ====== Champs ====== */
.champ { margin-bottom: 16px; }
.champ label.lbl {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--gris-texte);
}
.champ label.lbl .opt {
  font-weight: 400;
  font-size: .8rem;
  color: var(--gris-doux);
}
.row { display: flex; gap: 12px; }
.row .champ { flex: 1; }

input[type=text],
input[type=email],
textarea {
  width: 100%;
  padding: 13px 14px;
  font-size: 1rem;
  border: 1.5px solid var(--gris-bord);
  border-radius: 10px;
  background: #fff;
  color: var(--gris-texte);
  transition: border-color .15s ease;
  font-family: inherit;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--rouge);
  box-shadow: 0 0 0 3px var(--rouge-clair);
}
textarea { resize: vertical; min-height: 80px; }

.err-msg {
  color: var(--rouge);
  font-size: .82rem;
  margin-top: 5px;
  display: none;
}
.champ.invalid .err-msg,
.choix-wrap.invalid .err-msg { display: block; }
.champ.invalid input,
.champ.invalid textarea { border-color: var(--rouge); }

.choix-wrap .err-msg { text-align: center; margin-top: -10px; margin-bottom: 12px; }

/* ====== Bouton ====== */
.btn-envoyer {
  width: 100%;
  padding: 18px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  background: var(--rouge);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 8px 22px rgba(226,35,26,.32);
  transition: transform .08s ease, background .15s ease;
}
.btn-envoyer:hover { background: var(--rouge-fonce); }
.btn-envoyer:active { transform: translateY(1px); }
.btn-envoyer:disabled { opacity: .6; cursor: not-allowed; }

.mention {
  text-align: center;
  font-size: .78rem;
  color: var(--gris-doux);
  margin-top: 16px;
}

/* ====== Confirmation ====== */
.merci { text-align: center; padding: 20px 0; }
.merci .check {
  width: 84px; height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--rouge);
  display: flex; align-items: center; justify-content: center;
  animation: pop .35s ease;
}
.merci .check svg { width: 44px; height: 44px; }
.merci h2 { font-size: 1.6rem; margin: 0 0 10px; color: var(--gris-texte); }
.merci p { color: var(--gris-doux); margin: 0; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.hidden { display: none !important; }

/* ====== Admin ====== */
.admin-body { background: var(--gris-fond); }
.admin-header {
  background: #fff;
  border-bottom: 3px solid var(--rouge);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-header .brand { display: flex; align-items: center; gap: 12px; }
.admin-header img { height: 38px; }
.admin-header h1 { font-size: 1.15rem; margin: 0; color: var(--rouge); }
.admin-header a.logout {
  color: var(--gris-doux);
  text-decoration: none;
  font-size: .9rem;
  border: 1px solid var(--gris-bord);
  padding: 7px 14px;
  border-radius: 8px;
}
.admin-header a.logout:hover { border-color: var(--rouge); color: var(--rouge); }

.admin-main { max-width: 1200px; margin: 0 auto; padding: 24px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  border-left: 4px solid var(--gris-bord);
}
.stat .num { font-size: 1.9rem; font-weight: 800; }
.stat .lbl { font-size: .82rem; color: var(--gris-doux); text-transform: uppercase; letter-spacing: .04em; }
.stat.oui { border-left-color: var(--rouge); }
.stat.oui .num { color: var(--rouge); }
.stat.non { border-left-color: var(--gris-texte); }

.filtres {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
}
.filtres .f { display: flex; flex-direction: column; gap: 4px; }
.filtres label { font-size: .78rem; color: var(--gris-doux); font-weight: 600; }
.filtres input, .filtres select {
  padding: 9px 11px;
  border: 1.5px solid var(--gris-bord);
  border-radius: 8px;
  font-size: .92rem;
  font-family: inherit;
}
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: .92rem;
}
.btn-rouge { background: var(--rouge); color: #fff; }
.btn-rouge:hover { background: var(--rouge-fonce); }
.btn-ghost { background: #fff; color: var(--gris-texte); border: 1.5px solid var(--gris-bord); }
.btn-ghost:hover { border-color: var(--rouge); color: var(--rouge); }

.table-wrap { background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--gris-bord); vertical-align: top; }
th { background: var(--gris-fond); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gris-doux); position: sticky; top: 0; }
tbody tr:hover { background: var(--rouge-clair); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-weight: 700; font-size: .8rem; }
.badge.oui { background: var(--rouge); color: #fff; }
.badge.non { background: #e9e9e9; color: var(--gris-texte); }
.vide { text-align: center; padding: 40px; color: var(--gris-doux); }
.comment-cell { max-width: 260px; white-space: pre-wrap; word-break: break-word; }

/* ====== Login admin ====== */
.login-card { max-width: 380px; }
.login-card h1 { text-align: center; color: var(--rouge); font-size: 1.3rem; margin: 4px 0 22px; }
.login-card .err { color: var(--rouge); text-align: center; font-size: .9rem; margin-top: 10px; min-height: 1em; }

/* ====== Sélecteur de langue (coin haut-droit) ====== */
.lang-switch {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--gris-bord);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lang-switch button {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  color: var(--gris-doux);
  padding: 7px 11px;
  border-radius: 999px;
  line-height: 1;
  transition: background .12s ease, color .12s ease;
}
.lang-switch button.active { background: var(--rouge); color: #fff; }
.lang-switch button:hover:not(.active) { color: var(--rouge); }

/* ====== Tablette (ex. iPad mini) : confort tactile ====== */
@media (min-width: 700px) and (max-width: 1100px) {
  .card { max-width: 560px; }
  .question { font-size: 1.55rem; }
  .choix label { padding: 24px 12px; font-size: 1.4rem; }
  .btn-envoyer { padding: 20px; font-size: 1.28rem; }
  input[type=text], input[type=email], textarea { font-size: 1.05rem; }
}

@media (max-width: 560px) {
  .card { padding: 26px 18px 22px; }
  .question { font-size: 1.25rem; }
  .row { flex-direction: column; gap: 0; }
  .filtres { flex-direction: column; align-items: stretch; }
  .admin-main { padding: 14px; }
  .lang-switch { top: 8px; right: 8px; padding: 3px; }
  .lang-switch button { padding: 6px 8px; font-size: .74rem; }
}
