/* ERP épif : compléments au style de sales.epif.fr (style.css, brandbook), même vocabulaire visuel.
   Rien ici ne redéfinit les classes de style.css : préfixes à part (pas-, ligne-, camp-, saisie, avis). */

.brand__erp { padding: 3px 10px; border-radius: var(--r-pill); background: var(--foret); color: var(--rosee); font-size: .75rem; font-weight: 800; letter-spacing: .04em; }

/* --- À faire : alertes automatiques, actions datées, clients à programmer ------------------------------------------- */
.faire-bloc { margin-bottom: 22px; }
.faire-bloc h2 { display: flex; align-items: center; gap: 8px; margin: 0 8px 10px; font-size: 1.05rem; font-weight: 800; }
.faire-bloc h2 span { padding: 2px 9px; border-radius: var(--r-pill); background: rgba(21, 44, 18, .08); color: var(--ink-soft); font-size: .8rem; }
.a-faire { display: grid; gap: 0; padding: 6px; }
.ligne-faire { display: grid; grid-template-columns: 6.5rem minmax(0, 14rem) minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 12px 12px 12px 14px; border-radius: 16px; color: var(--foret); }
.ligne-faire + .ligne-faire { box-shadow: 0 -1px 0 var(--trait); }
.ligne-faire:hover { background: #F7FAF4; }
.ligne-faire .qui { display: grid; min-width: 0; color: inherit; text-decoration: none; }
.ligne-faire .qui b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-faire .qui span { overflow: hidden; color: var(--ink-soft); font-size: .8125rem; text-overflow: ellipsis; white-space: nowrap; }
.ligne-faire .quoi { font-size: .9375rem; font-weight: 600; }
.ligne-faire .depuis { color: var(--ink-soft); font-size: .875rem; font-weight: 700; white-space: nowrap; }
.ligne-faire .go { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(21, 44, 18, .06); color: var(--foret); }
.ligne-faire .go:hover { background: var(--grad-lime); }
.ligne-faire__form { grid-column: 1 / -1; } .ligne-faire__form:empty { display: none; }
.en-retard { color: #B23A20 !important; font-weight: 800; }
.coche { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #9FCB62; border-radius: 50%; background: var(--blanc); color: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.coche::after { content: "✓"; }
.coche:hover { background: var(--rosee); color: #3E7D1C; }
.form-action { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 10px 14px; padding: 12px 14px; border-radius: 14px; background: #F4F6F3; box-shadow: inset 0 0 0 1px var(--trait); }
.form-action .actions, .form-action .msg { grid-column: 1 / -1; } .form-action .msg:empty { display: none; }
.tag--urgent { background: var(--ambre); }
.tag--jour { background: var(--rosee); box-shadow: inset 0 0 0 1.5px var(--lime); }
.tag--suivre { background: #E6EBE3; }
@media (max-width: 699px) {
  .ligne-faire { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ligne-faire .quoi { grid-column: 1 / -1; grid-row: 2; }
  .form-action { grid-template-columns: 1fr; }
}

/* --- Clients : cartes du plateau ---------------------------------------------------------------------------------- */
.carte-crm__sous { display: block; margin-top: 1px; overflow: hidden; color: var(--ink-soft); font-size: .78rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.carte-crm__alerte { display: block; margin-top: 7px; padding: 5px 9px; border-radius: 10px; background: #FBF1D6; color: var(--foret); font-size: .75rem; font-weight: 700; line-height: 1.3; white-space: normal !important; }
.carte-crm__action { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 6px 9px; border-radius: 10px; background: #F4F6F3; font-size: .8rem; font-weight: 600; }
.carte-crm__action span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-crm__action b { flex: none; font-weight: 800; }
.carte-crm__action.en-retard { background: #FBEDEA; }
.carte-crm__action.a-programmer { background: none; box-shadow: inset 0 0 0 1.5px #E2C77A; color: #8A4B0E; }
.carte-crm__fin { display: block; margin-top: 6px; color: var(--ink-soft); font-size: .75rem; font-weight: 700; }
.carte-crm[data-alerte] { box-shadow: 0 8px 18px -14px rgba(21, 44, 18, .6), inset 0 0 0 1.5px var(--ambre); }

/* --- Fiche : étapes du Setup ------------------------------------------------------------------------------------ */
.pas { padding: 14px 16px; border: 1px solid var(--trait); border-radius: 18px; background: var(--blanc); }
.pas + .pas { margin-top: 8px; }
.pas__tete { display: flex; align-items: center; gap: 12px; }
.pas__num { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #EEF1EC; color: var(--ink-soft); font-size: .875rem; font-weight: 800; }
.pas--fait .pas__num { background: var(--foret); color: var(--rosee); }
.pas--ouvert { border-color: var(--lime); box-shadow: 0 16px 34px -26px rgba(21, 44, 18, .7), inset 0 0 0 1px var(--lime); }
.pas--ouvert .pas__num { background: var(--grad-lime); color: var(--foret); }
.pas--ferme { opacity: .55; }
.pas__titre { flex: 1; font-weight: 800; }
.pas__resume { color: var(--ink-soft); font-size: .8125rem; font-weight: 600; text-align: right; }
.pas__resume a { color: var(--foret); }
.pas__corps { display: grid; gap: 12px; margin-top: 12px; padding-left: 42px; font-size: .9375rem; }
.pas__corps p { margin: 0; }
@media (max-width: 699px) { .pas__corps { padding-left: 0; } }

/* boutons de l'ERP (même dessin que .bouton de sales) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: var(--r-pill);
  background: var(--grad-lime); color: var(--foret); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 18px -12px rgba(98, 150, 30, .9); }
.btn:hover { filter: brightness(1.04); }
.btn--sombre { background: var(--foret); color: var(--rosee); box-shadow: none; }
.btn--doux { background: rgba(21, 44, 18, .08); color: var(--foret); box-shadow: none; }
.btn--doux:hover { background: rgba(21, 44, 18, .14); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* avis : messages dans la fiche */
.avis { padding: 10px 14px; border-radius: 14px; font-size: .875rem; font-weight: 600; line-height: 1.45; }
.avis b { display: block; font-weight: 800; }
.avis--ok { background: var(--rosee); box-shadow: inset 0 0 0 1.5px var(--lime); }
.avis--erreur { background: #FBEDEA; color: #8A2A14; }
.avis--attention { background: #FBF1D6; }
.avis--info { background: #EEF1EC; }
.controles { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.controles li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; font-size: .875rem; }
.controles .consigne { grid-column: 2; color: var(--ink-soft); font-size: .8125rem; }
.ok-ic { color: #3E7D1C; font-weight: 800; } .ko-ic { color: #B23A20; font-weight: 800; } .warn-ic { color: #A0700E; font-weight: 800; }

/* choix (radio) et saisies */
.option { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: #F4F6F3; box-shadow: inset 0 0 0 1px var(--trait); cursor: pointer; font-size: .9rem; }
.option:hover { background: var(--rosee); }
.option input { accent-color: #3E7D1C; }
.saisies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.saisie { display: grid; gap: 5px; color: var(--ink-soft); font-size: .78rem; font-weight: 700; }
.saisie--large { grid-column: 1 / -1; }
.saisie input, .saisie textarea, .saisie select { width: 100%; padding: 9px 12px; border: 1.5px solid var(--trait); border-radius: 12px; background: var(--blanc); color: var(--foret); font: inherit; font-size: .9375rem; font-weight: 500; }
.saisie textarea { min-height: 132px; resize: vertical; line-height: 1.45; }
.saisie input:focus, .saisie textarea:focus { border-color: var(--lime); outline: 2px solid var(--lime); }
.saisie__ligne { display: flex; gap: 8px; }
.saisie__ligne input { flex: 1; }
.note-mini { color: var(--ink-soft); font-size: .8rem; font-weight: 500; }
details.volet { border-radius: 16px; background: #F4F6F3; box-shadow: inset 0 0 0 1px var(--trait); }
details.volet > summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: .9rem; font-weight: 800; list-style: none; cursor: pointer; }
details.volet > summary::-webkit-details-marker { display: none; }
details.volet > summary::after { content: "+"; color: var(--ink-soft); font-size: 1.1rem; }
details.volet[open] > summary::after { content: "−"; }
details.volet > div { display: grid; gap: 12px; padding: 0 14px 14px; }
.barre { height: 6px; overflow: hidden; border-radius: 3px; background: #E6EBE3; } .barre i { display: block; width: 0; height: 100%; background: var(--grad-lime); }
.bulle { max-width: 320px; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: #DCF8C6; font-size: .8125rem; line-height: 1.4; white-space: pre-line; }
.deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 16px; }
@media (max-width: 699px) { .saisies, .deux { grid-template-columns: 1fr; } }

/* --- Fiche : prochaine action -------------------------------------------------------------------------------------- */
.bloc-action__ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.bloc-action__ligne b { font-size: .95rem; }
.bloc-action__ligne span { color: var(--ink-soft); font-weight: 700; }
.bloc-action__ligne .btn { margin-left: auto; }
#form-action:not(:empty) { margin-top: 10px; }
.table-camp--mini { min-width: 0; }
.table-camp--mini td, .table-camp--mini th { padding: 8px 6px; }

/* --- Onglet Campagne de la fiche : chiffres ---------------------------------------------------------------------- */
.camp__tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.camp__tete b { display: block; font-size: 1rem; }
.camp__tete span { display: block; color: var(--ink-soft); font-size: .8125rem; font-weight: 600; }
.camp__tete a { color: inherit; text-decoration: none; }
.camp__chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chiffre { padding: 10px 10px 8px; border-radius: 14px; background: #F4F6F3; }
.chiffre span { display: block; color: var(--ink-soft); font-size: .72rem; font-weight: 700; }
.chiffre b { display: block; font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.chiffre--cle { background: var(--rosee); box-shadow: inset 0 0 0 1.5px var(--lime); }
.chiffre--rouge b { color: #B23A20; }
.budget { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: var(--r-pill); background: #F4F6F3; }
.budget input { width: 56px; padding: 6px 8px; border: 0; border-radius: var(--r-pill); background: var(--blanc); color: var(--foret); font: inherit; font-weight: 800; text-align: right; }
.budget .btn { padding: 6px 12px; font-size: .8rem; }

/* --- Campagnes : une ligne par client, comme le Gestionnaire de publicités ---------------------------------------- */
.periodes { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .55); }
.periodes button { padding: 7px 14px; border: 0; border-radius: var(--r-pill); background: none; color: var(--ink-soft); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.periodes button:hover { color: var(--foret); }
.periodes button[aria-pressed="true"] { background: var(--foret); color: var(--rosee); }
.dates { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .875rem; font-weight: 600; }
.dates input { padding: 7px 10px; border: 1.5px solid var(--trait); border-radius: 12px; background: var(--blanc); color: var(--foret); font: inherit; font-size: .875rem; }
.board--table { overflow-x: auto; padding: 4px 10px; }
.table-camp { width: 100%; min-width: 880px; border-collapse: collapse; font-size: .9rem; }
.table-camp th { padding: 12px 10px; border-bottom: 1px solid var(--trait); color: var(--ink-soft); font-size: .75rem; font-weight: 700; text-align: left; white-space: nowrap; }
.table-camp td { padding: 12px 10px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.table-camp tbody tr:hover { background: #F7FAF4; }
.table-camp .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-camp .rouge { color: #B23A20; font-weight: 800; }
.table-camp .qui a { display: grid; color: inherit; text-decoration: none; }
.table-camp .qui b { font-weight: 800; }
.table-camp .qui span, .table-camp .lance span, .table-camp td small { display: block; color: var(--ink-soft); font-size: .78rem; font-weight: 600; }
.table-camp .lance { white-space: nowrap; }
.table-camp tr.a-regarder td:first-child { box-shadow: inset 3px 0 0 var(--ambre); }
.table-camp tfoot td { border-bottom: 0; color: var(--ink-soft); font-weight: 800; }
.table-camp tfoot .num { color: var(--foret); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.diff { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; white-space: nowrap; }
.diff::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #B9C2B4; }
.diff--ok::before { background: #4E9F1F; }
.diff--alerte { color: #8A4B0E; } .diff--alerte::before { background: #D9822B; }
.interrupteur { position: relative; display: inline-block; width: 38px; height: 22px; }
.interrupteur input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.interrupteur span { position: absolute; inset: 0; border-radius: 11px; background: #CBD3C6; transition: background .15s; }
.interrupteur span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--blanc); box-shadow: 0 1px 2px rgba(21, 44, 18, .3); transition: transform .15s; }
.interrupteur input:checked + span { background: #4E9F1F; }
.interrupteur input:checked + span::after { transform: translateX(16px); }
.interrupteur input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.interrupteur input:disabled { cursor: wait; } .interrupteur input:disabled + span { opacity: .45; }
.budget-l input { width: 66px; padding: 6px 8px; border: 1.5px solid var(--trait); border-radius: 10px; background: var(--blanc); color: var(--foret); font: inherit; font-weight: 700; text-align: right; }
.budget-l input:focus { border-color: var(--lime); outline: 2px solid var(--lime); }

/* --- Application : rubriques à gauche (Sales, Delivery, KPI selon le rôle), onglets de la rubrique en haut ------------- */
.app { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.cote { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; padding: 22px 14px 18px;
  background: rgba(242, 254, 226, .66); border-right: 1px solid rgba(255, 255, 255, .8); box-shadow: 14px 0 32px -30px rgba(21, 44, 18, .55);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
.cote__logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px; text-decoration: none; }
.cote__logo img { display: block; height: 30px; width: auto; }
.cote__titre { padding: 0 12px; color: var(--ink-soft); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cote__modules { display: grid; gap: 4px; margin-top: -16px; }
.cote__modules a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-pill); color: var(--ink-soft); font-size: .95rem; font-weight: 700; text-decoration: none; }
.cote__modules a:hover { background: rgba(21, 44, 18, .07); color: var(--foret); }
.cote__modules a[aria-current] { background: var(--foret); color: var(--rosee); }
.cote__modules .ic { width: 22px; text-align: center; }
.cote__pied { margin-top: auto; }
/* mon compte : mon nom en bas de la barre, comme une rubrique */
.cote__profil { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; color: var(--foret); text-decoration: none; }
.cote__profil:hover { background: rgba(21, 44, 18, .07); }
.cote__profil[aria-current] { background: var(--foret); color: var(--rosee); }
.cote__profil[aria-current] small { color: rgba(242, 254, 226, .72); }
.cote__qui { display: grid; min-width: 0; line-height: 1.25; }
.cote__qui b { overflow: hidden; font-size: .9375rem; text-overflow: ellipsis; white-space: nowrap; }
.cote__qui small { color: var(--ink-soft); font-size: .75rem; font-weight: 600; }
.avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--grad-lime); color: var(--foret); font-size: .9375rem; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }
.avatar--grand { width: 56px; height: 56px; font-size: 1.375rem; }
.zone { min-width: 0; }
.zone .entete .bar { width: min(100% - 2 * var(--gutter), 1560px); margin-inline: auto; padding: 6px; }
.zone .onglets { margin-right: 0; }
.zone main { padding-top: clamp(24px, 4vw, 40px); }
.zone main.wrap { width: min(100% - 2 * var(--gutter), 1100px); }
.zone main.wrap.large { width: min(100% - 2 * var(--gutter), 1320px); }
.zone main.wrap.plein { width: min(100% - 2 * var(--gutter), 1560px); }
.zone main.cadre { width: 100%; padding: 0; }
.cadre-sales { display: block; width: 100%; height: calc(100vh - 66px); border: 0; background: var(--lichen); }
@media (max-width: 899px) {
  .app { grid-template-columns: 1fr; }
  .cote { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px var(--gutter); border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .8); }
  .cote__titre { display: none; }
  .cote__modules { display: flex; margin: 0; } .cote__modules a { padding: 8px 12px; font-size: .875rem; }
  .cote__pied { order: 1; margin: 0 0 0 auto; } .cote__modules { order: 2; flex-basis: 100%; } /* logo et mon compte sur la 1re ligne, rubriques dessous */
  .cote__profil { padding: 4px; border-radius: 50%; } .cote__qui { display: none; }
  .cadre-sales { height: calc(100vh - 130px); }
}

/* --- Mon compte -------------------------------------------------------------------------------------------------- */
.compte { display: grid; gap: 14px; max-width: 760px; }
.compte__bloc { display: grid; gap: 14px; padding: 18px 20px; border-radius: var(--r-glass); background: var(--blanc); box-shadow: 0 20px 44px -30px rgba(40, 64, 24, .55); }
.compte__id { display: flex; align-items: center; gap: 14px; }
.compte__id b { display: block; font-size: 1.25rem; font-weight: 800; }
.compte__id div > span { color: var(--ink-soft); font-size: .875rem; font-weight: 600; }
