
body{background-color: var(--bg);}

/* === CHECKBOXES PERSONNALISÉES === */
.checkbox-wrapper * {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-wrapper label {
  --size: 25px;
  --shadow: calc(var(--size) * .07) calc(var(--size) * .1);
  position: relative;
  display: block;
  width: var(--size);
  height: var(--size);
  margin: 0;
  background-color: var(--primary);
  background-image: linear-gradient(43deg, var(--primary) 0, var(--secondary) 100%);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s ease transform, 0.2s ease background-color,
      0.2s ease box-shadow;
  overflow: hidden;
  z-index: 1;
}

.checkbox-wrapper label:before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  width: calc(var(--size) * .7);
  height: calc(var(--size) * .7);
  margin: 0 auto;
  background-color: #fff;
  transform: translateY(-50%);
  border-radius: 50%;
  transition: 0.2s ease width, 0.2s ease height;
}

.checkbox-wrapper label:hover:before {
  width: calc(var(--size) * .55);
  height: calc(var(--size) * .55);
}

.checkbox-wrapper label:active {
  transform: scale(0.9);
}

.checkbox-wrapper .tick_mark {
  position: absolute;
  top: -1px;
  right: 0;
  left: calc(var(--size) * -.05);
  width: calc(var(--size) * .6);
  height: calc(var(--size) * .6);
  margin: 0 auto;
  margin-left: calc(var(--size) * .14);
  transform: rotateZ(-40deg);
}

.checkbox-wrapper .tick_mark:before,
  .checkbox-wrapper .tick_mark:after {
  content: "";
  position: absolute;
  background-color: #fff;
  border-radius: 2px;
  opacity: 0;
  transition: 0.2s ease transform, 0.2s ease opacity;
}

.checkbox-wrapper .tick_mark:before {
  left: 0;
  bottom: 0;
  width: calc(var(--size) * .1);
  height: calc(var(--size) * .3);
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.23);
  transform: translateY(calc(var(--size) * -.68));
}

.checkbox-wrapper .tick_mark:after {
  left: 0;
  bottom: 0;
  width: 100%;
  height: calc(var(--size) * .1);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.23);
  transform: translateX(calc(var(--size) * .78));
}

.checkbox-wrapper input[type="checkbox"]:checked + label {
  background-color: var(--primary);
  background-image: linear-gradient(43deg, var(--primary) 0%, var(--secondary) 100%);
}

.checkbox-wrapper input[type="checkbox"]:checked + label:before {
  width: 0;
  height: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + label .tick_mark:before,
  .checkbox-wrapper input[type="checkbox"]:checked + label .tick_mark:after {
  transform: translate(0);
  opacity: 1;
}

/* === CONTENEUR GRID POUR CHECKBOXES === */
.checkbox-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px 0;
}

/* L'option "autre" prend toute la largeur */
.checkbox-item:last-child {
  grid-column: 1 / -1;
}

/* Style pour l'affichage des checkboxes avec leurs labels */
.checkbox-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.8);
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkbox-item:hover {
  background-color: rgba(255, 255, 255, 0.95);
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.checkbox-item .checkbox-wrapper {
  flex-shrink: 0;
  margin-right: 15px;
}

.checkbox-item .checkbox-label {
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  flex: 1;
}

/* État sélectionné pour le conteneur des checkboxes */
.checkbox-item.selected {
  background-color: rgba(132, 184, 255, 0.1);
  border: 1px solid var(--secondary);
  transform: scale(1.02);
}

.checkbox-item.selected .checkbox-label {
  font-weight: 600;
}

/* === BOUTONS RADIO PERSONNALISÉS === */
.radio-input-wrapper {
  display: flex;
  flex-direction: column;
  margin: 15px 0;
}

.label {
  display: flex;
  align-items: center;
  border-radius: 100px;
  padding: 14px 16px;
  margin: 5px 0;
  cursor: pointer;
  transition: .3s;
}

.label:hover,
.label:focus-within,
.label:active {
  background: hsla(0, 0%, 80%, .14);
}

.radio-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  z-index: -1;
}

