

/* --- General & Layout --- */


main {
  position: relative;
  top: 120px; /* Offset to clear the fixed header */
  padding-bottom: 80px; /* Space above the footer */
  min-height: calc(100vh - 200px); /* Adjust based on header/footer heights if needed */
}

/* --- Section Headers (from previous page, kept for consistency) --- */
.section-header {
  background-color: var(--color-red);
  width: fit-content;
  padding: 10px 20px;
  border-radius: 999px;
  margin-bottom: 30px;
  box-sizing: border-box;
}

.section-header h2 {
  margin: 0;
  font-size: 1.5em;
  color: var(--color-white);
  white-space: nowrap;
}

.section-header--left {
  margin-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding-left: 40px;
}

.section-header--left h2 {
  margin-left: 100px;
}

/* --- Main Form Container (matching .largeur-form from Nous Rejoindre) --- */
.main-content-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 30px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.03); /* Frosted glass effect */
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* --- Quote Page Specific Text --- */
.quote-intro-text {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1em;
  color: var(--color-white);
  line-height: 1.6;
}

.quote-intro-text p:first-child {
  font-weight: bold;
  margin-bottom: 10px;
}
.quote-intro-text p:last-child {
  margin-bottom: 0;
}

/* --- Form Section (matching input styles from Contact Page) --- */
.quote-form-section form {
    background: transparent; /* Form itself has no background */
    padding: 0;
    border-radius: 8px;
}

.form-row {
    display: flex;
    gap: 25px; /* Horizontal gap between inputs in the same row */
    margin-bottom: 25px; /* Consistent vertical space between rows */
    flex-wrap: wrap;
}

/* This is the key adjustment: ensuring consistent spacing */
/* Remove margin-bottom from the last form-row if needed, or manage it with padding on container */
.quote-form-section form .form-row:last-of-type {
    margin-bottom: 25px; /* Keep consistent or remove if file upload is part of the same spacing system */
}


.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea {
    flex: 1;
    min-width: 250px;
    padding: 18px 20px;
    background-color: rgba(255, 255, 255, 0.07); /* Frosted input background */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Input border */
    border-radius: 12px;
    color: var(--color-white);
    font-size: 1.05em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    appearance: none;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--color-gray-medium);
    opacity: 0.7;
}

.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--color-red);
    box-shadow: 0 0 0 4px rgba(237, 41, 57, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}

.quote-textarea { /* Specific class for quote form's larger textarea */
    min-height: 200px;
    resize: vertical;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Submit Button (matching Contact page's submit button) --- */
.submit-button-container {
  text-align: center;
  margin-top: 25px; /* Adjusted to match form-row margin-bottom */
}

.submit-button {
  background: linear-gradient(to bottom, #FFFFFF, #F0F0F0);
  color: #ED2939;
  padding: 12px 24px;
  border: 1px solid #C0C0C0;
  border-radius: 999px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  text-align: center;
  display: inline-block;
}

.submit-button:hover {
  background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.submit-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* --- File Upload Button (Updated to match Nous Rejoindre page) --- */
.file-upload-button-container {
  text-align: center;
  margin-top: 25px; /* Adjusted to match form-row margin-bottom */
  margin-bottom: 0; /* No bottom margin, as the span handles it or it's the last element before submit */
}

.file-upload-button {
  background: linear-gradient(to right, var(--color-blue-light), var(--color-blue)); /* Gradient background */
  color: var(--color-white);
  padding: 18px 45px; /* Larger padding */
  border: none;
  border-radius: 30px; /* More rounded */
  font-size: 1.25em; /* Larger font size */
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 15px rgba(29, 60, 97, 0.3); /* Deeper shadow */
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  letter-spacing: 0.5px; /* Added letter spacing */
  position: relative;
  overflow: hidden;
  display: inline-flex; /* For icon and text alignment */
  align-items: center;
  justify-content: center;
  gap: 10px; /* Space between icon and text */
}

.file-upload-button i { /* Style for the icon */
  font-size: 1.2em;
}

.file-upload-button:hover {
  background: linear-gradient(to right, #7ab3f1, #2a5288); /* Lighter gradient on hover */
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(29, 60, 97, 0.4);
}

.file-upload-button:active {
  transform: scale(0.98); /* Slight scale down on active */
  box-shadow: 0 4px 10px rgba(29, 60, 97, 0.4);
}

/* Hide the actual file input */
.file-upload-button input[type="file"] {
  display: none;
}

/* Style for displaying selected file name (New for Devis page) */
.file-name-display {
  display: block;
  margin-top: 15px; /* Consistent margin from the button above */
  margin-bottom: 25px; /* Consistent margin before the next element (submit button container) */
  color: var(--color-gray-medium);
  font-size: 0.95em;
  min-height: 20px; /* Ensure space even when no file is selected */
}


/* --- Responsive Adjustments --- */
@media (max-width: 890px) {
  .section-header--left h2 {
    margin-left: 50px;
  }
  .main-content-container {
    margin: 60px 20px;
    padding: 25px;
  }
}

@media (max-width: 768px) {
    .main-content-container {
        margin: 40px 15px;
        padding: 20px;
    }
    .form-row {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 15px; /* Adjusted vertical spacing for mobile */
    }
    .form-row input,
    .form-row textarea {
        min-width: unset;
        padding: 14px 16px;
        font-size: 0.95em;
    }
    .quote-textarea {
        min-height: 150px;
    }
    .submit-button { /* Adjusted for full width on mobile */
        width: 100%;
        padding: 12px 0;
        font-size: 1em;
    }
    .file-upload-button-container {
      margin-top: 15px; /* Adjusted for mobile */
      margin-bottom: 0;
    }
    .file-upload-button { /* Adjusted for full width on mobile */
        width: 100%;
        padding: 15px 0; /* Maintain button height */
        font-size: 1.05em; /* Match larger text */
    }
    .file-name-display {
        margin-top: 10px; /* Adjusted for mobile */
        margin-bottom: 15px; /* Adjusted for mobile */
        font-size: 0.8em; /* Smaller text for file display */
    }
    .submit-button-container {
      margin-top: 15px; /* Adjusted for mobile */
    }
}

@media (max-width: 480px) {
    .main-content-container {
        margin: 20px 10px;
        padding: 15px;
    }
    .form-row {
        gap: 12px;
        margin-bottom: 12px; /* Further adjusted vertical spacing for very small mobile */
    }
    .form-row input,
    .form-row textarea {
        padding: 10px 12px;
        font-size: 0.85em;
    }
    .quote-textarea {
        min-height: 120px;
    }
    .submit-button,
    .file-upload-button {
        font-size: 0.9em;
        padding: 10px 0;
    }
    .file-upload-button-container {
      margin-top: 12px;
    }
    .file-name-display {
      margin-top: 8px;
      margin-bottom: 12px;
    }
    .submit-button-container {
      margin-top: 12px;
    }
}