/* Écran « À valider », carte de validation dans la conversation, petites cartes de l'accueil.

   Même langage que Applications, Équipe et les cartes du fil : relief par la seule clarté (aucune bordure au repos, une marche
   de ton plus claire pour ce qui ressort, le texte à lire sur la marche la plus claire), aucune ombre, aucun dégradé. Ocre =
   « il faut vous » (la file, l'attente longue) ; turquoise = un état (« Validé », « Copié ») ; l'action principale est en
   inversion (fond ivoire, texte marine, classe .btn-stop). Les survols et appuis des boutons .btn viennent de buttons.css.

   Largeur de lecture : le contenu exact ne dépasse jamais 46 rem (≈ 70 signes par ligne), même sur grand écran.
   Sous 860 px : tout ce qui se touche fait 44 px ; sous 560 px : les trois réponses s'empilent, pleine largeur. */

.appr-page, .vc, .mc, .approval-mini {
  --appr-rest: rgba(246,242,234,.045);
  --appr-raised: rgba(246,242,234,.075);
  --appr-band: rgba(246,242,234,.05);
  --appr-hover: rgba(246,242,234,.10);
  --appr-press: rgba(246,242,234,.14);
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ── Écran ──────────────────────────────────────────────────────────────── */

.appr-page { max-width: 880px; min-width: 0; }
.appr-lead { max-width: 560px; margin-bottom: 0; font-size: 14px; }
.appr-count { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 24px 0 16px; font-size: 15px; line-height: 1.4; color: var(--ivory); }
.appr-count strong { font-weight: 600; }
.appr-sq { flex: none; width: 8px; height: 8px; background: var(--ochre-light); }
.appr-count-late { color: var(--ochre-light); }
.appr-count-late::before { content: "·"; margin-right: 10px; color: var(--mute); }
.appr-queue { margin-top: 24px; }
.appr-count + .appr-queue { margin-top: 0; }
.appr-list { display: flex; flex-direction: column; gap: 12px; }

/* ── Carte d'une demande ────────────────────────────────────────────────── */

.appr-card { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 22px 24px; background: var(--appr-rest); outline: none; }
.appr-card:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; }

.appr-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 0 12px; }
.appr-who { min-width: 0; }
.appr-name { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; min-width: 0; font-size: 15px; line-height: 22px; color: var(--ivory); }
.appr-name strong { font-weight: 700; overflow-wrap: anywhere; }
.appr-kind { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; background: rgba(246,242,234,.08); color: var(--sand); font-size: 12px; font-weight: 600; white-space: nowrap; }
.appr-by { font-size: 12.5px; line-height: 18px; color: var(--mute); overflow-wrap: anywhere; }
.appr-when { text-align: right; font-size: 13px; line-height: 18px; color: var(--mute); font-variant-numeric: tabular-nums; }
.appr-when.is-late { color: var(--ochre-light); font-weight: 600; }

.appr-title { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--ivory); overflow-wrap: anywhere; }

.appr-sec { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 46rem; }
.appr-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.appr-label { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.appr-why { margin: 0; max-width: 46rem; font-size: 15px; line-height: 1.55; color: var(--sand); overflow-wrap: anywhere; }

/* Panneau de lecture : ce qui sera envoyé, publié, payé ou supprimé. Police du produit (pas de chasse fixe), retours à la
   ligne conservés, mots longs coupés plutôt que de déborder. L'en-tête d'un e-mail est une bande un ton plus claire. */
.appr-read { padding: 16px 18px; background: var(--appr-raised); }
.appr-hdrs { margin: -16px -18px 14px; padding: 12px 18px; display: flex; flex-direction: column; gap: 4px; background: var(--appr-band); }
.appr-hdrs > div { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 0 10px; align-items: baseline; }
.appr-hdrs dt { font-size: 13px; line-height: 22px; color: var(--mute); }
.appr-hdrs dd { margin: 0; font-size: 14.5px; line-height: 22px; font-weight: 600; color: var(--ivory); overflow-wrap: anywhere; }
.appr-text { font-size: 15px; line-height: 1.65; color: var(--ivory); white-space: pre-wrap; overflow-wrap: anywhere; }
.appr-text.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; line-clamp: 8; overflow: hidden; }
.appr-nocontent { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--mute); }

