/* Mobile-first — base 320px+ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue:       #3b82f6;
  --blue-dark:  #2563eb;
  --text:       #1e293b;
  --muted:      #64748b;
  --border:     #e2e8f0;
  --bg:         #f8fafc;
  --white:      #ffffff;
  --radius:     8px;
  --input-h:    48px;
}

html { font-size: 16px; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: .75rem;
  -webkit-text-size-adjust: 100%;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

/* ── En-tête ── */
header {
  text-align: center;
  padding: 1.5rem .5rem 1.25rem;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.subtitle {
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.6;
}

/* ── Sections ── */
.section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: .75rem;
}

.section-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--blue-dark);
  margin-bottom: .9rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid #eff6ff;
}

/* ── Grille de champs : 1 col sur mobile ── */
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

/* ── Labels ── */
label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.req { color: #ef4444; }

/* ── Inputs ── */
input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  min-height: var(--input-h);
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;       /* ≥16px : empêche le zoom iOS */
  color: var(--text);
  background: var(--white);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* ── Hints ── */
.hint {
  font-size: .8125rem;
  color: var(--muted);
}

.hint-inline {
  font-size: .8125rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Notice (nom légal) ── */
.notice {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: .6rem .85rem;
  font-size: .8125rem;
  color: #1e40af;
  line-height: 1.5;
}

.notice-icon { flex-shrink: 0; }

/* ── Autocomplete dropdown ── */
.addr-wrap { position: relative; }

.addr-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
  max-height: 240px;
  overflow-y: auto;
}

.addr-dropdown li {
  padding: .65rem .9rem;
  font-size: .9375rem;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  min-height: var(--input-h);
  display: flex;
  align-items: center;
}

.addr-dropdown li:last-child { border-bottom: none; }

.addr-dropdown li:hover,
.addr-dropdown li.active {
  background: #eff6ff;
  color: #1d4ed8;
}

.addr-dropdown li strong { font-weight: 700; }

/* ── Champ fichier ── */
.photo-btns {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: .4rem;
}

.photo-btn-wrap { display: contents; }

.file-wrap {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: var(--input-h);
  padding: 0 1.1rem;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  transition: background .15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.file-label:active { background: #e2e8f0; }

.file-name {
  font-size: .875rem;
  color: var(--muted);
  word-break: break-all;
}

/* ── Bouton submit ── */
.submit-wrap {
  text-align: center;
  margin-top: 1.25rem;
  padding: 0 .5rem;
}

.submit-btn {
  display: block;
  width: 100%;
  min-height: var(--input-h);
  padding: .75rem 1.5rem;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}

.submit-btn:active { background: var(--blue-dark); }

.privacy {
  margin-top: .85rem;
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Modal caméra ── */
.camera-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.camera-box {
  background: #1e293b;
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  width: 100%;
  max-width: 520px;
}

.camera-preview {
  width: 100%;
  border-radius: 8px;
  background: #000;
  max-height: 60vh;
  object-fit: cover;
}

.camera-hint {
  font-size: .875rem;
  color: #94a3b8;
  text-align: center;
}

.camera-capture-btn {
  min-height: var(--input-h);
  padding: 0 2rem;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.camera-capture-btn:active { background: #15803d; }

.camera-close-btn {
  min-height: 40px;
  padding: 0 1.5rem;
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  border-radius: 8px;
  font-size: .9rem;
  cursor: pointer;
  font-family: inherit;
}

.camera-close-btn:active { color: #fff; border-color: #94a3b8; }

/* ── sm : 576px+ ── */
@media (min-width: 576px) {
  body { padding: 1rem; }

  header { padding: 2rem 1rem 1.5rem; }
  header h1 { font-size: 1.75rem; }

  .section { padding: 1.4rem; }

  .row { grid-template-columns: 1fr 1fr; }

  .submit-btn {
    width: auto;
    display: inline-block;
    padding: .85rem 2.5rem;
  }
}

/* ── md : 768px+ ── */
@media (min-width: 768px) {
  body { padding: 1.5rem; }

  .section { padding: 1.5rem; }

  .file-label:hover { background: #e2e8f0; }

  .submit-btn:hover { background: var(--blue-dark); }
  .submit-btn:active { transform: scale(.98); }
}
