/* CRM global : un cadre couleur sable, la page sur une feuille blanche, chaque projet reconnu à sa couleur (--c).
   Inspirations : la liste de tâches en colonnes (HubSpot), le tableau par étapes (Pipedrive), les initiales (Attio).
   Grille de la colonne : 12 colonnes de 77px + 11 gouttières de 16px = 1100px ; le Pipeline prend toute la largeur. */
@font-face {
  font-family: "Instrument Sans"; src: url("polices/instrument-sans.woff2") format("woff2");
  font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
}
:root {
  --cadre: #131b1a;          /* vert nuit : fond du cadre et du menu */
  --feuille: #ffffff;
  --panneau: #f8f6f1;        /* un pas sous le blanc */
  --bord: #ebe7dd; --champ: #d9d5ca;
  --texte: #1f201d; --gris: #5f5f5b;
  --accent: #1b6e66;
  --primaire: #1f201d;
  --retard: #b42318; --retard-fond: #fdecea;
  --r-panneau: 20px; --r-ligne: 12px; --r-controle: 999px;
  --gap: 16px; --pad: 20px;
  font: 15px/1.5 "Instrument Sans", Inter, system-ui, sans-serif;
  color: var(--texte); background: var(--cadre);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.gris { color: var(--gris); }
.invisible { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; }
code { background: var(--panneau); padding: 2px 6px; border-radius: 6px; font-size: .95em; letter-spacing: .05em; }

/* Teintes d'un projet, calculées depuis sa couleur */
[style*="--c"] { --pale: color-mix(in srgb, var(--c) 12%, #fff); --encre: color-mix(in srgb, var(--c) 48%, #1f201d); }

/* ── Cadre : menu à gauche, feuille blanche à droite ── */
body.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.cote { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 20px 14px 16px; }
.marque { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; }
.logo { display: inline-flex; gap: 3px; height: 20px; }
.logo i { width: 6px; height: 20px; border-radius: 3px; background: #d99a00; }
.logo i:nth-child(2) { background: #0f8a5f; height: 14px; align-self: end; }
.logo i:nth-child(3) { background: #d4485f; height: 17px; align-self: center; }
.cherche { position: relative; margin: 0 0 12px; }
.cherche .ico { position: absolute; left: 13px; top: 12px; color: #9aa6a3; pointer-events: none; }
.cherche input { width: 100%; height: 40px; padding: 0 14px 0 36px; border: 1px solid #2b3836; border-radius: var(--r-controle); background: #1c2725; font: inherit; font-size: 14px; color: #fff; }
.cherche input::placeholder { color: #9aa6a3; }
.cherche input:focus { border-color: #5d6e6a; outline: none; }
.cote nav { display: grid; gap: 2px; }
.cote nav a, .sortie button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: #c3cbc9; text-decoration: none; font: inherit; font-size: 15px; }
.cote nav a:hover, .sortie button:hover { background: #1f2b29; color: #fff; }
.cote nav a[aria-current] { background: #26332f; color: #fff; font-weight: 600; }
.sortie button { width: 100%; border: 0; background: transparent; cursor: pointer; color: #9aa6a3; }
/* sur ordinateur la recherche passe au-dessus du menu ; en haut d'écran, en dessous */
.cote .marque { order: 0; } .cote .cherche { order: 1; } .cote nav { order: 2; } .cote .sortie { order: 4; margin-top: auto; }
.feuille { min-width: 0; }
body.app .feuille { margin: 8px 8px 8px 0; background: var(--feuille); border-radius: 18px; padding: 40px 32px 72px; }
.colonne { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.colonne.large { max-width: none; }

/* ── Titres ── */
.salut .date { color: var(--gris); font-size: 15px; margin-bottom: 6px; }
.salut h1 { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; max-width: 22ch; }
.salut h1 em { font-style: normal; color: var(--retard); }
.titre { padding-bottom: 8px; }
.titre h1 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.titre p { margin-top: 6px; color: var(--gris); font-size: 15px; }
.titre-ligne { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; }
.fil { font-size: 14px; }
.fil a { color: var(--gris); text-decoration: none; }
.fil a:hover { color: var(--texte); }
.puce { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--pale); color: var(--encre); }
.puce::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Initiales du prospect */
.avatar { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pale); color: var(--encre);
  font-size: 13px; font-weight: 600; letter-spacing: .02em; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, #fff); }
.avatar.grand { width: 44px; height: 44px; font-size: 16px; }
.avatar.tres-grand { width: 64px; height: 64px; font-size: 22px; }

/* Étape en pastille */
.etape-puce { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 10px 2px 8px; border-radius: 6px; background: #f1eee7; color: #3d3d3a; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etape-puce::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.etape-puce.close { color: var(--gris); }
.etape-puce.close::before { background: #a9a69c; }

/* ── Aujourd'hui : accueil et « par quoi commencer » ── */
.salut { padding: 8px 0 20px; }
/* « Par quoi commencer » en noir profond ; les tuiles des projets en couleur pleine. */
.premier { display: grid; gap: 6px; align-content: start; padding: 20px 22px; border-radius: var(--r-panneau); color: #fff; text-decoration: none; background: #1f201d; }
.premier:hover { background: #2c2d29; }
.premier-titre { font-size: 13px; font-weight: 600; color: #b9b7ae; }
.premier-qui { display: flex; align-items: center; gap: 10px; min-width: 0; margin-top: 6px; }
.premier-qui strong { font-size: 18px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.premier .avatar { background: var(--c); color: #fff; box-shadow: none; }
.premier-action { font-size: 14px; color: #d6d4cc; }
.premier-lien { justify-self: start; margin-top: 10px; padding: 7px 16px; border-radius: 999px; background: #fff; color: var(--texte); font-size: 14px; font-weight: 600; }
.premier:hover .premier-lien { background: #f4f1e9; }
.tuiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--gap); }
.tuiles:has(.premier) { grid-template-columns: minmax(0, 1.25fr); }
.tuile { --fond: color-mix(in srgb, var(--c) 86%, #1f201d); --sur: #fff; display: grid; gap: 8px; align-content: start; padding: 20px 22px; border-radius: var(--r-panneau);
  text-decoration: none; color: var(--sur); background: var(--fond); }
.tuile[style*="#d99a00"] { --fond: #e3a51c; --sur: #1f201d; }   /* le jaune garde un texte foncé pour rester lisible */
.tuile:hover { filter: brightness(1.06); }
.tuile-nom { font-weight: 600; font-size: 15px; }
.tuile-chiffre { font-size: 15px; font-weight: 500; }
.tuile-chiffre strong { font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -.04em; margin-right: 6px; }
/* Pied de tuile : les prospects en cours, une barre des étapes ouvertes (chaque segment à la taille de son étape). */
.tuile-pied { display: grid; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--sur) 22%, transparent); }
.barre-mini { display: flex; gap: 2px; height: 8px; }
.barre-mini i { flex-basis: 0; min-width: 4px; border-radius: 2px; background: var(--sur); }
.barre-mini i:nth-child(4n+2) { opacity: .7; }
.barre-mini i:nth-child(4n+3) { opacity: .48; }
.barre-mini i:nth-child(4n) { opacity: .3; }
.barre-mini i:first-child { border-radius: 999px 2px 2px 999px; }
.barre-mini i:last-child { border-radius: 2px 999px 999px 2px; }
.barre-mini i:only-child { border-radius: 999px; }
.tuile-cours { font-size: 13px; }
.tuile-cours strong { font-weight: 700; }
.tuile-note { font-size: 13px; font-weight: 500; }
.tuile-note.retard { font-weight: 700; }

/* ── Panneaux ── */
.panneau { background: var(--panneau); border-radius: var(--r-panneau); padding: var(--pad); min-width: 0; }
.panneau h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.compte { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 8px; border-radius: 999px; background: #e9e5db; font-size: 13px; font-weight: 500; }
.panneau h3 { font-size: 13px; font-weight: 600; color: var(--gris); margin: 16px 0 8px; }
.panneau h3.retard { color: var(--retard); }
.vide { padding: 14px 16px; border: 1px dashed var(--champ); border-radius: var(--r-ligne); color: var(--gris); font-size: 14px; }

/* ── Liste de prospects en colonnes : initiales | prospect | projet | étape | action | échéance ── */
/* Les listes posées directement sur la feuille : pas de panneau autour des lignes. */
.panneau.tableau { background: none; padding: 0; border-radius: 0; }
.panneau.tableau h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 14px; }
.panneau.tableau h3 { margin-top: 22px; }
.ligne a { --cols: minmax(0, 2.2fr) 130px 160px minmax(0, 2fr) 130px; display: grid; grid-template-columns: 34px var(--cols); gap: 16px; align-items: center;
  min-height: 60px; padding: 10px 16px; border-radius: var(--r-ligne); background: var(--feuille); border: 1px solid var(--bord); color: var(--texte); text-decoration: none; }
.liste-entete { --cols: minmax(0, 2.2fr) 130px 160px minmax(0, 2fr) 130px; display: grid; grid-template-columns: var(--cols); gap: 16px; padding: 0 17px 8px 67px; font-size: 12px; color: var(--gris); }
.liste-entete.sans-projet, .ligne a:not(:has(.col-projet)) { --cols: minmax(0, 2.4fr) 170px minmax(0, 2fr) 130px; }
.liste-entete.sans-etape, .ligne a:not(:has(.col-projet)):not(:has(.col-etape)) { --cols: minmax(0, 2.4fr) minmax(0, 2fr) 130px; }
.liste-entete span:last-child, .col-quand { text-align: right; }
.lignes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ligne a:hover { border-color: #cfc9ba; }
.qui { display: grid; min-width: 0; }
.qui strong { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sous { color: var(--gris); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-projet, .col-etape { min-width: 0; display: flex; }
.col-action { font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.quand { font-size: 13px; color: var(--gris); white-space: nowrap; font-variant-numeric: tabular-nums; }
.quand.retard { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--retard-fond); color: #8f1c12; font-weight: 600; }

/* Liste d'étape sans action ni échéance : une grille de cartes compactes (initiales, nom, contact et ville). */
.lignes.compactes { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.lignes.compactes .ligne a { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }

/* ── Recherche ── */
.grande-recherche { position: relative; display: flex; gap: 8px; }
.grande-recherche .ico { position: absolute; left: 20px; top: 20px; width: 20px; height: 20px; color: var(--gris); pointer-events: none; }
.grande-recherche input { flex: 1; min-width: 0; height: 60px; padding: 0 20px 0 52px; border: 2px solid var(--texte); border-radius: var(--r-controle); font: inherit; font-size: 18px; color: var(--texte); background: var(--feuille); }
.grande-recherche input:focus { outline: none; box-shadow: 0 0 0 4px #d8e7e4; }
.grande-recherche input::placeholder { color: #8a8a84; }
.grande-recherche .bouton { min-height: 60px; padding: 0 28px; font-size: 16px; }
.resume-outils { display: flex; flex-wrap: wrap; gap: 8px; }
.resume-outils .puce { font-size: 14px; padding: 4px 12px 4px 10px; }

/* ── Pipeline en colonnes ── */
.onglets { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-controle); background: var(--panneau); }
.onglets a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: var(--r-controle); color: var(--gris); text-decoration: none; font-size: 14px; font-weight: 500; }
.onglets a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.onglets a:hover { color: var(--texte); }
.onglets a[aria-current] { background: var(--feuille); color: var(--texte); font-weight: 600; box-shadow: 0 0 0 1px var(--bord); }
.tableau-colonnes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kolonne { background: var(--panneau); border-radius: 16px; padding: 12px; min-width: 0; }
.kolonne h2 > a::before, .kolonne.fermee h2::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--c); vertical-align: 1px; }
.kolonne.fermee h2::before { background: #a9a69c; }
.kolonne h2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 4px 4px 10px; }
.kolonne h2 a { color: var(--texte); text-decoration: none; }
.kolonne h2 a:hover { text-decoration: underline; }
.cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.carte-p { display: grid; gap: 4px; padding: 12px; border-radius: var(--r-ligne); background: var(--feuille); border: 1px solid var(--bord); color: var(--texte); text-decoration: none; }
.carte-p:hover { border-color: #cfc9ba; }
.carte-haut { display: flex; align-items: center; gap: 10px; min-width: 0; }
.carte-haut .avatar { width: 28px; height: 28px; font-size: 11px; }
.carte-haut strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-p .sous, .carte-bas { padding-left: 38px; }
.carte-bas { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gris); }
.carte-bas .ico { width: 13px; height: 13px; }
.carte-bas.retard { color: var(--retard); font-weight: 600; }
.voir-tout { display: block; padding: 10px 4px 2px; font-size: 13px; font-weight: 600; color: var(--encre); text-decoration: none; }
.kolonne-vide { padding: 12px; border: 1px dashed var(--champ); border-radius: var(--r-ligne); color: var(--gris); font-size: 13px; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.etapes a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 10px; background: var(--feuille); color: var(--texte); text-decoration: none; font-size: 14px; }
.etapes a:hover { box-shadow: 0 0 0 1px var(--bord); }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--gris); font-size: 14px; }

/* ── Fiche ── */
/* Bandeau en couleur pleine du projet : en tête de la fiche et des listes d'étape (même teinte que les tuiles). */
.bandeau { --fond: color-mix(in srgb, var(--c) 86%, #1f201d); --sur: #fff; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 22px 28px 26px; border-radius: var(--r-panneau);
  background: var(--fond); color: var(--sur); margin-bottom: 6px; }
.bandeau[style*="#d99a00"], [style*="#d99a00"] > .bandeau { --fond: #e3a51c; --sur: #1f201d; }
.bandeau .fil a { color: var(--sur); opacity: .8; }
.bandeau .fil a:hover { opacity: 1; color: var(--sur); }
.bandeau h1 { font-size: 34px; line-height: 1.15; font-weight: 600; letter-spacing: -.03em; overflow-wrap: anywhere; }
.bandeau p { font-size: 15px; }
.bandeau .puce { background: color-mix(in srgb, var(--sur) 18%, transparent); color: var(--sur); }
.bandeau .puce::before { background: var(--sur); }
.fiche-tete { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
.fiche-tete p { margin-top: 6px; opacity: .92; }
.fiche-tete .puce { margin-right: 6px; }
.bandeau .avatar { background: var(--sur); color: var(--fond); box-shadow: none; }
.barre-etapes { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 4px; }
.barre-etapes li { flex: 1 1 0; min-width: 0; padding: 9px 18px; background: color-mix(in srgb, var(--sur) 14%, transparent); color: var(--sur); font-size: 13px; font-weight: 500; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.barre-etapes li:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 10px 0 0 10px; }
.barre-etapes li:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); border-radius: 0 10px 10px 0; }
.barre-etapes li.passee { background: color-mix(in srgb, var(--sur) 32%, transparent); }
.barre-etapes li.actuelle { flex: 0 0 auto; background: var(--sur); color: var(--fond); font-weight: 700; }   /* toujours lisible en entier */
.barre-etapes li.hors { flex: 0 0 auto; background: #1f201d; color: #fff; }
.fiche { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: start; }
.pile { display: grid; gap: var(--gap); }
.prochaine { background: var(--pale); }
.prochaine.retard { background: var(--retard-fond); }
.a-faire { font-size: 22px; line-height: 1.3; font-weight: 500; }
.prochaine .quand { font-size: 15px; margin-top: 6px; }
.gestes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.coord { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; margin: 0; font-size: 14px; }
.coord dt { color: var(--gris); }
.coord dd { margin: 0; overflow-wrap: anywhere; }
.historique { list-style: none; margin: 0; padding: 0 0 0 22px; display: grid; gap: 10px; position: relative; }
.historique::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: #e6e1d4; }
.historique li { position: relative; background: var(--feuille); border: 1px solid var(--bord); border-radius: var(--r-ligne); padding: 12px 16px; font-size: 14px; overflow-wrap: anywhere; }
.historique .point { position: absolute; left: -23px; top: 16px; width: 14px; height: 14px; border-radius: 50%; background: var(--feuille); border: 3px solid var(--c); }
.historique .meta { color: var(--gris); font-size: 13px; margin-bottom: 2px; }

/* « Noter et planifier » : des pastilles à cocher (radios sans script), puis l'étape et la relance */
.suivi { display: grid; gap: 16px; }
.suivi h2 { margin-bottom: 0; }
.suivi fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.suivi legend, .champ label { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--gris); }
.choix { display: flex; flex-wrap: wrap; gap: 6px; }
.choix label { position: relative; }
.choix input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choix span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--champ); background: var(--feuille);
  font-size: 14px; cursor: pointer; transition: background-color .16s, border-color .16s, color .16s; }
.choix span:hover { border-color: var(--texte); }
.choix input:checked + span { background: var(--texte); border-color: var(--texte); color: #fff; font-weight: 600; }
.choix input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.suivi textarea, .suivi select, .suivi input:not([type="radio"]) { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--champ); border-radius: 12px;
  background: var(--feuille); color: var(--texte); font: inherit; font-size: 15px; }
.suivi textarea { resize: vertical; min-height: 84px; }
.suivi textarea:focus, .suivi select:focus, .suivi input:focus { outline: none; border-color: var(--texte); box-shadow: 0 0 0 3px #d8e7e4; }
.champ { display: grid; min-width: 0; }
.champs-ligne { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr); gap: 10px; }
.suivi .bouton { justify-self: start; }
.succes { background: #e3f1ea; color: #135c3c; border-radius: var(--r-ligne); padding: 12px 16px; font-size: 14px; font-weight: 500; }

/* ── Boutons et formulaires ── */
.bouton, button.principal { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-controle);
  background: var(--primaire); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.bouton:hover, button.principal:hover { background: #3a3b37; }
.bouton.second, .bouton-doux { background: var(--feuille); color: var(--texte); border: 1px solid var(--champ); }
.bouton-doux { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--r-controle); text-decoration: none; }
.bouton.second:hover, .bouton-doux:hover { background: var(--panneau); }
.alerte { background: var(--retard-fond); color: #7a1d14; border-radius: var(--r-ligne); padding: 12px 16px; font-size: 14px; }

/* ── Réactions : ce qui se clique se soulève au survol et s'enfonce au clic ── */
.ligne a, .carte-p, .tuile, .premier, .bouton, button.principal, .bouton-doux, .premier-lien, .etapes a {
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), border-color .16s, background-color .16s, box-shadow .16s, filter .16s; }
.ligne a:hover, .carte-p:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgb(31 32 29 / .35); }
.tuile:hover, .premier:hover { transform: translateY(-2px); }
.qui strong::after { content: " →"; display: inline-block; margin-left: 2px; opacity: 0; transform: translateX(-4px); transition: opacity .16s, transform .16s; color: var(--encre); }
.ligne a:hover .qui strong::after { opacity: 1; transform: none; }
.ligne a:active, .carte-p:active, .tuile:active, .premier:active { transform: translateY(0) scale(.99); }
.bouton:active, button.principal:active, .bouton-doux:active, .etapes a:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  *, *::after { transition: none !important; }
  .ligne a:hover, .carte-p:hover, .tuile:hover, .premier:hover, .ligne a:active, .carte-p:active, .tuile:active, .premier:active,
  .bouton:active, button.principal:active, .bouton-doux:active, .etapes a:active { transform: none; }
  .qui strong::after { transform: none; }
}

/* Connexion et double authentification */
body.accueil .feuille { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.connexion { width: 100%; max-width: 420px; background: var(--feuille); border: 1px solid var(--bord); border-radius: var(--r-panneau); padding: 32px; }
.connexion .logo { margin-bottom: 18px; }
.connexion h1 { font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.connexion .muted { color: var(--gris); margin-top: 8px; }
.connexion .petit { font-size: 13px; }
.connexion form { display: grid; gap: 6px; margin-top: 22px; }
.connexion label { font-weight: 500; font-size: 14px; margin-top: 10px; }
.connexion input { height: 44px; padding: 0 14px; border: 1px solid var(--champ); border-radius: 12px; font: inherit; }
.connexion button.principal { margin-top: 18px; width: 100%; }
.connexion .alerte { margin-top: 16px; }
#code { font-size: 24px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { width: 200px; margin: 16px auto; }
.qr svg { width: 100%; height: auto; display: block; }
.etapes-activation { padding-left: 1.2em; margin: 14px 0 0; color: var(--gris); }

/* ── Écran moyen : la liste perd la colonne Projet (les initiales gardent la couleur) ── */
@media (max-width: 1240px) {
  .col-projet { display: none; }
  .ligne a, .liste-entete { --cols: minmax(0, 2.2fr) 160px minmax(0, 2fr) 120px; }
  .liste-entete:not(.sans-projet) span:nth-child(2) { display: none; }
}

/* ── Tablette : le menu passe en haut ── */
@media (max-width: 1000px) {
  body.app { grid-template-columns: minmax(0, 1fr); }
  .cote { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 12px 12px; }
  .marque { padding: 4px 8px; margin-right: auto; }
  .cote nav { display: flex; }
  .cote nav a, .sortie button { min-height: 44px; }
  .cote .cherche { order: 5; flex: 1 0 100%; margin: 6px 0 0; }
  .cherche input { height: 44px; }
  .cherche .ico { top: 14px; }
    .sortie button { width: auto; }
  body.app .feuille { margin: 0 8px 8px; padding: 32px 24px 56px; }
  .tuiles, .tuiles:has(.premier) { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .premier { grid-column: 1 / -1; }
  .fiche { grid-template-columns: minmax(0, 1fr); }
}

/* ── Téléphone ── */
@media (max-width: 700px) {
  :root { --pad: 14px; }
  .cote { padding: 8px 8px 10px; }
  .marque { font-size: 0; gap: 0; padding: 4px 6px; }
  .cote nav a { padding: 0 10px; }
  .sortie span { display: none; }
  body.app .feuille { margin: 0; border-radius: 18px 18px 0 0; padding: 22px 14px 48px; }
  .salut h1 { font-size: 28px; }
  .titre h1 { font-size: 24px; }
  .tuiles { gap: 8px; }
  .tuile { padding: 12px; gap: 6px; }
  .tuile-nom { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tuile-chiffre { font-size: 0; }
  .tuile-chiffre strong { font-size: 30px; }
  .tuile-note { font-size: 12px; line-height: 1.3; }
  .panneau { border-radius: 16px; }
  .liste-entete { display: none; }
  .ligne a { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "av qui quand" "av etape etape" "av action action"; gap: 4px 12px; align-items: start; padding: 12px; }
  .ligne .avatar { grid-area: av; }
  .qui { grid-area: qui; }
  .tuile-etapes { display: none; }
  .champs-ligne { grid-template-columns: 1fr; }
  .suivi .bouton { justify-self: stretch; }
  .lignes.compactes .ligne a { grid-template-columns: 34px minmax(0, 1fr); grid-template-areas: "av qui"; align-items: center; }
  .col-etape { grid-area: etape; }
  .col-action { grid-area: action; }
  .col-quand { grid-area: quand; }
  .titre-ligne { align-items: start; }
  .onglets { width: 100%; }
  .onglets a { flex: 1; justify-content: center; padding: 0 8px; font-size: 13px; }
  .tableau-colonnes { grid-auto-columns: 82%; scroll-snap-type: x mandatory; }
  .kolonne { scroll-snap-align: start; }
  .bandeau { padding: 18px 18px 20px; }
  .bandeau h1 { font-size: 26px; }
  .fiche-tete { flex-direction: column; align-items: flex-start; gap: 12px; }
  .bandeau .avatar.tres-grand { width: 46px; height: 46px; font-size: 16px; }
  .barre-etapes li:not(.actuelle):not(.hors) { display: none; }
  .barre-etapes li.actuelle, .barre-etapes li.hors { flex: 1 1 auto; clip-path: none; border-radius: 10px; text-align: left; }
  .barre-etapes li.actuelle::after { content: " · " attr(data-pos); font-weight: 500; opacity: .75; }
  .grande-recherche .bouton { display: none; }
  .grande-recherche input { height: 52px; font-size: 16px; }
  .grande-recherche .ico { top: 16px; }
  .a-faire { font-size: 20px; }
  .gestes .bouton { flex: 1 1 40%; }
  .connexion { padding: 24px; }
}
