/* CRM : la DA de Cockpit (Améthyste, encre prune, verre, aurore lavande, Inter). */
@font-face {
  font-family: Inter;
  src: url('/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --v50: #F7F5FF; --v100: #EEEBFE; --v200: #DED6FE; --v300: #C7B8FF; --v400: #A889FF;
  --v500: #7A4BD8; --v600: #6437B7; --v700: #4F2398; --v800: #3B0E79; --v900: #270057;
  --accent: var(--v500); --accent-press: var(--v600); --accent-soft: var(--v100);
  --violet: linear-gradient(160deg, var(--v400), var(--v600));
  --violet-survol: linear-gradient(160deg, var(--v500), var(--v700));
  --ink: #25212F; --ink-soft: #615C6E; --ink-light: #756E81; --ink-faint: #A6A0B0;
  --panel: #F7F6FA; --paper: #FFFFFF;
  --pos: #2F7D52; --pos-soft: #EAF3ED;
  --amber: #A66A19; --amber-soft: #FDF6E7;
  --neg: #B4433C; --neg-soft: #FBEDEC;
  --bleu: #3D6BB3; --bleu-soft: #EAF0FA;
  --sarcelle: #1F7F86; --sarcelle-soft: #E6F3F3;
  --gris: #756E81; --gris-soft: #EFEDF2;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --verre: linear-gradient(180deg, #FFFFFFC2, #FFFFFF94);
  --verre-flou: blur(24px) saturate(190%);
  --verre-reflet: inset 0 1px 0 #FFFFFFF2, inset 0 0 0 1px #FFFFFF70, inset 0 -1px 0 #FFFFFF2E;
  --verre-arete: 0 0 0 .5px #2B21361F;
  --verre-ombre: 0 1px 2px #2B21360D, 0 14px 36px -14px #2B21362E;
  --carte: #FFFFFFF5;
  --carte-ombre: 0 0 0 .5px #2B21361C, 0 1px 2px #2B21360B, 0 12px 26px -16px #2B21362E;
  --ressort-css: cubic-bezier(.32, 1.28, .42, 1);
  --doux: cubic-bezier(.3, .7, .2, 1);
  --marge: 22px; --marge-g: 28px;
  --barre: 256px;
  --fond:
    radial-gradient(46rem 30rem at 8% -8%, var(--v200) 0%, transparent 62%),
    radial-gradient(38rem 34rem at 106% 34%, var(--v100) 0%, transparent 60%),
    radial-gradient(44rem 26rem at 44% 114%, var(--v100) 0%, transparent 64%), var(--panel);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overscroll-behavior-x: none; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--fond); background-attachment: fixed;
  font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01';
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
svg.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.verre {
  background: var(--verre); box-shadow: var(--verre-reflet), var(--verre-arete), var(--verre-ombre);
  -webkit-backdrop-filter: var(--verre-flou); backdrop-filter: var(--verre-flou);
}
.verre-fort {
  background: linear-gradient(180deg, #FFFFFFEB, #FFFFFFD6); box-shadow: var(--verre-reflet), var(--verre-arete), 0 2px 6px #2B21360F, 0 24px 60px -18px #2B213640;
  -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%);
}
.carte { background: var(--carte); box-shadow: var(--carte-ombre); border-radius: 20px; }
@media (prefers-reduced-transparency: reduce) {
  .verre, .verre-fort { background: #FFFFFFF7; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Boutons ---------- */
.btn {
  height: 44px; padding: 0 18px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600; white-space: nowrap; transition: transform .2s var(--ressort-css), background .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn-verre { background: var(--verre); box-shadow: var(--verre-reflet), var(--verre-arete), var(--verre-ombre); -webkit-backdrop-filter: var(--verre-flou); backdrop-filter: var(--verre-flou); }
.btn-violet { background: var(--violet); color: #fff; box-shadow: 0 1px 2px #3B0E7926, 0 10px 22px -10px #4F2398A6, inset 0 1px 0 #FFFFFF40; }
.btn-doux { background: var(--accent-soft); color: var(--accent-press); }
.btn-gris { background: #2B21360A; color: var(--ink); }
.btn-rouge { background: var(--neg-soft); color: var(--neg); }
.btn-rond { width: 44px; padding: 0; }
.btn[disabled] { opacity: .45; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-violet:hover { background: var(--violet-survol); }
  .btn-verre:hover { background: linear-gradient(180deg, #FFFFFFE6, #FFFFFFB8); }
  .btn-gris:hover { background: #2B213612; }
  .btn-doux:hover { background: var(--v200); }
}
.rond-appel {
  width: 44px; height: 44px; border-radius: 22px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-press); transition: transform .2s var(--ressort-css), background .2s;
}
.rond-appel:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .rond-appel:hover { background: var(--v200); } }

/* ---------- Cadre ---------- */
.cadre { min-height: 100%; }
.barre-lat {
  position: fixed; left: 14px; top: 14px; bottom: 14px; width: var(--barre); border-radius: 26px; padding: 22px 14px 14px;
  display: flex; flex-direction: column; gap: 6px; z-index: 20;
}
.barre-nom { padding: 0 10px 14px; display: flex; flex-direction: column; }
.barre-nom b { font-size: 19px; letter-spacing: -.02em; }
.barre-nom span { font-size: 13px; color: var(--ink-light); }
.barre-lat .btn-violet { margin: 0 4px 16px; }
.onglet {
  height: 44px; border-radius: 14px; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-weight: 550; color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.onglet.actif { background: #FFFFFFE6; color: var(--accent); box-shadow: 0 0 0 .5px #2B21361A, 0 4px 14px -8px #2B213640; }
.onglet .compte { margin-left: auto; font-size: 12.5px; font-weight: 650; color: var(--accent-press); background: var(--accent-soft); border-radius: 10px; padding: 1px 8px; }
@media (hover: hover) and (pointer: fine) { .onglet:not(.actif):hover { background: #FFFFFF80; color: var(--ink); } }
.barre-pied { margin-top: auto; display: flex; }
.barre-pied .btn { color: var(--ink-light); font-weight: 550; }

.contenu { margin-left: calc(var(--barre) + 14px + var(--marge-g)); margin-right: var(--marge); padding: 14px 0 40px; min-height: 100vh; }
.tete { min-height: 72px; display: flex; align-items: center; gap: 10px; padding: 0 0 18px; }
.tete .pousse { flex: 1; }

/* Barre d'onglets du téléphone et de l'iPad */
.onglets-bas { display: none; }
@media (max-width: 1023px) {
  .barre-lat { display: none; }
  .contenu { margin: 0 auto; max-width: 980px; padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(110px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .tete { min-height: 60px; padding-bottom: 12px; }
  .onglets-bas {
    display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
    height: 64px; border-radius: 32px; padding: 6px; gap: 2px; align-items: center; width: min(460px, calc(100% - 24px));
    background: linear-gradient(180deg, #FFFFFF9E, #FFFFFF73);
    box-shadow: inset 0 1px 0 #FFFFFFF2, inset 0 0 0 1px #FFFFFF66, 0 0 0 .5px #2B21361F, 0 18px 40px -16px #2B213659;
    -webkit-backdrop-filter: blur(28px) saturate(200%); backdrop-filter: blur(28px) saturate(200%);
  }
  .onglets-bas a {
    flex: 1; height: 52px; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 11px; font-weight: 600; color: var(--ink-soft); position: relative; transition: background .25s, color .25s;
  }
  .onglets-bas a.actif { color: var(--accent); background: #FFFFFFB8; box-shadow: 0 0 0 .5px #2B213614; }
  .onglets-bas .pastille { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; font-size: 11px; line-height: 18px; text-align: center; background: var(--accent); color: #fff; }
  .onglets-bas .plus {
    flex: none; width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; color: #fff; background: var(--violet); margin: 0 4px;
    box-shadow: 0 1px 2px #3B0E7926, 0 10px 20px -10px #4F2398A6, inset 0 1px 0 #FFFFFF40; transition: transform .2s var(--ressort-css);
  }
  .onglets-bas .plus:active { transform: scale(.94); }
  .onglets-bas .plus svg { width: 24px; height: 24px; stroke-width: 2.2; }
}

/* ---------- Titres de jour et lignes ---------- */
.jour { font-size: 13px; font-weight: 650; color: var(--ink-light); margin: 22px 6px 8px; letter-spacing: .01em; }
.jour:first-child { margin-top: 4px; }
.jour.rouge { color: var(--neg); }
.liste { padding: 6px; }
.ligne {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 10px 10px 14px; border-radius: 14px; cursor: pointer;
  transition: background .2s;
}
@media (hover: hover) and (pointer: fine) { .ligne:hover { background: #2B213608; } }
.ligne + .ligne { box-shadow: 0 -1px 0 #2B21360A; }
.ligne-corps { flex: 1; min-width: 0; }
.ligne-titre { font-weight: 620; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-sous { font-size: 13.5px; color: var(--ink-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ligne-quand { font-size: 13px; font-weight: 600; color: var(--ink-light); white-space: nowrap; }
.rouge { color: var(--neg) !important; }
.ambre { color: var(--amber) !important; }
.vert { color: var(--pos) !important; }

.statut { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.statut::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--gris)); flex: none; }

.vide { text-align: center; padding: 56px 20px; color: var(--ink-light); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.vide .coche { width: 52px; height: 52px; border-radius: 26px; display: grid; place-items: center; background: var(--pos-soft); color: var(--pos); }
.vide b { color: var(--ink); font-size: 17px; }

/* ---------- À contacter ---------- */
.contacter { max-width: 760px; }

/* ---------- Pipeline ---------- */
.pipeline { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 20px; margin: 0 -2px; scroll-snap-type: x mandatory; height: calc(100vh - 140px); align-items: stretch; }
.colonne {
  flex: 0 0 272px; border-radius: 26px; padding: 14px 10px 10px; display: flex; flex-direction: column; scroll-snap-align: start; position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, #FFFFFFB0), #FFFFFF73 120px, #FFFFFF5C);
  box-shadow: var(--verre-reflet), var(--verre-arete), var(--verre-ombre); -webkit-backdrop-filter: var(--verre-flou); backdrop-filter: var(--verre-flou);
  transition: box-shadow .2s;
}
.colonne.cible { box-shadow: var(--verre-reflet), 0 0 0 2px var(--c), var(--verre-ombre); }
.colonne-tete { display: flex; align-items: baseline; gap: 8px; padding: 0 6px 12px; }
.colonne-tete .statut { font-size: 14.5px; }
.colonne-tete .n { color: var(--ink-light); font-size: 13px; font-weight: 600; }
.colonne-tete .somme { margin-left: auto; font-size: 13px; font-weight: 650; color: var(--ink-soft); }
.colonne-liste {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 8px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 8px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(180deg, transparent 0, #000 8px, #000 calc(100% - 16px), transparent);
}
.carte-k {
  background: var(--carte); box-shadow: var(--carte-ombre); border-radius: 16px; padding: 12px 14px; cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: transform .2s var(--ressort-css), opacity .2s;
}
.carte-k b { display: block; font-weight: 620; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-k span { display: block; font-size: 13px; color: var(--ink-light); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-k.portee { opacity: .35; }
.fantome { position: fixed; z-index: 100; pointer-events: none; transform: rotate(2deg) scale(1.03); box-shadow: 0 0 0 .5px #2B21361C, 0 24px 40px -14px #2B213666; transition: none; }
.colonne-vide { color: var(--ink-faint); font-size: 13px; text-align: center; padding: 18px 0; }
@media (max-width: 1023px) {
  .pipeline { height: calc(100vh - 190px); height: calc(100dvh - 190px - env(safe-area-inset-bottom)); }
  .colonne { flex-basis: min(300px, 84vw); }
}

/* ---------- RDV : calendrier ---------- */
.rdv { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.periode { display: inline-flex; align-items: center; height: 44px; border-radius: 22px; padding: 0 4px; }
.periode button { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; color: var(--ink-soft); }
.periode b { min-width: 150px; text-align: center; font-size: 15px; font-weight: 620; text-transform: capitalize; }
@media (hover: hover) and (pointer: fine) { .periode button:hover { background: #2B21360D; color: var(--ink); } }
.mois { padding: 10px 10px 12px; overflow: hidden; touch-action: pan-y; }
.mois-glisse { will-change: transform; }
.mois-jours { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; font-weight: 650; color: var(--ink-light); text-align: center; padding: 6px 0 8px; text-transform: lowercase; }
.mois-grille { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(108px, auto); gap: 4px; }
.case { border-radius: 14px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; transition: background .2s, box-shadow .2s; }
.case.hors { opacity: .38; }
.case.cible { background: var(--v50); box-shadow: inset 0 0 0 1.5px var(--v300); }
@media (hover: hover) and (pointer: fine) { .case:hover { background: #2B213606; } }
.case-n { font-size: 13px; font-weight: 600; color: var(--ink-soft); width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; }
.case.auj .case-n { background: var(--accent); color: #fff; }
.case.choisi .case-n { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.case.auj.choisi .case-n { color: #fff; }
.puce {
  font-size: 12px; line-height: 1.25; padding: 4px 7px; border-radius: 8px; background: linear-gradient(160deg, var(--v50), var(--v100)); color: var(--v700);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: grab; user-select: none; -webkit-user-select: none;
}
.puce b { font-weight: 650; margin-right: 4px; }
.puce.passe { background: #2B21360A; color: var(--ink-light); }
.puce.portee { opacity: .35; }
.points { display: none; }
.a-venir { padding: 16px 14px; border-radius: 26px; position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow-y: auto;
  background: linear-gradient(180deg, color-mix(in srgb, var(--v300) 22%, #FFFFFF99), #FFFFFF66 140px, #FFFFFF47);
  box-shadow: var(--verre-reflet), var(--verre-arete), var(--verre-ombre); -webkit-backdrop-filter: var(--verre-flou); backdrop-filter: var(--verre-flou); }
.a-venir h3 { margin: 2px 6px 4px; font-size: 15px; font-weight: 650; display: flex; align-items: center; }
.a-venir h3 button { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent); height: 32px; padding: 0 8px; }
.a-venir .jour { margin: 16px 6px 6px; }
.rdv-ligne { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; cursor: pointer; transition: background .2s; }
@media (hover: hover) and (pointer: fine) { .rdv-ligne:hover { background: #FFFFFF99; } }
.rdv-heure { font-weight: 650; font-size: 14px; color: var(--v700); min-width: 48px; }
.rdv-ligne b { display: block; font-weight: 620; font-size: 14.5px; }
.rdv-ligne span { display: block; font-size: 13px; color: var(--ink-light); }
.a-venir .vide { padding: 28px 10px; font-size: 14px; }
@media (max-width: 1180px) and (min-width: 1024px) { .rdv { grid-template-columns: minmax(0, 1fr) 280px; } .mois-grille { grid-auto-rows: minmax(96px, auto); } }
@media (max-width: 1023px) {
  .rdv { grid-template-columns: 1fr; }
  .mois-grille { grid-auto-rows: 52px; gap: 2px; }
  .case { align-items: center; padding: 4px 0; gap: 2px; }
  .case .puce { display: none; }
  .points { display: flex; gap: 3px; height: 6px; }
  .points i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
  .points i.passe { background: var(--ink-faint); }
  .a-venir { position: static; max-height: none; }
}

/* ---------- Tous ---------- */
.recherche { position: relative; flex: 1; max-width: 420px; }
.recherche svg { position: absolute; left: 15px; top: 12px; color: var(--ink-light); z-index: 1; pointer-events: none; }
.recherche input { width: 100%; height: 44px; border-radius: 22px; border: 0; outline: 0; padding: 0 16px 0 44px; font-size: 16px; }
.recherche input::placeholder { color: var(--ink-faint); }
.tableau { overflow-x: auto; padding: 6px 6px 8px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
th { text-align: left; font-size: 12.5px; font-weight: 650; color: var(--ink-light); padding: 10px 12px; white-space: nowrap; cursor: pointer; user-select: none; }
th.trie { color: var(--accent); }
th .fl { display: inline-block; width: 10px; }
td { padding: 0 12px; height: 52px; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
tbody tr { cursor: pointer; }
tbody tr td:first-child { border-radius: 12px 0 0 12px; font-weight: 620; }
tbody tr td:last-child { border-radius: 0 12px 12px 0; }
tbody tr + tr td { box-shadow: 0 -1px 0 #2B21360A; }
@media (hover: hover) and (pointer: fine) { tbody tr:hover td { background: #2B213607; } }
td a.tel { color: var(--accent); font-weight: 600; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.zero { color: var(--ink-faint); }
.tous-liste { display: none; }
@media (max-width: 760px) {
  .tableau { display: none; }
  .tous-liste { display: block; }
}

/* ---------- Feuilles (fiche, ajout, gestes) ---------- */
.voile {
  position: fixed; inset: 0; z-index: 50; background: #1E182A38; display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: voile .25s var(--doux);
}
.voile.part { animation: voile-part .22s var(--doux) forwards; }
@keyframes voile { from { background: #1E182A00; } }
@keyframes voile-part { to { background: #1E182A00; } }
.feuille {
  width: 100%; max-width: 560px; max-height: calc(100vh - 48px); border-radius: 22px; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, #FFFFFFF2, #FBFAFDF0); box-shadow: 0 0 0 .5px #2B21361F, 0 30px 80px -20px #1E182A66;
  -webkit-backdrop-filter: blur(60px) saturate(190%); backdrop-filter: blur(60px) saturate(190%);
  animation: monte .42s var(--ressort-css);
}
.voile.part .feuille { animation: descend .22s var(--doux) forwards; }
@keyframes monte { from { transform: translateY(24px) scale(.97); opacity: 0; } }
@keyframes descend { to { transform: translateY(18px) scale(.98); opacity: 0; } }
.feuille.large { max-width: 720px; }
.feuille.petite { max-width: 440px; }
.poignee { display: none; }
.feuille-tete { display: flex; align-items: center; gap: 10px; padding: 20px 22px 6px; }
.feuille-tete h2 { margin: 0; font-size: 19px; font-weight: 680; letter-spacing: -.01em; flex: 1; }
.feuille-corps { padding: 10px 22px 22px; overflow-y: auto; overscroll-behavior: contain; }
.feuille-pied { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 22px 20px; }
.barre-ios { display: none; }

@media (max-width: 760px) {
  .voile { align-items: flex-end; padding: 0; }
  .feuille, .feuille.large, .feuille.petite {
    max-width: none; border-radius: 34px 34px 0 0; max-height: calc(100% - max(14px, env(safe-area-inset-top)));
    animation: monte-tel .45s var(--ressort-css); padding-bottom: env(safe-area-inset-bottom);
  }
  .feuille.haute { height: calc(100% - max(14px, env(safe-area-inset-top))); }
  .voile.part .feuille { animation: descend-tel .25s var(--doux) forwards; }
  @keyframes monte-tel { from { transform: translateY(100%); } }
  @keyframes descend-tel { to { transform: translateY(100%); } }
  .poignee { display: block; width: 38px; height: 5px; border-radius: 3px; background: #2B213629; margin: 8px auto 0; flex: none; }
  .geste-zone { touch-action: none; }
  .feuille-tete { padding: 10px 18px 4px; }
  .feuille-corps { padding: 8px 16px 20px; }
  .feuille.formulaire .feuille-pied { display: none; }
  .feuille.formulaire .barre-ios { display: flex; align-items: center; padding: 8px 8px 4px; }
  .feuille.formulaire .barre-ios h2 { flex: 1; text-align: center; margin: 0; font-size: 17px; font-weight: 650; }
  .feuille.formulaire .barre-ios .btn { background: none; color: var(--accent); padding: 0 12px; }
  .feuille.formulaire .barre-ios .btn.fort { font-weight: 700; }
  .feuille.formulaire .feuille-tete { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* Champs */
.champ { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.champ label, .etiquette { font-size: 13px; font-weight: 600; color: var(--ink-light); }
.entree {
  height: 46px; border-radius: 14px; border: 0; outline: 0; padding: 0 14px; font-size: 16px; background: #2B213609;
  box-shadow: inset 0 0 0 1px #2B21360F; transition: box-shadow .2s, background .2s; width: 100%;
}
.entree:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--v400), 0 0 0 4px var(--v100); }
textarea.entree { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; height: 44px; border-radius: 22px; padding: 4px; gap: 2px; background: #2B21360A; }
.seg button { flex: 1; border-radius: 18px; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: background .25s var(--doux), color .2s, box-shadow .25s; }
.seg button.actif { background: #fff; color: var(--ink); box-shadow: 0 0 0 .5px #2B21361A, 0 2px 8px -2px #2B213633; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.choix button { height: 40px; padding: 0 14px; border-radius: 20px; background: #2B21360A; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: background .2s, color .2s; }
.choix button.actif { background: var(--accent-soft); color: var(--accent-press); box-shadow: inset 0 0 0 1.5px var(--v300); }
.erreur-form { color: var(--neg); font-size: 14px; margin: -4px 0 12px; }

/* ---------- Fiche ---------- */
.fiche-tete { display: flex; align-items: flex-start; gap: 12px; }
.fiche-nom {
  flex: 1; min-width: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; border: 0; outline: 0; background: none; padding: 4px 8px; margin: -4px -8px;
  border-radius: 10px; width: 100%;
}
.fiche-nom:focus { background: #2B213609; }
.fiche-sous { color: var(--ink-light); font-size: 14.5px; margin-top: 2px; }
.fiche-actions { display: flex; gap: 8px; margin: 16px 0 6px; flex-wrap: wrap; }
.statuts { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 4px; }
.statuts button {
  height: 34px; padding: 0 12px; border-radius: 17px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); background: #2B21360A;
  display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s; position: relative;
}
.statuts button::after { content: ''; position: absolute; inset: -5px 0; }
.statuts button::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.statuts button.actif { background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 40%, transparent); }
.bloc { margin-top: 18px; border-radius: 20px; padding: 16px; }
.bloc h3 { margin: 0 0 10px; font-size: 13px; font-weight: 650; color: var(--ink-light); }
.suite { background: linear-gradient(160deg, var(--v50), var(--v100)); }
.suite.retard { background: linear-gradient(160deg, #FFF8F7, var(--neg-soft)); }
.suite-txt { font-size: 17px; font-weight: 650; }
.suite-motif { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.suite .boutons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.suite .boutons .btn { height: 40px; padding: 0 14px; font-size: 14px; background: #FFFFFFD9; box-shadow: 0 0 0 .5px #2B21361A, 0 2px 6px -3px #2B213633; }
.suite .boutons .btn.principal { background: var(--violet); color: #fff; box-shadow: 0 8px 18px -10px #4F2398A6, inset 0 1px 0 #FFFFFF40; }
.infos { background: #FFFFFFB3; box-shadow: 0 0 0 .5px #2B213614; }
.info { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.info + .info { box-shadow: 0 -1px 0 #2B21360A; }
.info label { width: 96px; flex: none; font-size: 14px; color: var(--ink-light); font-weight: 550; }
.info input, .info select {
  flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: none; font-size: 16px; padding: 0 10px; margin-left: -10px; border-radius: 10px;
}
.info input:focus, .info select:focus { background: #2B213609; }
.info input::placeholder { color: var(--ink-faint); }
.info .seg { flex: 1; height: 40px; }
.info .seg button { font-size: 13.5px; border-radius: 16px; }
.info .rond-appel, .info .ouvrir { width: 36px; height: 36px; border-radius: 18px; }
.ouvrir { display: grid; place-items: center; color: var(--ink-soft); background: #2B21360A; flex: none; }
.notes-ajout { display: flex; gap: 8px; align-items: flex-end; }
.notes-ajout textarea { min-height: 46px; height: 46px; flex: 1; }
.note { padding: 12px 0 0; display: flex; gap: 10px; }
.note + .note { box-shadow: 0 -1px 0 #2B21360A; margin-top: 12px; }
.note-corps { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.note-date { font-size: 12.5px; color: var(--ink-light); font-weight: 600; margin-bottom: 3px; }
.note-suppr { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; color: var(--ink-faint); flex: none; }
@media (hover: hover) and (pointer: fine) { .note-suppr { opacity: 0; } .note:hover .note-suppr { opacity: 1; } .note-suppr:hover { background: var(--neg-soft); color: var(--neg); } }
.fiche-pied { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 13px; color: var(--ink-faint); }
.fiche-pied button { color: var(--neg); font-weight: 600; font-size: 14px; height: 40px; padding: 0 12px; border-radius: 20px; }
@media (hover: hover) and (pointer: fine) { .fiche-pied button:hover { background: var(--neg-soft); } }

/* Choisir une fiche (nouveau RDV depuis le calendrier) */
.choisir { max-height: 320px; overflow-y: auto; margin: 0 -6px 14px; }
.choisir button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; }
.choisir button b { font-weight: 620; }
.choisir button span { font-size: 13px; color: var(--ink-light); }
.choisir button.actif { background: var(--accent-soft); }

/* ---------- Connexion ---------- */
.connexion { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.connexion form { width: 100%; max-width: 380px; border-radius: 30px; padding: 30px 26px 26px; }
.connexion h1 { margin: 0 0 22px; font-size: 26px; letter-spacing: -.02em; }
.connexion .btn { width: 100%; margin-top: 8px; height: 48px; border-radius: 24px; }

/* Bulle d'information (erreur réseau) */
.bulle-info {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 120; padding: 10px 16px; border-radius: 20px;
  font-size: 14px; font-weight: 600; color: var(--amber); animation: monte .35s var(--ressort-css);
}
@media (min-width: 1024px) { .bulle-info { bottom: 24px; } }

/* Entrée en scène, à l'arrivée sur une vue seulement */
#vue.arrivee > * { animation: arrivee .38s var(--doux); }
@keyframes arrivee { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 760px) { .geste-zone { min-height: 26px; } }

.tete:empty { display: none; }
.seul-tel { display: none; }
@media (max-width: 760px) {
  .seul-tel { display: inline-flex; }
  .sauf-tel { display: none; }
  .tete .periode { flex: 1; justify-content: space-between; }
  .tete .periode b { min-width: 0; white-space: nowrap; }
  .tete .pousse { display: none; }
  .ligne-quand { font-size: 12.5px; }
}

.feuille.large .feuille-corps { padding-top: 24px; }
.info .seg button { white-space: nowrap; }
@media (max-width: 760px) {
  .feuille.large .feuille-corps { padding-top: 10px; }
  .info label { width: 82px; }
  .info .seg button { font-size: 12.5px; }
}
