/* ═══════════════════════════════════════════════════════════════════════
   CAMALARM CRM — T171 UI POLISH (Devis Classique + Express)
   ═══════════════════════════════════════════════════════════════════════
   Ajustements visuels uniquement, aucune modification de logique :
     • Bandeau client plus aéré (padding + gap accrus)
     • Espace plus clair entre bandeau client et carte Projet
     • Bouton "Ajouter / changer client" plus visible
     • Token [[OPTIONS_NON_INCLUSES]] masqué dans l'éditeur Notes
       (le PDF garde le marqueur intact pour son rendu)
     • Confort de la zone Notes (rappel — déjà T170aa)

   Ce fichier est chargé après devis-classique-t131.css et components.css
   pour avoir la précédence finale sur les règles communes.
   ═══════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────
   1. Bandeau client — plus aéré
   ─────────────────────────────────────────────────────────── */
#tab-dvc-scope .dv-client-bar {
  padding: 18px 22px !important;
  gap: 22px !important;
  margin-bottom: 16px !important;       /* espace clair vers la carte Projet */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(15, 61, 103, 0.04) !important;
}

/* Avatar légèrement plus grand pour respirer */
#tab-dvc-scope .dv-client-avatar {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
}
#tab-dvc-scope .dv-client-avatar::before {
  font-size: 15px !important;
}

/* Nom client plus respirant */
#tab-dvc-scope .dv-client-name,
#tab-dvc-scope #dvcCN {
  font-size: 17px !important;
  line-height: 1.3 !important;
  margin-bottom: 2px !important;
}

/* Meta (email, TVA) avec un peu plus d'air */
#tab-dvc-scope .dv-client-meta {
  gap: 3px !important;
  font-size: 12.5px !important;
  color: #475569 !important;
}
#tab-dvc-scope .dv-client-meta span:empty {
  display: none !important;
}

/* Bouton "Ajouter / changer client" plus marqué visuellement */
#tab-dvc-scope .dv-client-addbtn {
  padding: 8px 14px !important;
  border-radius: 8px !important;
  background: rgba(15, 61, 103, 0.04) !important;
  border: 1px dashed rgba(15, 61, 103, 0.2) !important;
  color: #0F3D67 !important;
  font-weight: 600 !important;
  font-size: 12.5px !important;
  cursor: pointer !important;
  transition: background .15s ease, border-color .15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
#tab-dvc-scope .dv-client-addbtn:hover {
  background: rgba(15, 61, 103, 0.08) !important;
  border-color: rgba(15, 61, 103, 0.4) !important;
  border-style: solid !important;
}

/* Le sous-titre (input) au milieu : un peu plus de respiration */
#tab-dvc-scope .dv-client-project .dv-input {
  padding: 10px 14px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
}

/* Zone date + N° devis : alignement et lisibilité */
#tab-dvc-scope .dv-client-ref {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  white-space: nowrap !important;
}
#tab-dvc-scope .dv-client-ref input[type="date"] {
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  background: #ffffff !important;
  cursor: pointer !important;
}
#tab-dvc-scope .dv-client-ref #dvcNm {
  font-family: 'JetBrains Mono', 'Menlo', monospace !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #E65100 !important;
  background: rgba(230, 81, 0, 0.08) !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  letter-spacing: 0.02em !important;
  margin-left: 0 !important;
}

/* ───────────────────────────────────────────────────────────
   2. Bandeau client Devis Express (même logique)
   ─────────────────────────────────────────────────────────── */
#tab-dv-scope .dv-client-bar {
  padding: 18px 22px !important;
  gap: 22px !important;
  margin-bottom: 16px !important;
}

/* ───────────────────────────────────────────────────────────
   3. Token [[OPTIONS_NON_INCLUSES]] — masquer dans l'éditeur
   ───────────────────────────────────────────────────────────
   Astuce : le texte du span EST le marqueur original
   ([[OPTIONS_NON_INCLUSES]]) pour qu'au moment du PDF, le
   stripHtml le préserve. Côté UI, on masque ce texte avec
   font-size: 0 et on affiche un beau libellé via ::before. */
#dvc_notes .ix-options-marker,
#d_notes .ix-options-marker {
  display: block;
  margin: 12px 0 8px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(230, 81, 0, 0.10), rgba(230, 81, 0, 0.02));
  border-left: 4px solid #E65100;
  border-radius: 4px;
  font-size: 0 !important;            /* masque le texte du marqueur */
  line-height: 0;
  color: transparent;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
  position: relative;
}
#dvc_notes .ix-options-marker::before,
#d_notes .ix-options-marker::before {
  content: 'OPTIONS NON INCLUSES DANS LE PRÉSENT DEVIS';
  display: block;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #b33d00;
  text-transform: uppercase;
}

/* ───────────────────────────────────────────────────────────
   4. Notes — rappel des améliorations T170aa (defensive)
   ─────────────────────────────────────────────────────────── */
#dvc_notes,
#d_notes {
  min-height: 280px !important;
  resize: vertical !important;
  overflow-y: auto !important;
  font-family: 'Inter', 'Segoe UI', Arial, system-ui, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  padding: 14px 16px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  color: #1e293b !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
}
#dvc_notes:focus,
#d_notes:focus {
  border-color: #0F3D67 !important;
  box-shadow: 0 0 0 3px rgba(15, 61, 103, 0.10) !important;
}

/* Responsive : sur petit écran, le bandeau client passe en colonne */
@media (max-width: 900px) {
  #tab-dvc-scope .dv-client-bar {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  #tab-dvc-scope .dv-client-ref {
    flex-wrap: wrap !important;
  }
}