/* Liens-boutons discrets : « Voir tout », « Actualiser ». */
.appr-more, .appr-link { display: inline-flex; align-items: center; align-self: flex-start; min-height: 32px; margin: 0; padding: 0; background: none; border: 0;
  color: var(--ivory); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(246,242,234,.4); text-underline-offset: 3px; }
.appr-more:hover, .appr-link:hover { text-decoration-color: var(--ivory); }
.appr-more:focus-visible, .appr-link:focus-visible, .appr-conv:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; }

.btn.appr-copy { flex: none; min-height: 32px; padding: 0 12px; gap: 6px; background: rgba(246,242,234,.09); color: var(--ivory); font-size: 13px; font-weight: 600; }
.btn.appr-copy:hover:not(:disabled) { background: rgba(246,242,234,.16); }
.btn.appr-copy.is-copied { color: var(--turq); }

/* Décision : « Valider » en inversion, « Refuser » un ton plus clair que la carte, « Demander une modification » en texte,
   à l'écart pour qu'on ne le touche pas par erreur. */
.appr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.appr-actions .btn { min-height: 44px; padding: 0 22px; }
.appr-actions .appr-go { min-width: 128px; }
.btn.appr-soft { background: rgba(246,242,234,.09); color: var(--ivory); }
.btn.appr-soft:hover:not(:disabled) { background: rgba(246,242,234,.16); }
.appr-actions .appr-edit { margin-left: auto; padding: 0 14px; }
.appr-actions .btn:disabled { opacity: .55; }
.appr-actions .spinner { border-color: rgba(36,51,93,.25); border-top-color: var(--navy); margin-right: 2px; }

.appr-error { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: rgba(255,158,138,.08); font-size: 14px; line-height: 1.5; color: var(--sand); }
.appr-error .ico { flex: none; margin-top: 3px; color: var(--danger); }
.appr-error p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.appr-error .appr-link { min-height: 0; margin-left: 6px; }

/* Résultat, à la place de la carte, puis elle se referme sans à-coup. */
.appr-done { padding: 0 24px; gap: 0; transition: opacity .25s ease, margin-bottom .3s ease; }
.appr-collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s ease; }
.appr-collapse-in { min-height: 0; overflow: hidden; padding: 18px 0; }
.appr-done.is-leaving { opacity: 0; margin-bottom: -12px; }
.appr-done.is-leaving .appr-collapse { grid-template-rows: 0fr; }
.appr-result { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; outline: none; }
.appr-result:focus-visible { outline: 2px solid var(--turq); outline-offset: 6px; }
.appr-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; }
.appr-mark.ok { background: rgba(59,217,219,.14); color: var(--turq); }
.appr-mark.no { background: rgba(246,242,234,.09); color: var(--sand); }
.appr-result-txt { flex: 1 1 240px; min-width: 0; }
.appr-result-line { margin: 0; font-size: 15px; line-height: 22px; color: var(--ivory); }
.appr-result-sub { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--mute); overflow-wrap: anywhere; }
.appr-st { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.appr-result-line .appr-st { display: inline; }
.appr-st.ok { color: var(--turq); }
.appr-st.no { color: var(--sand); }
.appr-conv { flex: none; display: inline-flex; align-items: center; min-height: 32px; margin-left: auto; color: var(--ivory); font-size: 13.5px; font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(246,242,234,.4); text-underline-offset: 3px; }
.appr-conv:hover { color: var(--ivory); text-decoration-color: var(--ivory); }

/* Rien en attente */
.appr-empty { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px; background: var(--appr-rest); }
.appr-empty .appr-mark { width: 40px; height: 40px; }
.appr-empty-h { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ivory); }
.appr-empty p { margin: 6px 0 0; max-width: 46ch; font-size: 14px; line-height: 1.55; color: var(--mute); }

