:root {
  --color-bg: #f5f6f8;
  --color-surface: #ffffff;
  --color-text: #1f2430;
  --color-muted: #6b7280;
  --color-border: #e6e8ec;
  --color-primary: #c62426;
  --color-primary-hover: #a51e20;
  --color-primary-bg: #fdecec;
  --color-error: #c62426;
  --color-error-bg: #fdecec;
  --color-priority-low: #9ca3af;
  --color-priority-normal: #2563eb;
  --color-priority-high: #c62426;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 2px 4px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Header */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
}

.brand-logo {
  display: block;
  width: auto;
}

/* Footer */

.site-footer {
  color: var(--color-muted);
  font-size: 0.8125rem;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--color-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

@media (max-width: 560px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Layout */

main.container {
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .page-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

.card.narrow {
  max-width: 640px;
  margin: 0 auto;
}

.form-card h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.lead {
  color: var(--color-muted);
  margin: 0 0 28px;
}

/* Form sections */

.form-section {
  margin-bottom: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.form-section:first-of-type {
  padding-top: 0;
  border-top: none;
}

.form-section-title,
.info-card-title,
.urgent-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.urgent-card-title {
  color: var(--color-error);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 18px;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.875rem;
}

.required {
  color: var(--color-primary);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

input::placeholder,
textarea::placeholder {
  color: #a3a9b4;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-bg);
}

textarea {
  resize: vertical;
}

.field-hint {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin: 6px 0 0;
}

.field-error {
  font-size: 0.8125rem;
  color: var(--color-error);
  margin: 6px 0 0;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.875rem;
}

.alert-error {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid #f7c9c9;
}

/* Priority segmented control */

.priority-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.priority-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-muted);
}

.priority-low .priority-dot { background: var(--color-priority-low); }
.priority-normal .priority-dot { background: var(--color-priority-normal); }
.priority-high .priority-dot { background: var(--color-priority-high); }

.priority-input:focus-visible + .priority-pill {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.priority-input:checked + .priority-pill.priority-low {
  border-color: var(--color-priority-low);
  background: #f3f4f6;
}

.priority-input:checked + .priority-pill.priority-normal {
  border-color: var(--color-priority-normal);
  background: #eff4ff;
  color: var(--color-priority-normal);
}

.priority-input:checked + .priority-pill.priority-high {
  border-color: var(--color-priority-high);
  background: var(--color-primary-bg);
  color: var(--color-priority-high);
}

/* Dropzone */

.dropzone {
  position: relative;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
  background: #fafafb;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.is-dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}

.dropzone.has-file {
  border-style: solid;
  border-color: var(--color-priority-normal);
}

.dropzone-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.dropzone-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 16px;
  cursor: pointer;
  pointer-events: none;
}

.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  margin-bottom: 4px;
}

.dropzone-icon svg {
  width: 18px;
  height: 18px;
}

.dropzone-text {
  font-size: 0.875rem;
  color: var(--color-text);
}

.dropzone-text .link {
  color: var(--color-primary);
  font-weight: 600;
}

.dropzone-hint {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.dropzone-filelist {
  position: relative;
  z-index: 2;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  width: 100%;
  max-width: 320px;
  pointer-events: auto;
}

.dropzone-filelist:empty {
  display: none;
}

.dropzone-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-priority-normal);
  text-align: left;
}

.dropzone-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone-file-remove {
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.dropzone-file-remove:hover {
  color: var(--color-error);
}

/* Footer / submit */

.form-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.form-footer .btn {
  align-self: flex-end;
}

@media (max-width: 560px) {
  .form-footer .btn {
    align-self: stretch;
  }
}

.consent-group {
  margin-bottom: 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--color-muted);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-secondary {
  background: #f0f1f3;
  color: var(--color-text);
}

.btn-secondary:hover {
  background: #e6e8ec;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8125rem;
}

/* Sidebar */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card,
.urgent-card {
  padding: 24px;
}

.stat {
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}

.stat:first-of-type {
  border-top: none;
  padding-top: 0;
}

.stat-value {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-hours-value {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.stat-label {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.urgent-card {
  background: var(--color-error-bg);
  border-color: #f7c9c9;
}

.urgent-card p:not(.urgent-card-title) {
  margin: 0;
  font-size: 0.875rem;
  color: #7a1c1d;
}

/* Success page */

.text-center {
  text-align: center;
}

/* Legal pages */

.legal-card {
  max-width: 760px;
  margin: 0 auto;
}

.legal-card h2 {
  font-size: 1rem;
  margin: 28px 0 8px;
}

.legal-card h2:first-of-type {
  margin-top: 24px;
}

.legal-card p {
  margin: 0 0 12px;
  color: var(--color-text);
}

.legal-card ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal-card li {
  margin-bottom: 4px;
}

.legal-card a {
  color: var(--color-primary);
}

.legal-todo {
  background: var(--color-primary-bg);
  border: 1px solid #f7c9c9;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8125rem;
  color: #7a1c1d;
}

/* Honeypot anti-bot : masque a l'ecran mais lisible par les bots naifs qui ignorent le CSS */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}
