/* OvniMail — cockpit mail. Copyright (C) 2026 Distri-Matic FC */

.ovm-brief { display: flex; gap: 14px; align-items: flex-start; padding: 12px 16px; margin: 4px 0 14px; border-radius: 8px; background: rgba(46, 134, 193, 0.08); border-left: 4px solid #2e86c1; }
.ovm-brief-who { font-weight: 700; letter-spacing: 1px; color: #2e86c1; padding-top: 1px; }
.ovm-brief-lines div { line-height: 1.6; }

.ovm-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 14px; }
.ovm-filters label { white-space: nowrap; }

.ovm-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .ovm-board { grid-template-columns: repeat(2, minmax(220px, 1fr)); } }
@media (max-width: 640px) { .ovm-board { grid-template-columns: 1fr; } }

.ovm-col { background: rgba(127, 127, 127, 0.06); border-radius: 8px; padding: 8px; min-height: 80px; }
/* Grand écran (34") : les cartes d'une colonne se rangent par 2 dès qu'il y a la place */
.ovm-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); column-gap: 8px; align-content: start; }
.ovm-col > .ovm-col-head, .ovm-col > .ovm-empty { grid-column: 1 / -1; }
.ovm-col-head { font-weight: 600; padding: 4px 4px 8px; border-bottom: 3px solid #95a5a6; margin-bottom: 8px; }
.ovm-col-1 .ovm-col-head { border-bottom-color: #c0392b; }
.ovm-col-2 .ovm-col-head { border-bottom-color: #e67e22; }
.ovm-col-3 .ovm-col-head { border-bottom-color: #2e86c1; }
.ovm-col-4 .ovm-col-head { border-bottom-color: #95a5a6; }
.ovm-empty { padding: 8px 4px; }

.ovm-card { background: var(--colorbackbody, #fff); border: 1px solid rgba(127, 127, 127, 0.25); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.ovm-card.ovm-unread { border-left: 3px solid #2e86c1; }
.ovm-line1 { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-bottom: 4px; }
.ovm-type { color: #fff; font-size: 0.8em; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.ovm-type-none { background: #95a5a6; }
.ovm-from { font-weight: 600; }
.ovm-kind { font-size: 0.78em; padding: 0 6px; border-radius: 10px; border: 1px solid currentColor; white-space: nowrap; }
.ovm-kind-client { color: #239b56; }
.ovm-kind-prospect { color: #b9770e; }
.ovm-kind-supplier { color: #5d6d7e; }
.ovm-kind-unknown { color: #95a5a6; }
.ovm-subject { font-weight: 600; margin: 2px 0; overflow-wrap: anywhere; }
.ovm-summary, .ovm-action, .ovm-reason { font-size: 0.92em; margin: 2px 0; }
.ovm-action { font-weight: 600; }
.ovm-foot { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ovm-age { font-size: 0.85em; padding: 0 6px; border-radius: 10px; }
.ovm-age-green { background: rgba(35, 155, 86, 0.15); color: #1e8449; }
.ovm-age-orange { background: rgba(230, 126, 34, 0.18); color: #b9770e; }
.ovm-age-red { background: rgba(192, 57, 43, 0.15); color: #c0392b; font-weight: 600; }
.ovm-age-none { background: rgba(127, 127, 127, 0.12); }
.ovm-badge { font-size: 0.78em; padding: 0 6px; border-radius: 10px; }
.ovm-badge-followup { background: #c0392b; color: #fff; }
.ovm-badge-verify { background: #f4d03f; color: #333; }
.ovm-buttons { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.ovm-btn { display: inline-block; cursor: pointer; font-size: 0.85em; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(127, 127, 127, 0.4); background: transparent; color: inherit; text-decoration: none; list-style: none; }
.ovm-btn:hover { background: rgba(127, 127, 127, 0.12); text-decoration: none; }
.ovm-reclass summary::-webkit-details-marker { display: none; }
.ovm-reclass[open] form { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }

.ovm-noise { margin-top: 14px; }
.ovm-noise summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.ovm-noise-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ovm-sync { margin-top: 14px; font-size: 0.85em; }
.ovm-box-critical { color: #c0392b; font-weight: 600; }

/* 0.2 : bloc En attente, répondus, équipe */
.ovm-waiting { margin: 0 0 16px; padding: 10px; border-radius: 8px; border: 1px solid rgba(125, 60, 152, 0.35); background: rgba(125, 60, 152, 0.05); }
.ovm-waiting-head { font-weight: 600; cursor: pointer; }
.ovm-waiting[open] > .ovm-waiting-head { margin-bottom: 10px; }
.ovm-waiting-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 14px; align-items: start; }
/* Cartes sur 2 colonnes dans chaque groupe d'échéance (1 seule sur petit écran) */
.ovm-wgroup { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 8px; align-items: start; }
.ovm-wgroup .ovm-card { margin-bottom: 0; }
.ovm-wgroup-head { grid-column: 1 / -1; font-weight: 600; padding: 2px 4px 6px; border-bottom: 3px solid #95a5a6; }
.ovm-wgroup-late .ovm-wgroup-head { border-bottom-color: #c0392b; }
.ovm-wgroup-soon .ovm-wgroup-head { border-bottom-color: #e67e22; }
.ovm-wgroup-later .ovm-wgroup-head { border-bottom-color: #239b56; }
.ovm-due { font-weight: 600; }
.ovm-card.ovm-replied { opacity: 0.6; }
.ovm-badge-replied { background: #239b56; color: #fff; }
.ovm-kind-team { color: #2e86c1; }