/* ── Décisions récentes ─────────────────────────────────────────────────── */

.appr-recent { margin-top: 40px; }
.appr-h { margin: 0 0 12px; font-family: inherit; font-size: 16px; font-weight: 600; line-height: 24px; letter-spacing: 0; color: var(--ivory); }
.appr-n { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--mute); }
.appr-rlist { display: flex; flex-direction: column; margin: 0; padding: 6px; list-style: none; background: var(--appr-rest); border: 1px solid rgba(246,242,234,.07); }
.appr-rrow { position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "st txt btn"; align-items: center; gap: 8px 16px;
  min-height: 60px; padding: 10px 14px; }
.appr-rrow + .appr-rrow { box-shadow: inset 0 1px 0 rgba(246,242,234,.05); }
.appr-rrow:hover { background: rgba(246,242,234,.05); }
.appr-rrow .appr-st { grid-area: st; font-size: 13px; }
.appr-rtxt { grid-area: txt; min-width: 0; }
.appr-rtitle { font-size: 14px; font-weight: 600; line-height: 20px; color: var(--ivory); overflow-wrap: anywhere; }
.appr-rmeta { margin-top: 2px; font-size: 12.5px; line-height: 17px; color: var(--mute); overflow-wrap: anywhere; }
.appr-rbtn { grid-area: btn; position: static; display: inline-flex; align-items: center; min-height: 34px; padding: 0 16px; border-radius: 999px; background: rgba(246,242,234,.1);
  color: var(--ivory); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s; }
.appr-rbtn::after { content: ""; position: absolute; inset: 0; }
.appr-rrow:hover .appr-rbtn, .appr-rbtn:hover { background: rgba(246,242,234,.16); color: var(--ivory); }
.appr-rbtn:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; }
.appr-rmore { padding: 2px 8px 4px; }

/* ── Dans la conversation ───────────────────────────────────────────────── */

.vc { max-width: 580px; margin-top: 12px; background: var(--appr-band); }
.vc p { margin: 0; }
.vc-ask { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.vc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vc-mark { flex: none; width: 8px; height: 8px; background: var(--ochre-light); }
.vc-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ochre-light); }
.vc-kind { margin-left: auto; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; background: rgba(246,242,234,.08); color: var(--sand); font-size: 12px; font-weight: 600; white-space: nowrap; }
.vc-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ivory); overflow-wrap: anywhere; }
.vc-why { font-size: 13.5px; line-height: 1.5; color: var(--sand); overflow-wrap: anywhere; }
.vc-body { display: flex; flex-direction: column; }
.vc .appr-sec { max-width: none; }
.vc .appr-read { background: var(--appr-raised); }
.vc .appr-text { font-size: 14.5px; }
.vc-actions .btn { min-height: 40px; padding: 0 20px; }
.vc-actions .appr-go, .vc-actions .btn-stop { min-width: 0; }

.vc-done, .vc-wait { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.5; color: var(--sand); }
.vc-done .ico { flex: none; margin-top: 3px; }
.vc-st { font-weight: 700; }
.vc-st.ok { color: var(--turq); }
.vc-st.no { color: var(--sand); }
.vc-wait .vc-mark { margin-top: 7px; }
.vc-wait strong { color: var(--ochre-light); font-weight: 700; }
.vc-wait a { color: var(--ivory); text-decoration: underline; text-decoration-color: rgba(246,242,234,.4); text-underline-offset: 3px; }
.vc-wait a:hover { text-decoration-color: var(--ivory); }
.vc button:focus-visible { outline-color: var(--turq); }

