/* =====================================================================
   Illustrations de bénéfice (template-parts/illus/*.php).
   Des morceaux d'interface redessinés en HTML, gros et lisibles, à la place
   des captures d'écran : on montre ce que le visiteur y gagne, pas tout l'écran.
   Règle : une illustration peut idéaliser la présentation (message qui surgit,
   encadré), jamais une fonction que le CRM n'a pas.
   Chargé par page-feature.php (style v3) et page-home-v4.php.
   ===================================================================== */
.il { position: relative; box-sizing: border-box; width: 100%; border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 12px;
    border: 1px solid transparent; color: #1A2233; font-size: 15px; line-height: 1.45; text-align: left; }
.il *, .il *::before, .il *::after { box-sizing: border-box; }
.il--mint { background: #EAF8F1; border-color: rgba(31,157,106,.14); }
.il--sky { background: #EAF4FC; border-color: rgba(43,159,232,.14); }
.il--peach { background: #FFF2E7; border-color: rgba(234,140,70,.16); }
.il--white { background: #fff; border-color: rgba(26,34,51,.07); box-shadow: 0 36px 70px -34px rgba(26,34,51,.32), 0 4px 16px -8px rgba(26,34,51,.08); }

/* Cartes blanches posées sur le fond pastel */
.il-card { background: #fff; border-radius: 16px; border: 1px solid rgba(26,34,51,.07); padding: 16px 18px; }
.il-card--focus { border: 2px solid #7FCFAE; box-shadow: 0 18px 36px -24px rgba(26,34,51,.4); }
.il-card--focus-sky { border: 2px solid #8CC4EE; box-shadow: 0 18px 36px -24px rgba(26,34,51,.4); }
.il-card--soft { background: rgba(255,255,255,.75); border-color: transparent; }
.il-card--lg { border-radius: 20px; padding: 22px; }
.il-stack { display: flex; flex-direction: column; gap: 14px; }
.il-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.il-row--nowrap { flex-wrap: nowrap; gap: 12px; }
.il-grow { flex: 1 1 180px; min-width: 0; }

/* Textes */
.il-head { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.il-title { font-size: 16px; font-weight: 700; color: #1A2233; }
.il-title--lg { font-size: 21px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
.il-title--md { font-size: 18px; line-height: 1.35; font-weight: 800; }
.il-meta { font-size: 14px; color: #5B6475; }
.il-note { font-size: 17px; line-height: 1.5; font-weight: 500; color: #1A2233; }
.il-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5B6475; }
.il-muted { color: #5B6475; font-weight: 600; }

/* Étiquettes et pastilles */
.il-tag { display: inline-block; padding: 4px 10px; border-radius: 9999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.il-tag--late { background: #FFF2E7; color: #A84A12; }
.il-tag--today { background: #EAF4FC; color: #1B6FA8; }
.il-tag--ok { background: #EAF8F1; color: #1F7A55; }
.il-tag--neutral { background: #F1F5F9; color: #3D4758; }
.il-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 9999px; background: #F1F5F9; font-size: 14px; font-weight: 600; color: #1A2233; }
.il-chip--who { padding-left: 5px; }
.il-chip--sky { background: #EAF4FC; color: #1B6FA8; }
.il-chip--step { border-radius: 10px; font-size: 13px; }
.il-avatar { width: 24px; height: 24px; border-radius: 50%; background: #2B7DE9; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.il-avatar--lg { width: 32px; height: 32px; font-size: 12px; }
.il-btn { padding: 10px 16px; border-radius: 12px; border: 1.5px solid rgba(26,34,51,.14); font-size: 14px; font-weight: 700; color: #1A2233; }
.il-btn--go { margin-left: auto; border: 0; background: linear-gradient(135deg, #5DD39E 0%, #2B9FE8 100%); color: #fff; padding: 11.5px 18px; }
.il-pick { padding: 7px 14px; border-radius: 9999px; border: 1.5px solid rgba(26,34,51,.14); font-size: 14px; font-weight: 600; color: #4A5568; }
.il-pick--on { border-color: transparent; background: linear-gradient(135deg, #5DD39E 0%, #2B9FE8 100%); color: #fff; font-weight: 700; padding: 8.5px 14px; }
.il-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #A9CDEB; flex: none; }
.il-dot--lg { width: 26px; height: 26px; border-color: #8CC4EE; }
.il-dot--done { width: 26px; height: 26px; border: 0; background: #1F9D6A; display: inline-flex; align-items: center; justify-content: center; }
.il-dot--done svg { width: 14px; height: 14px; }
.il-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.il-ic svg { width: 17px; height: 17px; }
.il-ic--mint { background: #EAF8F1; color: #1F7A55; } .il-ic--sky { background: #EAF4FC; color: #1B6FA8; } .il-ic--peach { background: #FFF2E7; color: #A84A12; }
.il-arrow { align-self: center; width: 28px; height: 28px; flex: none; }
.il--peach .il-arrow { color: #A84A12; } .il--mint .il-arrow { color: #1F7A55; } .il--sky .il-arrow { color: #1B6FA8; }
.il-quote { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #F8FAFC; }
.il-quote svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: #1F9D6A; }
.il-quote b { display: block; font-size: 14px; font-weight: 700; }
.il-quote span { display: block; font-size: 14px; line-height: 1.5; color: #5B6475; }

/* Avancement de la journée */
.il-progress { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #4A5568; }
.il-progress-bar { display: block; width: 120px; height: 8px; border-radius: 9999px; background: rgba(26,34,51,.1); overflow: hidden; }
.il-progress-bar > span { display: block; height: 100%; width: 60%; border-radius: 9999px; background: linear-gradient(135deg, #5DD39E 0%, #2B9FE8 100%); animation: il-fill 7s ease-in-out infinite; }

/* Message qui surgit : dit ce que le CRM vient de faire */
.il-toast { position: absolute; right: 22px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 9999px;
    background: #1A2233; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 16px 32px -14px rgba(26,34,51,.7); animation: il-toast 7s ease-in-out infinite; }
.il-toast svg { width: 18px; height: 18px; color: #5DD39E; flex: none; }
.il-toast--top { top: -18px; }
.il-toast--bottom { bottom: -18px; }
.il-toast--d1 { animation-delay: 1s; } .il-toast--d2 { animation-delay: 2s; }

/* Rapport d'équipe */
.il-table { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 12px; align-items: center; font-size: 15px; }
.il-table > * { text-align: right; }
.il-table > :nth-child(4n+1) { text-align: left; font-weight: 600; }
.il-table .il-th { font-size: 12px; font-weight: 500; color: #5B6475; }
.il-table .is-ok { font-weight: 700; color: #1F7A55; } .il-table .is-late { font-weight: 700; color: #B4541A; }

/* Tableur (le fichier d'avant) */
.il-sheet { background: #fff; border-radius: 14px; border: 1px solid rgba(26,34,51,.1); overflow: hidden; }
.il-sheet-name { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #F1F5F9; font-size: 13px; font-weight: 700; color: #3D4758; }
.il-sheet-name::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: #1F9D6A; flex: none; }
.il-sheet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); font-size: 13px; }
.il-sheet-grid > span { min-height: 31px; padding: 7px 10px; border-top: 1px solid rgba(26,34,51,.08); border-left: 1px solid rgba(26,34,51,.08);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3D4758; }
.il-sheet-grid > span:nth-child(4n+1) { border-left: 0; }
.il-sheet-grid > .il-sheet-th { background: #F8FAFC; font-size: 12px; font-weight: 700; color: #5B6475; }
.il-sheet-grid > .is-warn { background: #FFF2E7; color: #A84A12; font-weight: 600; }

/* Colonne du fichier, flèche en ligne, champ d'une fiche, champ de recherche */
.il-col { padding: 5px 10px; border-radius: 8px; background: #F1F5F9; border: 1px solid rgba(26,34,51,.1); font-size: 13px; font-weight: 700; color: #3D4758; white-space: nowrap; }
.il-arrow--inline { align-self: auto; width: 18px; height: 18px; color: #8A94A6 !important; }
.il-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(26,34,51,.07); font-size: 15px; }
.il-field:first-child { border-top: 0; }
.il-field b { font-weight: 600; }
.il-stack > .il-field { padding: 12px 0 0; }
.il-input { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 14px; background: #fff; border: 2px solid #8CC4EE; font-size: 17px; font-weight: 700; }
.il-input svg { width: 18px; height: 18px; color: #5B6475; flex: none; }
.il-caret { width: 2px; height: 20px; margin-left: -6px; background: #2B9FE8; animation: il-blink 1s steps(1) infinite; }

/* Pipeline : une colonne par étape */
.il-pipe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.il-pipe-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border-radius: 14px; background: #F8FAFC; }
.il-pipe-col > b { font-size: 13px; font-weight: 700; color: #5B6475; }
.il-pipe-col > strong { font-size: 18px; font-weight: 800; }
.il-pipe-deal { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid rgba(26,34,51,.08); font-size: 13px; font-weight: 600; }
.il-pipe-deal small { font-size: 12px; font-weight: 500; color: #5B6475; }

/* Carte des relations : tout se mesure en cqw pour suivre la largeur de la carte */
.il-map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.il-map-bar b { font-size: 16px; font-weight: 800; } .il-map-bar b span { font-weight: 500; color: #5B6475; }
.il-switch { display: inline-flex; padding: 4px; border-radius: 9999px; background: #F1F5F9; }
.il-switch > span { position: relative; padding: 6px 14px; font-size: 13px; font-weight: 700; color: #1A2233; }
.il-switch > span::before { content: ""; position: absolute; inset: 0; border-radius: 9999px; background: #fff; box-shadow: 0 2px 6px -2px rgba(26,34,51,.3); }
.il-switch > span:first-child::before { opacity: 0; animation: il-l1 9s ease-in-out infinite; }
.il-switch > span:last-child::before { animation: il-l2 9s ease-in-out infinite; }
.il-switch em { position: relative; font-style: normal; }
.il-map { position: relative; width: 100%; aspect-ratio: 8 / 5; container-type: inline-size; }
.il-map-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.il-map-lines line { stroke: #C3D0DD; stroke-width: 2; }
.il-map-lines .is-path { stroke: #7FCFAE; stroke-width: 3; }
.il-node { position: absolute; transform: translate(-50%, -4.25cqw); display: flex; flex-direction: column; align-items: center; gap: .7cqw; white-space: nowrap; }
.il-node > i { width: 8.5cqw; height: 8.5cqw; border-radius: 2.2cqw; background: #fff; border: .25cqw solid rgba(26,34,51,.14); box-shadow: 0 1.2cqw 2.4cqw -1.4cqw rgba(26,34,51,.5);
    display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 3.4cqw; font-weight: 800; color: #1A2233; }
.il-node > b { font-size: max(10px, 2.2cqw); font-weight: 700; color: #1A2233; background: rgba(255,255,255,.92); padding: 0 .6cqw; border-radius: .8cqw; }
.il-node > small { font-size: max(9px, 1.75cqw); font-weight: 600; color: #4A5568; background: #F1F5F9; padding: .3cqw 1.1cqw; border-radius: 9999px; }
.il-node--path > i { border: .4cqw solid #7FCFAE; }
.il-node--path > small, .il-node--won > small { color: #1F7A55; background: #EAF8F1; font-weight: 700; }
.il-node--person > i { border: 0; border-radius: 50%; background: #2B7DE9; color: #fff; font-size: 2.8cqw; font-weight: 700; }
.il-node--deal > i { border-radius: 50%; border: .6cqw solid #2B9FE8; color: #1B6FA8; font-size: 3.2cqw; }
.il-node--deal > small { color: #1B6FA8; background: #EAF4FC; }
.il-node--won > i { border: 0; border-radius: 50%; background: #1F9D6A; }
.il-node--won > i svg { width: 4cqw; height: 4cqw; color: #fff; }
.il-node--center { transform: translate(-50%, -6.5cqw); gap: .8cqw; }
.il-node--center > i { width: 13cqw; height: 13cqw; border: 0; border-radius: 3.4cqw; background: #1A2233; color: #fff; font-size: 5.6cqw;
    box-shadow: 0 0 0 1.6cqw rgba(43,159,232,.14), 0 2cqw 3.4cqw -1.6cqw rgba(26,34,51,.6); }
.il-node--center > b { margin-top: 1.2cqw; font-size: max(11px, 2.6cqw); font-weight: 800; }
.il-node--center > small { color: #fff; background: #1A2233; font-weight: 700; }
.il-node--l2 { transform: translate(-50%, -3.75cqw); animation: il-l2 9s ease-in-out infinite; }
.il-node--l2 > i { width: 7.5cqw; height: 7.5cqw; border: .4cqw solid #7FCFAE; font-size: 2.5cqw; }
.il-map-l2 { animation: il-l2 9s ease-in-out infinite; }
.il-map-tip { position: absolute; left: 75%; top: 60%; width: 24cqw; padding: 1.6cqw 1.8cqw; border-radius: 2cqw; background: #fff; border: .35cqw solid #7FCFAE;
    box-shadow: 0 2cqw 3.6cqw -2cqw rgba(26,34,51,.5); font-size: max(10px, 1.9cqw); line-height: 1.4; font-weight: 600; color: #1A2233; animation: il-l2 9s ease-in-out infinite; }

@keyframes il-toast { 0%, 16% { opacity: 0; transform: translateY(12px); } 24%, 74% { opacity: 1; transform: translateY(0); } 84%, 100% { opacity: 0; transform: translateY(12px); } }
@keyframes il-fill { 0%, 18% { width: 40%; } 28%, 100% { width: 60%; } }
@keyframes il-l2 { 0%, 30% { opacity: 0; } 40%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes il-l1 { 0%, 30% { opacity: 1; } 40%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes il-blink { 50% { opacity: 0; } }

.il-map-caption { display: none; margin: 0; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #7FCFAE; font-size: 14px; line-height: 1.4; font-weight: 600; color: #1A2233; }

@media (max-width: 600px) {
    /* Carte trop étroite pour tout écrire : les rôles et l'encadré sortent de la carte */
    .il-node:not(.il-node--center) > small, .il-map-tip { display: none; }
    .il-node > b { font-size: max(9px, 2.6cqw); }
    .il-map-caption { display: block; }
    .il { padding: 18px; border-radius: 22px; }
    .il-title--lg { font-size: 18px; }
    .il-note { font-size: 15px; }
    .il-toast { right: 12px; font-size: 13px; }
    .il-btn--go { margin-left: 0; }
    /* Tableur : la troisième colonne sort, les trois autres restent lisibles */
    .il-sheet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .il-sheet-grid > span:nth-child(4n+3) { display: none; }
    .il-sheet-grid > span:nth-child(4n) { border-left: 1px solid rgba(26,34,51,.08); }
    .il-pipe { grid-template-columns: minmax(0, 1fr); }
    .il-pipe-col { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .il-pipe-deal { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
}
/* Mouvement réduit : tout est affiché, rien ne bouge (l'état de base est l'état final) */
@media (prefers-reduced-motion: reduce) {
    .il *, .il *::before { animation: none !important; }
}