.radio-design {
  width: 22px;
  height: 22px;
  border-radius: 100px;
  background: linear-gradient(to right bottom, var(--secondary), var(--primary));
  position: relative;
  flex-shrink: 0;
}

.radio-design::before {
  content: '';
  display: inline-block;
  width: inherit;
  height: inherit;
  border-radius: inherit;
  background: hsl(0, 0%, 90%);
  transform: scale(1.1);
  transition: .3s;
}

.radio-input:checked+.radio-design::before {
  transform: scale(0);
}

.label-text {
  color: var(--primary);
  margin-left: 14px;
  font-size: 16px;
  font-weight: 500;
  transition: .3s;
}

.radio-input:checked~.label-text {
  color: var(--accent);
  font-weight: 600;
}

/* === NOUVEAUX BOUTONS RADIO PERSONNALISÉS === */
.custom-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  padding: 16px;
  margin: 15px 0;
}

.custom-radio-container {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.8);
  transition:
    background-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  font-size: 16px;
  color: var(--primary);
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: 'Work Sans', sans-serif;
}

.custom-radio-container:hover {
  background-color: rgba(255, 255, 255, 0.95);
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.custom-radio-container input[type="radio"] {
  opacity: 0;
  position: absolute;
}

.custom-radio-checkmark {
  position: relative;
  height: 16px;
  width: 16px;
  border: 2px solid var(--secondary);
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  transition:
    background-color 0.4s ease,
    transform 0.4s ease;
  margin-right: 12px;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.custom-radio-container input[type="radio"]:checked + .custom-radio-checkmark {
  background-color: var(--secondary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(132, 184, 255, 0.2);
  transform: scale(1.2);
  animation: pulse 0.6s forwards;
}

.custom-radio-checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.custom-radio-container
  input[type="radio"]:checked
  + .custom-radio-checkmark::after {
  display: block;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(-50%, -50%);
}

@keyframes pulse {
  0% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(1.4);
  }
  100% {
    transform: scale(1.2);
  }
}

/* === CONTENEURS GRID POUR LES INFORMATIONS === */
.info-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-item.full-width {
  grid-column: 1 / -1;
}

/* === ÉTOILE DÉCORATIVE === */
.decorative-star {
  position: absolute;
  top: -80px;
  left: -80px;
  width: 160px;
  height: 160px;
  z-index: 10;
}

.decorative-star svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(132, 184, 255, 0.4));
}

/* Position relative pour le conteneur du formulaire */
form {
  position: relative;
  max-width: 1000px;
  margin: 40px auto;
  padding: 30px 40px;
  background-color: whitesmoke;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  font-family: 'Work Sans', sans-serif;
  border: var(--secondary) solid 5px;
}


/* === FORMULAIRE PRINCIPAL === */

.sent{
  color: green;
}

.err{
  color: red;
}

#error{
  align-content: center;
  text-align: center;

}



form p {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary);
}

form label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 16px;
  color: #222;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="url"],
form textarea,
form select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid var(--secondary);
  border-radius: 12px;
  margin-bottom: 20px;
  box-sizing: border-box;
  transition: border 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  background-color: rgba(132, 184, 255, 0.05);
  color: var(--primary);
  font-family: 'Work Sans', sans-serif;
  box-shadow: 0 2px 4px rgba(132, 184, 255, 0.1);
}

form input:focus,
form select:focus,
form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(132, 184, 255, 0.2);
  outline: none;
  background-color: rgba(132, 184, 255, 0.1);
  transform: scale(1.02);
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

/* === CHECKBOXES & RADIOS === */

form input[type="checkbox"],
form input[type="radio"] {
  transform: scale(1.2);
  margin-right: 8px;
  accent-color: var(--primary);
  vertical-align: middle;
}

form label[for] {
  font-weight: normal;
  font-size: 16px;
  margin-bottom: 6px;
  display: inline-block;
}

/* === SELECTS === */