/* ── Carte « E-mail » : un brouillon prêt à partir ───────────────────────────
   Objet en gras, lignes De / À / Cc séparées d'un trait très fin, texte, signature en gris, puis « Abandonner » (discret) et
   « Envoyer » (bouton plein, par inversion). Même carte dans la conversation et dans « À valider ». */

.mc { display: block; min-width: 0; padding: 16px 22px 20px; background: var(--appr-band); }
.mc p { margin: 0; }
.appr-card.appr-mail { padding: 0; background: none; gap: 12px; }
.appr-card.appr-mail .appr-head { padding: 0 4px; }
.appr-card.appr-mail > .mc { max-width: 680px; width: 100%; }

.mc-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mc-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; background: rgba(246,242,234,.07); color: var(--sand); }
.mc-kind { font-size: 14.5px; font-weight: 500; color: var(--ivory); }
.mc-state { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ochre-light); white-space: nowrap; }
.mc-state .vc-mark { width: 7px; height: 7px; }
.mc-copy { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; background: none; border: 0; color: var(--mute); cursor: pointer; }
.mc-copy:hover { color: var(--ivory); background: rgba(246,242,234,.07); }
.mc-copy.is-copied { color: var(--turq); }

.mc-req { margin: 14px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--mute); overflow-wrap: anywhere; }
.mc-req + .mc-subject { margin-top: 4px; }
.mc-subject.is-empty, .mc-hdrs dd.is-empty { color: var(--mute); font-weight: 400; }
.mc-subject { margin: 18px 0 8px; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--ivory); overflow-wrap: anywhere; }
.mc-hdrs { margin: 0; padding: 0; }
.mc-hdrs > div { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: baseline; gap: 0 8px; padding: 11px 0; border-bottom: 1px solid rgba(246,242,234,.08); }
.mc-hdrs > div:first-child { border-top: 1px solid rgba(246,242,234,.08); }
.mc-hdrs dt { font-size: 14px; line-height: 22px; color: var(--mute); }
.mc-hdrs dd { margin: 0; font-size: 14.5px; line-height: 22px; color: var(--ivory); overflow-wrap: anywhere; }

.mc .appr-text { margin-top: 16px; font-size: 15px; line-height: 1.65; }
.mc .appr-text a { color: var(--ivory); text-decoration: underline; text-decoration-color: rgba(246,242,234,.45); text-underline-offset: 3px; }
.mc .appr-text a:hover { text-decoration-color: var(--ivory); }
.mc-sign { color: var(--mute); }
.mc-toggle { margin-top: 4px; }
.mc .appr-nocontent { margin-top: 14px; }
.mc-why { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(246,242,234,.08); font-size: 13px; line-height: 1.55; color: var(--mute); overflow-wrap: anywhere; }
.mc-why strong { margin-right: 4px; font-weight: 600; color: var(--sand); }
.mc .appr-error { margin-top: 14px; }

.mc-foot { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 8px; margin-top: 18px; }
.appr-actions.mc-foot .btn { min-height: 46px; }
.btn.mc-abandon { padding: 0 16px; background: none; color: var(--mute); font-size: 14.5px; font-weight: 500; }
.btn.mc-abandon:hover:not(:disabled) { color: var(--ivory); background: rgba(246,242,234,.07); }
.mc-split { position: relative; display: inline-flex; align-items: stretch; }
.appr-actions.mc-foot .btn.mc-send { min-width: 0; padding: 0 28px; font-size: 15px; font-weight: 600; }
.appr-actions.mc-foot .btn.mc-send.has-more { padding-right: 20px; }
.appr-actions.mc-foot .btn.mc-more { padding: 0 12px; border-left: 1px solid rgba(36,51,93,.2); }
.mc-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; min-width: 240px; padding: 6px; background: var(--navy); border: 1px solid var(--line-strong); }
.mc-menu-item { display: block; width: 100%; min-height: 44px; padding: 0 14px; background: none; border: 0; color: var(--ivory); font-size: 14.5px; text-align: left; cursor: pointer; }
.mc-menu-item:hover, .mc-menu-item:focus-visible { background: rgba(246,242,234,.09); outline: none; }
.mc button:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; }
.mc .btn-stop:focus-visible { outline-color: var(--turq); }

