/* TP formulaire newsletter - Jimmy Bomy */
.sommaire {
  list-style: none;
  margin: 0;
  padding: 0;
}

.champ input, button {
  display: block;
  width: 100%;
  font-family: "Figtree", "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-size: 1.05rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.message {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 3rem 1rem;
  font-family: "Figtree", "Avenir Next", "Segoe UI", Arial, sans-serif;
  color: #1f1f1c;
  background: linear-gradient(135deg, #efe5d8, #e8e3db);
}

.carte {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  border-radius: 28px;
  background-color: #f6f2ec;
  box-shadow: 0 30px 60px -20px rgba(38, 48, 42, 0.18);
}
@media (max-width: 760px) {
  .carte {
    grid-template-columns: 1fr;
  }
}

.carte-seule {
  grid-template-columns: 1fr;
  max-width: 520px;
}

.presentation {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 2.2rem;
  color: #f4efe6;
  background: linear-gradient(180deg, #313a33, #26302a);
}
@media (max-width: 760px) {
  .presentation {
    padding: 2.5rem 1.5rem;
  }
}

.numero {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.presentation h1 {
  margin: 0.25rem 0 1rem;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  font-weight: 500;
  line-height: 1.05;
}

.accroche {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

.sommaire li {
  padding: 0.9rem 0;
  border-top: 1px solid rgba(244, 239, 230, 0.18);
}

.inscription {
  padding: 2.8rem 2.2rem;
}
@media (max-width: 760px) {
  .inscription {
    padding: 2rem 1.5rem;
  }
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  margin-bottom: 1.6rem;
  padding: 0;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 2.3rem);
  font-weight: 600;
  line-height: 1.1;
}

.champ {
  position: relative;
  margin-bottom: 0.8rem;
}
.champ label {
  position: absolute;
  top: 1.65rem;
  left: 1rem;
  transform: translateY(-50%);
  color: #625c53;
  font-size: 1.05rem;
  pointer-events: none;
  transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}
.champ input {
  height: 3.3rem;
  padding: 1.3rem 1rem 0.4rem;
  color: #1f1f1c;
  background-color: #fdfcf9;
  border: 1px solid #ddd6cb;
  border-radius: 16px;
}
.champ input:hover {
  border-color: #625c53;
}
.champ input:focus {
  border-color: #26302a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 48, 42, 0.25);
}
.champ input.invalide {
  border-color: #b3261e;
}
.champ input.invalide:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.25);
}
.champ:focus-within label, .champ:has(input:not(:placeholder-shown)) label {
  top: 0.85rem;
  font-size: 0.75rem;
  color: #26302a;
}

.requis {
  color: #b4502f;
}

.aide {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  padding-left: 1rem;
  color: #625c53;
  font-size: 0.85rem;
  transition: max-height 0.2s ease, margin 0.2s ease;
}
.champ:focus-within .aide {
  max-height: 2rem;
  margin-top: 0.35rem;
}

.erreur {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  color: #b3261e;
  font-size: 0.9rem;
}
.erreur:empty {
  display: none;
}

button {
  margin-top: 1.1rem;
  padding: 1rem;
  font-weight: 700;
  color: #ffffff;
  background-color: #26302a;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
button:hover {
  background-color: #313a33;
}
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 48, 42, 0.25);
}

.mention {
  margin: 0.9rem 0 0;
  color: #625c53;
  font-size: 0.9rem;
}

.message {
  margin-top: 1rem;
}
.message:empty {
  display: none;
}

.message-succes {
  color: #2f6b45;
  background-color: rgba(47, 107, 69, 0.08);
  border-left: 4px solid #2f6b45;
}

.message-erreur {
  color: #b3261e;
  background-color: rgba(179, 38, 30, 0.08);
  border-left: 4px solid #b3261e;
}

.message-erreur ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.retour {
  display: inline-block;
  margin-top: 1.2rem;
  color: #26302a;
  font-weight: 600;
}
