/* ART CONSTRUCTION - PV de chantier par la voix (hub /outils/pv-chantier-vocal-ia/). Prefixe .pv-. Mobile d'abord : 375 px sans defilement lateral. */
.pv { display: grid; gap: 18px; min-width: 0; max-width: 100%; }
.pv *, .pv *::before, .pv *::after { box-sizing: border-box; }
.pv-carte { min-width: 0; padding: 16px; border: 1px solid var(--ot-bord, #E2E8F0); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.10); }
@media (min-width: 640px) { .pv-carte { padding: 24px; } }
.pv-titre { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--ot-txt, #1E293B); font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.pv-etape { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #1D4ED8; color: #fff; font-size: 15px; font-weight: 700; }

.pv-statut { margin: 0; padding: 12px 14px; border: 1px solid #BFDBFE; border-radius: 12px; background: #EFF6FF; color: #1E3A8A; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.pv-statut[hidden] { display: none; }
.pv-statut-ok { border-color: #BBF7D0; background: #F0FDF4; color: #166534; }
.pv-statut-attention { border-color: #FDE68A; background: #FFFBEB; color: #92400E; }
.pv-statut-erreur { border-color: #FECACA; background: #FEF2F2; color: #991B1B; }

/* dictee */
.pv-barre { display: grid; gap: 14px; margin-bottom: 12px; }
.pv-micro { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 68px; padding: 12px 20px; border: 0; border-radius: 18px; background: #1D4ED8; color: #fff; font: inherit; font-size: 1.15rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 22px -12px rgba(29,78,216,.8); }
.pv-micro:hover { background: #1E40AF; }
.pv-micro:focus-visible, .pv-pv button:focus-visible, .pv-carte button:focus-visible { outline: 3px solid #93C5FD; outline-offset: 2px; }
.pv-micro-ic { font-size: 1.6rem; line-height: 1; }
.pv-micro-actif { background: #B91C1C; box-shadow: 0 0 0 0 rgba(185,28,28,.55); animation: pv-pulse 1.6s infinite; }
.pv-micro-actif:hover { background: #991B1B; }
@keyframes pv-pulse { 0% { box-shadow: 0 0 0 0 rgba(185,28,28,.5); } 70% { box-shadow: 0 0 0 16px rgba(185,28,28,0); } 100% { box-shadow: 0 0 0 0 rgba(185,28,28,0); } }
@media (prefers-reduced-motion: reduce) { .pv-micro-actif { animation: none; } }
@media (min-width: 640px) { .pv-barre { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); align-items: center; } }
.pv-options { display: grid; gap: 10px; min-width: 0; }
.pv-case { display: flex; align-items: flex-start; gap: 10px; color: var(--ot-sec, #475569); font-size: 14px; line-height: 1.45; }
.pv-case input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; }
.pv-interim { min-height: 1.4em; margin: 4px 0 6px; color: #64748B; font-size: 14.5px; font-style: italic; overflow-wrap: anywhere; }
.pv-alerte-nav { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #FDE68A; border-radius: 10px; background: #FFFBEB; color: #92400E; font-size: 14px; line-height: 1.5; }

/* champs */
.pv-champ { display: grid; align-content: start; gap: 4px; min-width: 0; }
.pv-champ > label { color: var(--ot-sec, #475569); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.pv input[type="text"], .pv input[type="date"], .pv input[type="number"], .pv input[type="email"], .pv select, .pv textarea {
  display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; color: var(--ot-txt, #1E293B); font: inherit; font-size: 16px; line-height: 1.4; }
.pv textarea { resize: vertical; min-height: 66px; overflow-wrap: anywhere; }
.pv .pv-texte { min-height: 170px; font-size: 16px; line-height: 1.5; }
.pv input:focus, .pv select:focus, .pv textarea:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.pv-aide { margin: 6px 0 0; color: var(--ot-mut, #64748B); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.pv-aide a, .pv-lien { color: #1D4ED8; text-decoration: underline; }
.pv-vide { margin: 0 0 8px; color: var(--ot-mut, #64748B); font-style: italic; }
.pv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pv-actions > .ot-btn { flex: 1 1 100%; }
@media (min-width: 640px) { .pv-actions > .ot-btn { flex: 0 1 auto; } }
.pv-fichier { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.pv-audio { display: grid; gap: 8px; margin-top: 14px; padding: 12px 14px; border: 1px dashed #CBD5E1; border-radius: 12px; background: #F8FAFC; }
.pv-audio[hidden] { display: none; }
.pv-audio audio { width: 100%; max-width: 100%; }
.pv-vie-privee { margin-top: 14px; border: 1px solid var(--ot-bord, #E2E8F0); border-radius: 12px; background: #F8FAFC; }
.pv-vie-privee summary { padding: 12px 14px; font-weight: 600; cursor: pointer; }
.pv-vie-privee p { margin: 0; padding: 0 14px 14px; color: var(--ot-sec, #475569); font-size: 14px; line-height: 1.6; }
.pv-reprise { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #FDE68A; border-radius: 12px; background: #FFFBEB; color: #92400E; font-size: 14.5px; }
.pv-reprise span { flex: 1 1 100%; }

/* PV structure */
.pv-pv { display: grid; gap: 22px; min-width: 0; }
.pv-section { display: grid; gap: 12px; min-width: 0; padding-top: 16px; border-top: 1px solid var(--ot-bord, #E2E8F0); }
.pv-section:first-child { padding-top: 0; border-top: 0; }
.pv-h3 { display: flex; align-items: center; gap: 10px; margin: 0; color: #1E3A8A; font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.pv-h3-num { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: #DBEAFE; color: #1E3A8A; font-size: 13px; }
.pv-h4 { margin: 0 0 8px; color: var(--ot-txt, #1E293B); font-size: .95rem; font-weight: 700; }
.pv-grille { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .pv-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .pv-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pv-large { grid-column: 1 / -1; }
.pv-trois { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.pv-bloc { display: grid; gap: 10px; min-width: 0; align-content: start; }
.pv-liste { display: grid; gap: 10px; min-width: 0; }
.pv-ligne { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); min-width: 0; padding: 12px; border: 1px solid var(--ot-bord, #E2E8F0); border-radius: 12px; background: #F8FAFC; }
@media (min-width: 520px) { .pv-ligne { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .pv-ligne-tache, .pv-ligne-finance { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pv-ligne > .pv-large, .pv-ligne > .pv-num, .pv-ligne > .pv-btn-suppr { grid-column: 1 / -1; }
.pv-num { color: var(--ot-mut, #64748B); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.pv-btn-suppr { justify-self: end; min-height: 40px; padding: 0 14px; border: 1px solid #FECACA; border-radius: 10px; background: #fff; color: #B91C1C; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pv-btn-suppr:hover { background: #FEF2F2; }
.pv-ajout { justify-self: start; min-height: 44px; }
.pv-ligne-tache { border-left: 5px solid #1D4ED8; }
.pv-ligne-tache[data-statut="En cours"] { border-left-color: #D97706; }
.pv-ligne-tache[data-statut="En retard"] { border-left-color: #DC2626; }
.pv-ligne-tache[data-statut="Levé"] { border-left-color: #16A34A; }
.pv-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-puce { display: inline-flex; padding: 4px 11px; border-radius: 999px; background: #DBEAFE; color: #1D4ED8; font-size: 13px; font-weight: 700; }
.pv-puce[data-statut="En cours"] { background: #FEF3C7; color: #B45309; }
.pv-puce[data-statut="En retard"] { background: #FEE2E2; color: #B91C1C; }
.pv-puce[data-statut="Levé"] { background: #DCFCE7; color: #15803D; }
.pv-totaux { margin: 4px 0 0; color: var(--ot-txt, #1E293B); font-size: 14px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.pv-totaux:empty { display: none; }
.pv-alertes { margin-bottom: 4px; padding: 12px 14px; border: 1px solid #FDE68A; border-radius: 12px; background: #FFFBEB; color: #92400E; font-size: 14px; line-height: 1.5; }
.pv-alertes ul { margin: 6px 0 0; padding-left: 20px; }
.pv-alertes-titre { margin: 0; font-weight: 700; }
.pv-carte[hidden] { display: none; }

/* tableaux du guide : tiennent dans 375 px sans defilement lateral */
@media (max-width: 640px) { .pv-tab { table-layout: fixed; width: 100%; } .ot-guide .pv-tab th, .ot-guide .pv-tab td { padding: 8px 7px; font-size: 13px; overflow-wrap: anywhere; hyphens: auto; } }