@media (max-width: 560px) {
  .mc { padding: 14px 16px 16px; }
  .mc-subject { margin-top: 14px; }
  .mc-hdrs > div { grid-template-columns: 40px minmax(0, 1fr); }
  .mc-foot { margin-top: 16px; }
  .appr-actions.mc-foot { flex-direction: row; align-items: center; }
  .appr-actions.mc-foot .btn { width: auto; }
  .appr-actions.mc-foot .mc-split { flex: 1 1 auto; }
  .appr-actions.mc-foot .btn.mc-send { flex: 1 1 auto; }
  .btn.mc-abandon { padding: 0 12px; }
}

/* ── Petites cartes de l'accueil ────────────────────────────────────────── */

.approval-mini { display: block; width: 100%; margin: 0; padding: 14px 16px; text-align: left; background: var(--appr-rest); border: 0;
  color: var(--ivory); font: inherit; cursor: pointer; transition: background .15s ease; }
.approval-mini:hover { background: var(--appr-hover); }
.approval-mini:active { background: var(--appr-press); }
.approval-mini:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; }
.approval-mini .who { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; color: var(--ochre-light); }
.approval-mini .who::before { content: ""; flex: none; width: 6px; height: 6px; background: currentColor; }
.approval-mini .what { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.approval-mini .since { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--mute); }

/* ── Tablette et téléphone ──────────────────────────────────────────────── */

@media (max-width: 860px) {
  .appr-count { margin: 20px 0 14px; }
  .appr-more, .appr-link, .appr-conv { min-height: 44px; }
  .btn.appr-copy { min-height: 44px; }
  .appr-sec-head { min-height: 44px; }
  .vc-actions .btn { min-height: 44px; }
  .vc-wait a, .vc-done a { display: inline-flex; align-items: center; min-height: 44px; }
  .approval-mini { padding: 12px 14px; min-height: 44px; }
}
@media (max-width: 560px) {
  .appr-card { gap: 14px; padding: 18px 16px; }
  .appr-count-late { flex-basis: 100%; padding-left: 18px; }
  .appr-count-late::before { content: none; }
  .appr-done { padding: 0 16px; }
  .appr-head { grid-template-columns: 38px minmax(0, 1fr); grid-template-areas: "av who" "av when"; }
  .appr-head > .avatar { grid-area: av; align-self: start; }
  .appr-who { grid-area: who; }
  .appr-when { grid-area: when; text-align: left; }
  .appr-title { font-size: 18px; }
  .appr-read { padding: 14px; }
  .appr-hdrs { margin: -14px -14px 12px; padding: 10px 14px; }
  .appr-hdrs > div { grid-template-columns: 1fr; gap: 0; }
  .appr-hdrs dt { line-height: 18px; }
  .appr-actions { flex-direction: column; align-items: stretch; }
  .appr-actions .btn { width: 100%; }
  .appr-actions .appr-edit { margin-left: 0; }
  .appr-result { align-items: flex-start; }
  .appr-conv { margin-left: 48px; }
  .appr-empty { padding: 18px 16px; }
  .appr-recent { margin-top: 32px; }
  .appr-rrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "st btn" "txt txt"; gap: 4px 12px; padding: 10px 12px 12px; }
  .appr-rbtn { min-height: 44px; }
  .vc-ask { padding: 14px; }
  .vc-actions { flex-direction: row; }
  .vc-actions .btn { flex: 1 1 0; padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .appr-done, .appr-collapse, .approval-mini { transition: none; }
}
