/* Sesame — une colonne centrée, lisible sur téléphone.
   Aucune ressource distante : ni police, ni image, ni feuille importée (la CSP n'autorise que ce fichier). */

:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 1.5rem 1rem;
  background: #f3f4f6;
  color: #1b2430;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
}

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #d4d8de;
  border-radius: 8px;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

p {
  margin: 0 0 1rem;
}

.mention {
  color: #55606e;
  font-size: 0.95rem;
}

/* L'attribut « hidden » doit toujours gagner : c'est lui qui cache le champ, le bouton et le secret. */
[hidden] {
  display: none !important;
}

#zone-mdp {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

/* 16 px au moins : en dessous, le téléphone agrandit la page à la saisie. */
input {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid #7d8794;
  border-radius: 6px;
  background: #ffffff;
  color: inherit;
  font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 1.0625rem;
  letter-spacing: 0.05em;
}

button {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 6px;
  background: #1d4f91;
  color: #ffffff;
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  background: #7d8794;
  cursor: default;
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid #e09b00;
  outline-offset: 2px;
}

#message {
  margin: 1rem 0 0;
  font-weight: 600;
}

#message:empty {
  display: none;
}

#zone-secret {
  margin-top: 1rem;
}

/* Le texte est rendu tel quel, retours à la ligne compris, et ne déborde jamais de la colonne. */
#secret {
  max-height: 60vh;
  margin: 0 0 1rem;
  padding: 0.9rem;
  overflow: auto;
  border: 1px solid #7d8794;
  border-radius: 6px;
  background: #f8f9fb;
  font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
