* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root{
  --brand-green: #008000;
  --brand-black: #0a0a0a;
  --text: #111111;
  --muted: #666a6f;
  --bg-body: #f8faf9;
  --bg-body-2: #eef5f0;
  --card-bg: #ffffff;
  --radius: 16px;
  --shadow-sm: 0 4px 12px rgba(0,0,0,.08);
  --shadow-md: 0 10px 24px rgba(0,0,0,.10);
  --accent-cyan: #00bfff;
  --accent-red:  #ff0033;
  --nav-h: 72px;
}

/* Fond de page avec un dégradé du vert au noir */
body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /*background: linear-gradient(135deg, #0a0a0a 0%, #111122 40%, #1a001a 100%);  color: var(--text);
  */
  background: url("/imgs/neonbrickwall.png");

  padding: 40px 20px;
  padding-top: calc(var(--nav-h) + 20px);
  min-height: 100vh;
  font-family: Arial, sans-serif;

}


/* Container avec fond blanc et contour en dégradé */
.container {
  max-width: 700px;
  display: flex;
  gap: 20px;
  flex-direction: column;

  width: 100%;
  background-color: var(--card-bg);
  padding: 28px 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--shadow-sm);
  text-align: left;
  margin: 0 auto;
}

/* Professional form layout tweaks */
.form-card{ max-width: 560px; padding: 32px 36px; gap: 16px; }
.form-intro{ margin-bottom: 6px; }
.form-subtitle{ color: var(--muted); font-size: 14px; margin-top: 6px; }

.user-details{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 12px; }
.user-details .input-box{ width: 100%; margin-bottom: 0; }
.row-full{ grid-column: 1 / -1; }

@media (max-width: 680px){
  .user-details{ grid-template-columns: 1fr; }
}

.container .title {
  font-size: 28px;
  font-weight: 500;
  position: relative;
  margin-bottom: 10px;
  color: var(--brand-black);
}

.container .title::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 3px;
  width: 30px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(0,191,255,.6), rgba(255,0,51,.6));
}

.content form {
  width: 100%;
}

/* ------------------ Sélection du rôle ------------------ */
/* Les inputs radio sont cachés */


.role-selection {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.role-selection div {
  display: flex;
  align-items: center;
}

.role-selection input[type="radio"] {
  display: none; /* Hide the default radio button */
}

.role-selection label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 8px;
  background-color: #f6f7f8;
  border: 2px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
  font-size: 16px;
  color: #333;
  box-shadow: 0 1px 0 rgba(0,0,0,.04) inset;
  gap: 8px;
  line-height: 1;
  border-color: rgba(0,0,0,.06);
}

.role-selection label:hover {
  background-color: #eef2f3;
  color: #111111;
  border-color: rgba(0,191,255,.45);
}

.role-selection label .dot {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  margin-right: 10px;
  background: transparent;  /* Make the dot invisible */
  border: none; /* Remove border to make it invisible */
  transition: all 0.3s ease;
}

/* Selected state for better visibility */
#producteur:checked + label[for="producteur"],
#acheteur:checked + label[for="acheteur"],
#admin:checked + label[for="admin"] {
  background: linear-gradient(135deg, rgba(0,191,255,.12), rgba(255,0,51,.12));
  border-color: var(--accent-cyan);
}

#producteur:checked + label[for="producteur"] .dot,
#acheteur:checked + label[for="acheteur"] .dot,
#admin:checked + label[for="admin"] .dot {
  background: var(--accent-cyan);
  border-color: transparent;
}
/* ------------------ Champs du formulaire ------------------ */
.user-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 20px 0 12px 0;
}

.user-details.common .input-box,
.user-details.producer-fields .input-box,
.user-details.buyer-fields .input-box {
  margin-bottom: 15px;
  width: calc(100% / 2 - 20px);
}

.user-details .input-box span.details {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
}

.user-details .input-box input {
  height: 45px;
  width: 100%;
  outline: none;
  font-size: 16px;
  border-radius: 10px;
  padding-left: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .06s ease;
}

/* Checkbox styling */
.input-box label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

.input-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.user-details .input-box input:focus,
.user-details .input-box input:valid {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,191,255,.15);
}
.container p {
  padding-top: 10px;
  padding-bottom: 7px;
}

/* ------------------ Affichage conditionnel des champs spécifiques ------------------ */
.user-details.producer-fields,
.user-details.buyer-fields {
  display: none;
}

#producteur:checked ~ .producer-fields {
  display: flex;
}

#acheteur:checked ~ .buyer-fields {
  display: flex;
}

/* ------------------ Bouton d'envoi ------------------ */
.button {
  height: 45px;
  margin: 15px 0 0 0; /* Adjusted the top margin */
  width: 100%;
}

.button input {
  height: 100%;
  width: 100%;
  border-radius: 12px;
  border: 2px solid var(--accent-cyan);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .2s ease, background .3s ease;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.button input:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: #ffffff;
  border-color: var(--accent-red);
}
.products-button {
  background: #ffffff;
  color: var(--brand-black);
  border: 2px solid var(--accent-cyan);
  padding: 12px 22px;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  margin-top: 12px;
  border-radius: 12px;
  transition: transform .08s ease, box-shadow .2s ease, background .3s ease;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.products-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: #ffffff;
  border-color: var(--accent-red);
}
a:visited {
  color: inherit; /* Change this to the color you prefer */
}

/* Section divider utility to mirror homepage rhythm */
.section-bar{ display:block; border-bottom: 1px solid rgba(0,0,0,.06); margin: 8px 0 18px; }
.section-title{ font-size: 20px; font-weight: 700; color: var(--brand-black); }

/* ------------------ Responsive ------------------ */
@media(max-width: 584px) {
  .container {
    max-width: 100%;
  }
  .user-details .input-box {
    width: 100%;
  }
  .content form .user-details {
    max-height: 300px;
    overflow-y: scroll;
  }
  .user-details::-webkit-scrollbar {
    width: 5px;
  }
}

@media(max-width: 459px) {
  .role-selection {
    flex-direction: column;
    align-items: flex-start;
  }
}
