/* =====================================================================
   BASE
   Variables, reset léger, typographie, formulaires et éléments communs.
   Issu du style.css V2.5 sans changement visuel volontaire.
   ===================================================================== */

:root {
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --text: #1f2430;
  --muted: #5b6472;
  --accent: #7C3AED;
  --accent-hover: #6D28D9;
  --border: #dde1e7;
  --error: #b3261e;
  --warn: #92400e;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  margin-top: max(24px, calc((100vh - 620px) / 2));
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 16px;
}

p {
  color: var(--muted);
  margin: 0 0 16px;
}

textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfbfc;
  color: var(--text);
}

textarea:focus,
input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/*
 * Couleur native des contrôles de formulaire.
 * Utilise l'accent du produit Secret pour les cases à cocher
 * et le curseur de longueur du générateur.
 */
input[type="checkbox"],
input[type="range"] {
  accent-color: var(--accent);
}

button {
  margin-top: 12px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

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

@media (max-width: 480px) {
  .card {
    padding: 20px;
  }
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}

select {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfbfc;
  color: var(--text);
}

select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Défilement doux pour les ancres internes. */
html {
  scroll-behavior: smooth;
}

/*
 * Ajustement commun des cartes sur mobile.
 * Cette règle existait auparavant dans le responsive de la page d'accueil.
 */
@media (max-width: 700px) {
  .card {
    margin-top: 24px;
  }
}
