/* Zetsu AI — site vitrine.
   Deux familles : Space Grotesk 600 pour les grands titres (au-dessus de 20 px), Satoshi pour tout le reste.
   Couleurs tirées du symbole : graphite, ivoire, papier, olive, yeux dorés. */
@font-face { font-family: "Satoshi"; src: url("fonts/Satoshi-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("fonts/Satoshi-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("fonts/Satoshi-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  /* Couleurs */
  --graphite: #26272d;
  --graphite-2: #313238;
  --ivoire: #f3ece1;
  --papier: #fbf7ef;
  --olive: #55622f;
  --or: #fbb834;
  --texte-2: #4b4c52;   /* 8,0:1 sur papier */
  --texte-3: #5f5b52;   /* 6,3:1 sur papier, 5,8:1 sur ivoire */
  --sombre-2: #c9c2b4;  /* 8,4:1 sur graphite */

  /* Typo */
  --display: "Space Grotesk", "Satoshi", system-ui, sans-serif;
  --texte: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-h1: clamp(2.75rem, 1.6rem + 5vw, 5.5rem);
  --fs-h2: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  --fs-h3: clamp(1.25rem, 1.05rem + .6vw, 1.5rem);
  --fs-lead: clamp(1.125rem, 1rem + .45vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-card: 1rem;
  --fs-small: .875rem;

  /* Formes */
  --large: min(1180px, calc(100% - 40px));
  --r-panneau: 32px;
  --r-carte: 24px;
  --r-interne: 16px;
  --bord: 1px solid rgba(38, 39, 45, .09);
  --bord-sombre: 1px solid rgba(243, 236, 225, .09);
  --ombre-carte: 0 1px 0 rgba(38, 39, 45, .03), 0 1px 3px rgba(38, 39, 45, .06);
  --ombre-app: 0 24px 60px -28px rgba(38, 39, 45, .4);
}
@media (max-width: 640px) { :root { --r-panneau: 24px; --r-carte: 20px; --r-interne: 12px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--papier); color: var(--graphite); font: 400 var(--fs-body)/1.6 var(--texte); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--graphite); outline-offset: 3px; border-radius: 6px; }
.sombre :focus-visible, .carte--sombre :focus-visible { outline-color: var(--or); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--graphite); color: var(--ivoire); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }
.wrap { width: var(--large); margin-inline: auto; }

/* Titres et textes */
h1 { font: 600 var(--fs-h1)/.97 var(--display); letter-spacing: -.035em; text-wrap: balance; }
h1 span { display: block; }
h2 { font: 600 var(--fs-h2)/1.06 var(--display); letter-spacing: -.028em; max-width: 18ch; text-wrap: balance; }
h3 { font: 600 var(--fs-h3)/1.2 var(--display); letter-spacing: -.015em; }
.titre-mini { font: 700 1.0625rem/1.35 var(--texte); letter-spacing: -.005em; }
.lead { font: 400 var(--fs-lead)/1.5 var(--texte); color: var(--texte-2); max-width: 38ch; }
.petit { font: 500 var(--fs-small)/1.45 var(--texte); letter-spacing: .005em; color: var(--texte-3); }
.petit a { color: var(--graphite); text-underline-offset: 3px; }
.tete { display: grid; gap: 16px; margin-bottom: 48px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 500 1rem/1 var(--texte); text-decoration: none; border: 1px solid transparent; transition: background-color .15s; }
.btn-plein { background: var(--graphite); color: var(--ivoire); }
.btn-plein:hover { background: #3a3b42; }
.btn-clair { color: var(--graphite); border-color: rgba(38, 39, 45, .16); }
.btn-clair:hover { background: rgba(38, 39, 45, .05); }
.sombre .btn-plein, .carte--sombre .btn-plein { background: var(--ivoire); color: var(--graphite); }
.sombre .btn-plein:hover, .carte--sombre .btn-plein:hover { background: #fffaf2; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--papier) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: rgba(38, 39, 45, .09); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; }
.brand img { height: 32px; width: auto; }
.top nav { display: flex; gap: 4px; margin-left: auto; }
.top nav a { text-decoration: none; font: 500 .9375rem/1 var(--texte); color: var(--texte-2); padding: 14px 12px; border-radius: 999px; }
.top nav a:hover { color: var(--graphite); background: rgba(38, 39, 45, .05); }
.top .btn { min-height: 40px; padding: 0 18px; font-size: .9375rem; }

/* Ouverture */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(8px, 2vw, 24px); }
.hero-grid { display: grid; grid-template-columns: 1.35fr .65fr; align-items: center; gap: 32px; }
.hero-texte { display: grid; gap: 28px; justify-items: start; }
.hero-texte .petit { margin-top: -8px; }
.visage { justify-self: center; width: min(360px, 100%); }
.visage svg { width: 100%; filter: drop-shadow(0 28px 36px rgba(38, 39, 45, .18)); }
.visage .oeil { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .visage .oeil { animation: cligne 6s ease-in-out 1.4s infinite; }
  .hero-texte > * { animation: monte .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-texte > :nth-child(2) { animation-delay: .08s; }
  .hero-texte > :nth-child(3) { animation-delay: .16s; }
  .hero-texte > :nth-child(4) { animation-delay: .24s; }
  .visage { animation: monte 1s cubic-bezier(.2, .7, .2, 1) .1s both; }
}
@keyframes cligne { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes monte { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }


/* Sections */
section { padding: clamp(64px, 9vw, 120px) 0; }
/* Sections qui se suivent sur le même fond : on ne double pas l'espace */
#methode, #app { padding-top: 0; }

/* Exemples : quatre domaines, puis une carte d'appel */
.carte { --pad: clamp(20px, 2.4vw, 32px); background: var(--ivoire); border: var(--bord); border-radius: var(--r-carte); padding: var(--pad); box-shadow: var(--ombre-carte); overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.carte p { font-size: var(--fs-card); line-height: 1.55; color: var(--texte-2); max-width: 46ch; }
.carte--sombre { background: var(--graphite); color: var(--ivoire); border: var(--bord-sombre); }
.carte--sombre p { color: var(--sombre-2); }
.domaines { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.carte--domaine { gap: 20px; }
.domaine-tete { display: flex; align-items: center; gap: 14px; }
.domaine-tete img { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 6px 8px rgba(38, 39, 45, .14)); }
.taches { list-style: none; padding: 0; display: grid; gap: 0; }
.taches li { padding: 12px 0 12px 28px; border-top: var(--bord); position: relative; font-size: var(--fs-card); line-height: 1.45; }
.taches li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 10px; height: 10px; border-radius: 50% 50% 50% 0; background: var(--olive); transform: rotate(-45deg); }
.carte--appel { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
.carte--appel > div { display: grid; gap: 8px; }
.carte--appel .btn { flex: none; }

/* L'application : grande capture puis trois cartes */
.vitrine { margin-bottom: 16px; }
.cadre { background: var(--ivoire); border: var(--bord); border-radius: var(--r-panneau); padding: 12px; }
.cadre img { width: 100%; border-radius: calc(var(--r-panneau) - 12px); box-shadow: var(--ombre-app); }
.vitrine figcaption { margin: 16px 0 32px; }
.trois { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.capture { display: block; margin: auto calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0; padding-top: 12px; }
.capture img { width: 100%; border-radius: var(--r-interne) 0 0 0; border-top: var(--bord); border-left: var(--bord); }
.carte--sombre .capture img { border-color: rgba(243, 236, 225, .12); }
@media (min-width: 961px) {
  .capture { position: relative; height: 260px; flex: none; margin-top: auto; padding-top: 0; }
  .capture img { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: left top; }
  .carte--sombre .capture img { object-position: left bottom; } /* on garde les totaux visibles */
}

/* Principes */
.sombre { background: var(--graphite); color: var(--ivoire); }
.sombre .lead, .sombre p { color: var(--sombre-2); }
.regles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.regles li { background: var(--graphite-2); border: var(--bord-sombre); border-radius: var(--r-carte); padding: 28px; display: grid; gap: 12px; align-content: start; }
.regles li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--or); margin-bottom: 12px; }
.regles h3 { color: var(--ivoire); }

/* Offre */
.panneau { background: var(--ivoire); border: var(--bord); border-radius: var(--r-panneau); padding: clamp(24px, 4vw, 56px); display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 64px); }
.offre-texte { display: grid; gap: 20px; align-content: start; justify-items: start; }
.pastilles { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pastilles li { background: var(--papier); border: var(--bord); border-radius: 999px; padding: 6px 12px; font: 500 var(--fs-small)/1.2 var(--texte); }
.etapes { list-style: none; padding: 0; display: grid; gap: 12px; counter-reset: etape; }
.etapes li { counter-increment: etape; background: var(--papier); border: var(--bord); border-radius: var(--r-interne); padding: 20px 24px; display: grid; grid-template-columns: 40px 1fr; gap: 4px 16px; }
.etapes li::before { content: counter(etape); grid-row: span 2; font: 600 1.5rem/1.1 var(--display); color: var(--olive); }
.etapes p { color: var(--texte-2); font-size: var(--fs-card); }

/* Questions */
.questions { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.questions h2 { position: sticky; top: 96px; }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--ivoire); border: var(--bord); border-radius: var(--r-interne); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 24px; min-height: 56px; position: relative; font: 700 1.0625rem/1.35 var(--texte); border-radius: var(--r-interne); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--olive); border-bottom: 2px solid var(--olive); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-25%) rotate(225deg); }
.faq details p { padding: 0 24px 20px; color: var(--texte-2); max-width: 60ch; }

/* Appel final */
.fin { padding-top: 0; }
.fin.sombre { background: none; }
.fin .wrap { background: var(--graphite); color: var(--ivoire); border-radius: var(--r-panneau); padding: clamp(40px, 7vw, 88px) clamp(24px, 5vw, 64px); display: grid; justify-items: center; text-align: center; gap: 20px; }
.fin img { width: 80px; margin-bottom: 4px; }
.fin p { max-width: 44ch; }
.fin .petit a { color: var(--ivoire); }
.fin .actions { margin-top: 8px; justify-content: center; }

/* Pied de page */
footer { padding: 0 0 32px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; border-top: var(--bord); padding-top: 20px; }
footer img { height: 24px; width: auto; }
footer nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
footer nav a { text-decoration: none; padding: 12px 8px; color: var(--texte-2); }
footer nav a:hover { text-decoration: underline; color: var(--graphite); }

/* Mentions légales */
.legal { padding: clamp(48px, 8vw, 96px) 0; }
.legal .wrap { max-width: 720px; display: grid; gap: 16px; }
.legal h1 { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem); margin-bottom: 16px; }
.legal h2 { font-size: var(--fs-h3); margin-top: 24px; }
.legal p { color: var(--texte-2); }
.a-completer { background: #fff3d6; border: 1px dashed #b3852a; padding: 1px 6px; border-radius: 4px; }
.a-droite { margin-left: auto; }

/* Formulaires : demande d'accès, espace admin */
.formulaire { display: grid; gap: 16px; max-width: 560px; }
.legal .formulaire { margin-top: 16px; }
.formulaire label { display: grid; gap: 6px; font: 500 .9375rem/1.3 var(--texte); }
.facultatif { color: var(--texte-3); font-weight: 400; }
.formulaire input, .formulaire textarea { font: 400 1rem/1.4 var(--texte); color: var(--graphite); background: #fff; border: 1px solid rgba(38, 39, 45, .22); border-radius: 12px; padding: 12px 14px; width: 100%; }
.formulaire textarea { resize: vertical; min-height: 120px; }
.formulaire input:focus-visible, .formulaire textarea:focus-visible { outline: 2px solid var(--graphite); outline-offset: 1px; border-radius: 12px; }
.formulaire .btn { justify-self: start; }
button.btn { cursor: pointer; }
.btn:disabled { opacity: .55; cursor: progress; }
.pot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.message { padding: 12px 16px; border-radius: 12px; background: var(--ivoire); border: var(--bord); color: var(--graphite); }
.message[data-ton="erreur"] { background: #fbeae5; border-color: rgba(140, 40, 20, .25); color: #7a2412; }
.message[data-ton="ok"] { background: #edf0e1; border-color: rgba(85, 98, 47, .3); color: #3a4420; }
.message a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.legal .message p { color: inherit; }

/* Espace admin : un outil de travail, sobre */
.admin-titre { font: 500 .9375rem/1 var(--texte); color: var(--texte-2); padding-left: 16px; border-left: var(--bord); }
.admin-page { padding: clamp(32px, 6vw, 64px) 0 72px; }
.admin-page .wrap { max-width: 960px; }
.admin-connexion { display: grid; gap: 16px; padding: 0; max-width: 560px; }
/* minmax(0, 1fr) : le tableau des entreprises défile dans son cadre au lieu d'élargir toute la page. */
.admin-tableau { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.admin-tableau section { padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.admin-page h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); }
.admin-page h2 { font-size: var(--fs-h3); max-width: none; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.admin-tete { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.compte { font: 500 var(--fs-small)/1 var(--texte); color: var(--texte-3); letter-spacing: 0; }
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ligne { background: var(--ivoire); border: var(--bord); border-radius: var(--r-interne); padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; align-items: center; }
.ligne--simple { padding: 12px 18px; }
.ligne-texte { display: grid; gap: 4px; min-width: 0; }
.ligne-texte p { color: var(--texte-2); font-size: var(--fs-card); overflow-wrap: anywhere; }
.ligne-texte .ligne-titre { color: var(--graphite); font-weight: 700; }
.ligne-message { white-space: pre-line; padding-left: 12px; border-left: 2px solid rgba(85, 98, 47, .35); }
.ligne .actions { justify-content: flex-end; align-items: center; }
.ligne .btn { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.etat { display: inline-block; font: 500 var(--fs-small)/1 var(--texte); padding: 6px 10px; border-radius: 999px; background: rgba(38, 39, 45, .07); color: var(--texte-2); white-space: nowrap; }
.etat--ok { background: #e4e9cf; color: #3a4420; }
.etat--attente { background: #fcefcc; color: #684a05; }
.etat--retire { background: rgba(38, 39, 45, .06); color: var(--texte-3); }
.vide { color: var(--texte-3); }
.traitees summary { cursor: pointer; color: var(--texte-2); padding: 8px 0; }
.traitees .liste { margin-top: 8px; }
.formulaire--ligne { grid-template-columns: 1fr 1fr auto; align-items: end; max-width: none; }
.tableau-defile { overflow-x: auto; border: var(--bord); border-radius: var(--r-interne); background: var(--ivoire); }
table.entreprises { width: 100%; border-collapse: collapse; font-size: var(--fs-card); }
table.entreprises th { text-align: left; font: 500 var(--fs-small)/1.3 var(--texte); color: var(--texte-3); padding: 12px 16px; border-bottom: var(--bord); white-space: nowrap; }
table.entreprises td { padding: 12px 16px; border-bottom: var(--bord); vertical-align: middle; }
table.entreprises tr:last-child td { border-bottom: 0; }
table.entreprises .nombre { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .admin-titre { display: none; }
  .ligne { grid-template-columns: 1fr; }
  .ligne .actions { justify-content: flex-start; }
  .formulaire--ligne { grid-template-columns: 1fr; }
}

/* Espace admin : onglets et vues */
.admin-page .wrap { max-width: 1080px; }
.admin-barre { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; }
.onglets { display: flex; gap: 4px; padding: 4px; background: var(--ivoire); border: var(--bord); border-radius: 999px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.onglets a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; font: 500 .9375rem/1 var(--texte); color: var(--texte-2); }
.onglets a:hover { color: var(--graphite); background: rgba(38, 39, 45, .05); }
.onglets a[aria-current="page"] { background: var(--graphite); color: var(--ivoire); }
.pastille-n { font: 700 .75rem/1 var(--texte); background: var(--or); color: var(--graphite); border-radius: 999px; padding: 4px 7px; }
.vue { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.vue-tete { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; }
[tabindex="-1"]:focus { outline: none; }
.texte-court { max-width: 72ch; }
.deux-colonnes { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.colonne { display: grid; gap: 40px; }
.section-tete { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.rappel { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.rappel::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--or); }
.rappel a { color: var(--graphite); text-underline-offset: 3px; }
.cache-visuel { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Bande des étapes : du plus froid au plus avancé, l'olive fonce ; le client porte l'œil doré du symbole. */
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.etape { appearance: none; font: inherit; text-align: left; cursor: pointer; display: grid; gap: 6px; align-content: start; min-height: 80px; padding: 14px 16px 12px; border: 1px solid transparent; border-radius: 4px; background: var(--ivoire); color: var(--graphite); }
.etape:first-child { border-radius: var(--r-interne) 4px 4px var(--r-interne); }
.etape:last-child { border-radius: 4px var(--r-interne) var(--r-interne) 4px; }
.etape-n { font: 600 1.75rem/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.etape-nom { font: 500 var(--fs-small)/1.2 var(--texte); }
.etape--contacte { background: #e4e9cf; color: #3a4420; }
.etape--rdv { background: #c8d29f; color: #2b3315; }
.etape--proposition { background: var(--olive); color: var(--ivoire); }
.etape--client { background: var(--graphite); color: var(--ivoire); }
.etape--client .etape-n::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; vertical-align: middle; border-radius: 50%; background: var(--or); }
.etape--perdu { background: transparent; border: 1px dashed rgba(38, 39, 45, .28); color: var(--texte-3); }
.etape:hover { filter: brightness(.96); }
.etape[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--graphite); }
.etape--proposition[aria-pressed="true"], .etape--client[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--or); }
.etape:focus-visible { outline-offset: 2px; }

/* Champs de l'espace admin hors .formulaire */
.admin-page select, .filtres input, .relier input, .import input:not([type="checkbox"]) { font: 400 1rem/1.4 var(--texte); color: var(--graphite); background: #fff; border: 1px solid rgba(38, 39, 45, .22); border-radius: 12px; padding: 11px 14px; min-height: 46px; max-width: 100%; width: 100%; }
table select { min-height: 38px; padding: 6px 10px; font-size: .9375rem; width: auto; min-width: 10.5rem; }
.admin-page h1 .compte { display: inline; margin-left: 12px; font-size: var(--fs-small); }
.filtres { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.filtres label, .fiche-etape { display: grid; gap: 6px; font: 500 .9375rem/1.3 var(--texte); }
.puce { appearance: none; cursor: pointer; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(38, 39, 45, .16); background: transparent; color: var(--graphite); font: 500 var(--fs-small)/1 var(--texte); }
.puce:hover { background: rgba(38, 39, 45, .05); }
.puce[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: var(--ivoire); }
.bascule, .rapides { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.btn-lien, .btn-lien { appearance: none; min-height: 32px; padding: 4px 2px; border: 0; border-radius: 4px; background: none; color: var(--texte-2); font: 500 var(--fs-small)/1.2 var(--texte); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn.btn-lien:hover, .btn-lien:hover { color: var(--graphite); background: none; }
.btn-danger { color: #7a2412; border-color: rgba(122, 36, 18, .3); }
.btn-danger:hover { background: #fbeae5; }
.etat--retard { background: #fbeae5; color: #7a2412; }
a.etat { text-decoration: none; }

/* Relances */
.groupe { font: 700 var(--fs-small)/1.2 var(--texte); color: var(--texte-3); margin: 8px 0 0; }
.relances { list-style: none; padding: 0; margin: 0; border-top: var(--bord); }
.tache { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 4px; border-bottom: var(--bord); }
.tache input[type="checkbox"], .resultat input[type="checkbox"], .tout input { width: 20px; height: 20px; margin: 0; accent-color: var(--olive); }
.tache label { font-weight: 500; cursor: pointer; overflow-wrap: anywhere; }
.tache--faite label { color: var(--texte-3); text-decoration: line-through; }
.tache-infos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; font-size: var(--fs-small); }
.tache-infos a { color: var(--texte-2); text-underline-offset: 3px; }
#fiche .tache { grid-template-columns: 24px minmax(0, 1fr); }
#fiche .tache-infos { grid-column: 2; justify-content: flex-start; }
.formulaire--tache { grid-template-columns: minmax(0, 1fr) auto; align-items: end; max-width: none; margin-top: 16px; }
.formulaire--tache .rapides, .formulaire--tache .btn-plein { grid-column: 1 / -1; }

/* Prospects */
.formulaire--ajout { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; padding: 20px; background: var(--ivoire); border: var(--bord); border-radius: var(--r-interne); }
.formulaire--ajout .actions, .formulaire--ajout .message { grid-column: 1 / -1; }
.cellule-titre { display: block; font-weight: 700; }
.cellule-titre a { color: var(--graphite); text-decoration: none; }
.cellule-titre a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cellule-sous { display: block; color: var(--texte-3); font-size: var(--fs-small); overflow-wrap: anywhere; }
#plus-prospects { justify-self: start; }

/* Fiche */
#fiche { display: grid; gap: 24px; }
.retour { justify-self: start; color: var(--texte-2); font-weight: 500; text-underline-offset: 3px; }
.fiche-tete { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; }
.fiche-nom { display: grid; gap: 8px; min-width: 0; }
.fiche-nom h1 { overflow-wrap: anywhere; }
.fiche-grille { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 16px; }
.fiche-colonne { display: grid; gap: 40px; }
.formulaire .genre { display: inline-flex; position: relative; }
.genres { display: flex; flex-wrap: wrap; gap: 6px; }
.genre input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.genre span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(38, 39, 45, .16); font: 500 var(--fs-small)/1 var(--texte); cursor: pointer; }
.genre input:checked + span { background: var(--graphite); border-color: var(--graphite); color: var(--ivoire); }
.genre input:focus-visible + span { outline: 2px solid var(--graphite); outline-offset: 2px; }
.journal { list-style: none; padding: 0; margin: 8px 0 0 6px; }
.journal-entree { position: relative; display: grid; gap: 4px; padding: 12px 0 14px 20px; border-left: 2px solid rgba(38, 39, 45, .12); }
.journal-entree::before { content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--papier); border: 2px solid var(--texte-3); }
.journal-entree--appel::before, .journal-entree--mail::before { background: var(--olive); border-color: var(--olive); }
.journal-entree--rdv::before { background: var(--or); border-color: #b3852a; }
.journal-entree--etape::before { background: var(--graphite); border-color: var(--graphite); }
.journal-tete { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: var(--fs-small); color: var(--texte-3); }
.journal-genre { font-weight: 700; color: var(--graphite); }
.journal-texte { white-space: pre-line; overflow-wrap: anywhere; color: var(--texte-2); }
.journal-entree--etape .journal-texte { color: var(--texte-3); }
.replie > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.replie > summary::-webkit-details-marker { display: none; }
.replie > summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--olive); border-bottom: 2px solid var(--olive); transform: translateY(-30%) rotate(45deg); transition: transform .2s; }
.replie[open] > summary::after { transform: translateY(20%) rotate(225deg); }
.replie[open] > summary { margin-bottom: 16px; }
.coordonnees { grid-template-columns: 1fr 1fr; max-width: none; }
.coordonnees .btn { grid-column: 1 / -1; }

/* Prospection */
.formulaire--recherche { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr) auto; align-items: end; max-width: none; }
.resume { font-weight: 700; }
.resultats { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.resultat { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 14px 18px; background: var(--ivoire); border: var(--bord); border-radius: var(--r-interne); }
.resultat label.ligne-titre { cursor: pointer; }
.resultat--connu { background: transparent; }
.case-vide { width: 20px; }
/* Barre de sélection : reste visible en bas pendant qu'on coche. */
.import { position: sticky; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; justify-content: space-between; padding: 12px 16px; border-radius: var(--r-interne); background: var(--graphite); color: var(--ivoire); box-shadow: var(--ombre-app); }
.import :focus-visible { outline-color: var(--or); }
.import .btn-plein { background: var(--ivoire); color: var(--graphite); }
.import .btn-plein:hover { background: #fffaf2; }
.tout { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; font-weight: 500; cursor: pointer; }
.import-liste { flex: 1 1 220px; display: grid; gap: 4px; font: 500 var(--fs-small)/1.2 var(--texte); }
.pagination { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Rendez-vous */
.admin-tableau section.encadre { padding: clamp(20px, 3vw, 28px); background: var(--ivoire); border: var(--bord); border-radius: var(--r-carte); }
#calcom-etat { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--texte-2); }
#calcom-etat .petit { flex-basis: 100%; margin: 0; }
#etapes-calcom summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.etapes-liaison { display: grid; gap: 10px; margin: 8px 0 0; padding-left: 22px; color: var(--texte-2); }
.etapes-liaison code { font: 500 .875rem/1.5 ui-monospace, Menlo, Consolas, monospace; padding: 2px 6px; background: var(--papier); border: var(--bord); border-radius: 8px; overflow-wrap: anywhere; }
.formulaire--lien { grid-template-columns: minmax(0, 1fr) auto auto; }
.relier { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.relier input { flex: 1 1 200px; width: auto; }
.relier-resultats { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }

@media (max-width: 960px) {
  .formulaire--recherche { grid-template-columns: 1fr 1fr; }
  .formulaire--recherche .btn { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .deux-colonnes, .fiche-grille { grid-template-columns: minmax(0, 1fr); }
  .formulaire--ajout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .onglets { flex-wrap: wrap; border-radius: var(--r-interne); }
  .onglets a { padding: 0 12px; }
  .admin-barre .btn { min-height: 40px; }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .etape, .etape:first-child, .etape:last-child { border-radius: 8px; min-height: 68px; padding: 12px; }
  .etape-n { font-size: 1.5rem; }
  .filtres, .formulaire--ajout, .formulaire--recherche, .coordonnees, .formulaire--lien, .formulaire--tache { grid-template-columns: 1fr; }
  .tache { grid-template-columns: 24px minmax(0, 1fr); }
  .tache-infos { grid-column: 2; justify-content: flex-start; }
  .import { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 10px 12px; }
  .import .import-liste { grid-column: 1 / -1; grid-row: 2; }
  .import .import-liste input { min-height: 40px; padding: 8px 12px; }
  .resultat { grid-template-columns: 24px minmax(0, 1fr); }
  .resultat > .etat { grid-column: 2; justify-self: start; }
}

/* Écrans moyens */
@media (max-width: 1060px) { .top nav { display: none; } .top .btn { margin-left: auto; } }
@media (max-width: 960px) {
  .hero-grid, .panneau, .questions { grid-template-columns: 1fr; }
  .visage { order: -1; justify-self: start; width: 160px; }
  .trois { grid-template-columns: 1fr 1fr; }
  .trois .carte--sombre { grid-column: 1 / -1; }
  .regles { grid-template-columns: 1fr; }
  .questions h2 { position: static; }
}
/* Téléphones */
@media (max-width: 640px) {
  .top nav { display: none; }
  .top .btn { margin-left: auto; }
  .visage { width: 112px; }
  h1 { font-size: clamp(2.25rem, 10.5vw, 2.75rem); }
  .hero-grid { gap: 24px; }
  .domaines, .trois { grid-template-columns: 1fr; gap: 12px; }
  .carte--appel { flex-direction: column; align-items: flex-start; }
  .etapes li { padding: 18px 20px; grid-template-columns: 32px 1fr; }
  footer nav { margin-left: -8px; width: 100%; }
}
@media (max-width: 360px) {
  .top .btn { padding: 0 14px; font-size: .875rem; }
  .brand img { height: 28px; }
}