select {
  height: 50px;
  border-radius: 12px;
  background-color: rgba(132, 184, 255, 0.05);
  border: 2px solid var(--secondary);
  color: var(--primary);
  font-family: 'Work Sans', sans-serif;
  cursor: pointer;
}

/* === TITRES === */

h1 {
  color: white;
  font-size: 40px;
  text-align: center;
  margin-top: 40px;
}

h2 {
  color: var(--secondary);
  font-size: 20px;
  font-weight: 400;
  max-width: 700px;
  text-align: center;
  margin: 10px auto 30px auto;
}

/* === BOUTON DE VALIDATION === */

.pageclip-form__submit {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 14px 30px;
  font-size: 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.pageclip-form__submit:hover {
  transform: scale(1.03);
}

.pageclip-form__submit:active {
  transform: scale(0.97);
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
  form {
    margin: 20px 10px;
    padding: 25px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 18px;
  }

  .container h2{
  margin-left: 50px;
  margin-right: 50px;
  }

  /* Grid responsive pour checkboxes */
  .checkbox-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .checkbox-item {
    padding: 10px 16px;
  }
  
  .checkbox-item .checkbox-label {
    font-size: 15px;
  }

  /* Grid responsive pour les informations */
  .info-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  form input[type="text"],
  form input[type="email"],
  form input[type="tel"],
  form input[type="url"],
  form textarea,
  form select {
    padding: 8px 12px;
    font-size: 14px;
    margin-bottom: 15px;
  }

  form p {
    font-size: 18px;
    margin-bottom: 12px;
  }

  form label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  form textarea {
    min-height: 100px;
  }

  select {
    height: 40px;
  }
}

@media (max-width: 480px) {
  .decorative-star {
    width: 35px;
    height: 35px;
    top: -18px;
    left: 0px;
  }
  
  form {
    margin: 15px 8px;
    padding: 20px;
  }

  h1 {
    font-size: 24px;
    margin-top: 30px;
  }

  h2 {
    font-size: 16px;
  }

  /* Grid responsive pour mobile */
  .checkbox-container {
    gap: 10px;
  }
  
  .checkbox-item {
    padding: 8px 14px;
  }
  
  .checkbox-item .checkbox-label {
    font-size: 14px;
  }

  /* Grid responsive pour mobile - informations */
  .info-container {
    gap: 12px;
  }

  form input[type="text"],
  form input[type="email"],
  form input[type="tel"],
  form input[type="url"],
  form textarea,
  form select {
    padding: 6px 10px;
    font-size: 13px;
    margin-bottom: 12px;
    border-radius: 8px;
  }

  form p {
    font-size: 16px;
    margin-bottom: 10px;
  }

  form label {
    font-size: 13px;
    margin-bottom: 5px;
  }

  form textarea {
    min-height: 80px;
  }

  select {
    height: 36px;
  }

  .pageclip-form__submit {
    padding: 10px 20px;
    font-size: 14px;
  }

  #preview-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}


#preview-btn{
  background-color: var(--secondary); color: var(--primary); border: none; padding: 12px 25px; border-radius: 5px; cursor: pointer; margin: 5px; font-size: 16px;
}
.pageclip-form__submit{
  background-color: var(--primary); color: var(--secondary); border: none; padding: 12px 25px; border-radius: 5px; cursor: pointer; margin: 5px; font-size: 16px;
}


/* === TEXTAREA AUTRE PRECISION === */
#autre-precision {
    width: 400px !important;
    margin-top: 10px !important;
    border: 2px solid var(--secondary) !important;
    background-color: rgba(132, 184, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-family: 'Work Sans', sans-serif !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 4px rgba(132, 184, 255, 0.1) !important;
    transition: border 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease !important;
}

#autre-precision:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(132, 184, 255, 0.2) !important;
    outline: none !important;
    background-color: rgba(132, 184, 255, 0.1) !important;
    transform: scale(1.02) !important;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    #autre-precision {
        width: 100% !important;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    #autre-precision {
        width: 100% !important;
        max-width: 250px;
    }
}