/* ================================================================
   Devis & RDV — JoEvent  |  Styles scopés sous .drv-wrap
   ================================================================ */

/* ── Reset box-sizing ─────────────────────────────────────────── */
.drv-wrap *,
.drv-wrap *::before,
.drv-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Conteneur principal ──────────────────────────────────────── */
.drv-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: #111827;
  background: #f9fafb;
  padding: 3rem 1rem;
  -webkit-font-smoothing: antialiased;
}

/* ── Grille deux colonnes ─────────────────────────────────────── */
.drv-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .drv-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Carte ────────────────────────────────────────────────────── */
.drv-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  padding: 1.5rem;
}
@media (min-width: 640px) { .drv-card { padding: 2rem; } }

/* ── Titres ───────────────────────────────────────────────────── */
.drv-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: .75rem;
  line-height: 1.25;
}
@media (min-width: 640px) { .drv-title { font-size: 1.875rem; } }

.drv-subtitle {
  font-size: .875rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* ── Formulaire ───────────────────────────────────────────────── */
.drv-form { display: flex; flex-direction: column; gap: 1rem; }

.drv-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .drv-row { grid-template-columns: 1fr 1fr; } }

.drv-field { display: flex; flex-direction: column; }

/* ── Labels ───────────────────────────────────────────────────── */
.drv-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: .375rem;
}
.drv-label-hint {
  font-weight: 400;
  color: #6b7280;
}

/* ── Inputs / Select / Textarea ───────────────────────────────── */
.drv-input,
.drv-select,
.drv-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: .5rem;
  padding: .625rem 1rem;
  font-size: .875rem;
  color: #111827;
  background: #fff;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.drv-input::placeholder,
.drv-textarea::placeholder { color: #9ca3af; }

.drv-input:focus,
.drv-select:focus,
.drv-textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.18);
}

/* Flèche select */
.drv-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.drv-textarea { resize: vertical; min-height: 7rem; }

/* ── Bouton déclencheur calendrier ────────────────────────────── */
.drv-cal-trigger {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid #d1d5db;
  border-radius: .5rem;
  padding: .625rem 1rem;
  font-size: .875rem;
  background: #fff;
  cursor: pointer;
  color: #374151;
  font-family: inherit;
  transition: background .15s ease, border-color .15s ease;
}
.drv-cal-trigger:hover { background: #f9fafb; border-color: #9ca3af; }
.drv-cal-trigger svg { color: #4f46e5; flex-shrink: 0; }

/* ── Popover calendrier ───────────────────────────────────────── */
.drv-cal-wrap { position: relative; }

.drv-cal-popover {
  display: none;
  position: absolute;
  z-index: 200;
  top: calc(100% + .375rem);
  left: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.10),
              0 4px 6px -2px rgba(0,0,0,.05);
  padding: .75rem;
  min-width: 280px;
}
.drv-cal-popover.open { display: block; }

/* ── En-tête du mois ─────────────────────────────────────────── */
.drv-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.drv-cal-nav {
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: .375rem;
  color: #374151;
  font-size: 1.125rem;
  line-height: 1;
  font-family: inherit;
}
.drv-cal-nav:hover { background: #f3f4f6; }
.drv-cal-month-label {
  font-size: .875rem;
  font-weight: 600;
  color: #111827;
  text-transform: capitalize;
}

/* ── Grille des jours ────────────────────────────────────────── */
.drv-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.drv-cal-dow {
  text-align: center;
  font-size: .75rem;
  font-weight: 500;
  color: #9ca3af;
  padding: .25rem 0;
}
.drv-cal-day {
  text-align: center;
  font-size: .8125rem;
  padding: .375rem 0;
  border-radius: .375rem;
  cursor: pointer;
  border: none;
  background: none;
  color: #374151;
  transition: background .1s ease;
  font-family: inherit;
  width: 100%;
}
.drv-cal-day:hover:not(:disabled) { background: #f3f4f6; }
.drv-cal-day.selected             { background: #4f46e5; color: #fff; font-weight: 600; }
.drv-cal-day.today                { font-weight: 700; color: #4f46e5; }
.drv-cal-day.today.selected       { color: #fff; }
.drv-cal-day:disabled             { color: #d1d5db; cursor: default; pointer-events: none; }

/* ── Grille des créneaux horaires ────────────────────────────── */
.drv-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-top: .75rem;
}
@media (min-width: 640px) {
  .drv-slots-grid { grid-template-columns: repeat(6, 1fr); }
}

.drv-slot-btn {
  border: 1px solid #d1d5db;
  border-radius: .5rem;
  padding: .5rem .25rem;
  font-size: .75rem;
  font-weight: 500;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all .15s ease;
  text-align: center;
  font-family: inherit;
}
.drv-slot-btn:hover        { background: #f9fafb; }
.drv-slot-btn.active       { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.drv-slot-btn.active:hover { background: #4338ca; }

/* ── Tags créneaux sélectionnés ──────────────────────────────── */
.drv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.drv-tag {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 9999px;
  padding: .25rem .75rem;
  font-size: .75rem;
  color: #3730a3;
}
.drv-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #6366f1;
  display: inline-flex;
  align-items: center;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  transition: color .1s;
}
.drv-tag-remove:hover { color: #312e81; }

/* ── Compteur créneaux ───────────────────────────────────────── */
.drv-slot-count {
  margin-top: .5rem;
  font-size: .75rem;
}
.drv-slot-count--ok  { color: #15803d; }
.drv-slot-count--err { color: #dc2626; }

/* ── Consentement RGPD ───────────────────────────────────────── */
.drv-consent {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .875rem;
  color: #4b5563;
  cursor: pointer;
  line-height: 1.5;
}
.drv-consent input[type="checkbox"] {
  margin-top: .2rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: #4f46e5;
  cursor: pointer;
}

/* ── Bouton Envoyer ──────────────────────────────────────────── */
.drv-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
  font-family: inherit;
}
.drv-submit:hover:not(:disabled) { background: #4338ca; }
.drv-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── Spinner ─────────────────────────────────────────────────── */
.drv-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: drv-spin .6s linear infinite;
  flex-shrink: 0;
}
@keyframes drv-spin { to { transform: rotate(360deg); } }

/* ── Alertes ─────────────────────────────────────────────────── */
.drv-alert {
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-size: .875rem;
  line-height: 1.5;
}
.drv-alert:empty { display: none; }
.drv-alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.drv-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ── Panneau d'info (colonne droite) ─────────────────────────── */
.drv-info { display: flex; flex-direction: column; gap: 1.5rem; }

.drv-info-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: #4f46e5;
  margin-bottom: 1.5rem;
}

.drv-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.drv-contact-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .875rem;
  color: #374151;
}
.drv-contact-icon {
  flex-shrink: 0;
  color: #4f46e5;
  width: 1.25rem;
  height: 1.25rem;
}

/* ── Réseaux sociaux ─────────────────────────────────────────── */
.drv-social {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
}
.drv-social-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.drv-social-btn:hover { background: #4f46e5; color: #fff; }

/* ── Placeholder carte ───────────────────────────────────────── */
.drv-map-placeholder {
  height: 12rem;
  border-radius: 1rem;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: .875rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
