/* Charte épif (brandbook v1 du 24/09/2026, epif-brandbook.owan.fr) : tokens repris tels quels.
   Police : assets/albert-sans.css (Albert Sans intégrée, marche en file://). */
:root {
  --lime: #A1E04D;
  --foret: #152C12;
  --blanc: #FFFFFF;
  --rosee: #F2FEE2;
  --ambre: #F7D576;
  --ink-soft: #46553F;       /* 7,6:1 sur rosée */
  --on-dark-soft: #C3D3B6;   /* 7,3:1 sur sous-bois */
  --grad-lime: linear-gradient(100deg, #A1E04D 0%, #C2EA62 55%, #E6F68A 100%);
  --grad-sousbois: linear-gradient(160deg, #2E4A1C 0%, #233E17 55%, #152C12 100%);
  --r-board: 28px;
  --r-glass: 22px;
  --r-pill: 999px;
  --font: "Albert Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gap: clamp(14px, 1.8vw, 22px);
  --pad: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--rosee);
  color: var(--foret);
  font: 400 1.0625rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
body:has(.fiche[open]) { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { padding: 0; list-style: none; }
a, button { color: inherit; font: inherit; }
:focus-visible { outline: 3px solid var(--foret); outline-offset: 3px; }
::selection { background: var(--lime); color: var(--foret); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { flex: none; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i--ext { transform: rotate(-45deg); }

/* Bandeau sous-bois, logo clair (rosée + feuille lime). 32 px de haut, min. 20 px ;
   sa hauteur de x (~16 px) reste libre tout autour : padding 20 px, gap 24 px. */
.top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px var(--pad);
  background: var(--grad-sousbois);
  color: var(--rosee);
}
.top__logo { flex: none; width: auto; height: 32px; }
.top h1 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.015em; }
.top p { margin-top: 4px; color: var(--on-dark-soft); font-size: .8125rem; font-weight: 500; line-height: 1.3; }

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(var(--gap) * 1.5);
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--gap) var(--pad) 48px;
}

/* Onglets Valeur | Prospects, au-dessus de la liste (en haut sur mobile) : lichen inactif, lime actif. */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs a {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  background: rgba(209, 216, 209, .62);
  color: var(--ink-soft);
  font-weight: 700;
  line-height: 20px; /* 44 px pile : la liste dessous reste calée au pixel */
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
/* Survol réservé aux écrans qui en ont (hover: hover) : au doigt, il restait collé au dernier élément touché
   (ex. Valeur encore surligné en revenant sur un prospect). Vaut pour tous les :hover de ce fichier. */
@media (hover: hover) { .tabs a:hover { background: rgba(209, 216, 209, .95); color: var(--foret); } }
.tabs a[aria-selected="true"] { background: var(--grad-lime); color: var(--foret); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }

/* Prospects : onglets du brandbook, défilement horizontal sur mobile, colonne sur desktop. */
.legend { margin: 0 0 8px 6px; color: var(--ink-soft); font-size: .8125rem; font-weight: 500; line-height: 1.3; }
.prospects ul {
  display: flex;
  gap: 8px;
  margin: -6px;
  padding: 6px; /* place pour l'anneau de focus dans la zone qui défile */
  overflow-x: auto;
}
.prospects a {
  display: grid;
  flex: none;
  width: min(78vw, 250px);
  padding: 12px 16px;
  border-radius: var(--r-glass);
  background: rgba(209, 216, 209, .62); /* lichen, onglet inactif */
  color: var(--ink-soft);
  font-size: .875rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.prospects strong { color: var(--foret); font-size: 1rem; font-weight: 700; }
@media (hover: hover) { .prospects a:hover { background: rgba(209, 216, 209, .95); color: var(--foret); } }
.prospects a[aria-current] { background: var(--grad-lime); color: var(--foret); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }

/* Dossiers par date (<details> natif : repliable à la souris comme au clavier), le plus récent en haut. */
.folder + .folder { margin-top: 10px; }
.folder summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  cursor: pointer;
  list-style: none;
  transition: background-color .2s;
}
.folder summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .folder summary:hover { background: rgba(209, 216, 209, .45); } }
.folder[open] .folder__icon { fill: rgba(161, 224, 77, .45); }
.folder__name { flex: 1; font-size: .9375rem; font-weight: 700; line-height: 1.25; }
.folder__name small { display: block; color: var(--ink-soft); font-size: .8125rem; font-weight: 500; }
.folder__chev { color: var(--ink-soft); transition: transform .2s; }
.folder[open] .folder__chev { transform: rotate(90deg); }
.folder ul { margin-top: 0; }
.folder__empty { padding: 2px 10px 8px 40px; color: var(--ink-soft); font-size: .875rem; }

@media (min-width: 900px) {
  .page { grid-template-columns: 270px minmax(0, 1fr); align-items: start; }
  .side { position: sticky; top: var(--gap); }
  .prospects ul { flex-direction: column; overflow: visible; }
  .prospects a { width: auto; }
}

.hero { display: grid; justify-items: start; gap: 8px; }
.hero h2 { font-size: clamp(2rem, 5vw, 2.625rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.hero__who { color: var(--ink-soft); font-weight: 500; }
.hero .tag { margin-top: 4px; padding: 8px 14px; font-size: .9375rem; }

.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: #E6EBE3;
  color: var(--foret);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}
.tag--lime { background: var(--grad-lime); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 1em 1.45em 1em 1.6em;
  border-radius: var(--r-pill);
  background: rgba(21, 44, 18, .1);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s;
}
@media (hover: hover) { .btn:hover { background: rgba(21, 44, 18, .16); } }
.btn--sm { padding: .75em 1em .75em 1.15em; font-size: .875rem; }

.round {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--grad-lime);
  color: var(--foret);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 10px 22px -12px rgba(98, 150, 30, .9);
  cursor: pointer;
}
.round .i { width: 20px; height: 20px; transition: transform .2s ease; }
.round--ghost { background: rgba(21, 44, 18, .1); box-shadow: none; font-size: 1.625rem; line-height: 1; }
@media (hover: hover) { .round--ghost:hover { background: rgba(21, 44, 18, .16); } }

/* Cartes concurrents : blanc sur rosée, grands arrondis, jamais d'angle vif. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: var(--gap);
  margin-top: calc(var(--gap) * 1.5);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-glass);
  background: var(--blanc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 20px 44px -28px rgba(40, 64, 24, .55);
  transition: transform .15s ease, box-shadow .2s;
}
@media (hover: hover) { .card:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 26px 48px -24px rgba(40, 64, 24, .6); } }
@media (hover: hover) { .card:hover .round .i { transform: translateX(2px); } }
.card h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.card__open { padding: 0; border: 0; background: none; text-align: left; letter-spacing: inherit; cursor: pointer; }
.card__open::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-glass); }
.card__open:focus-visible { outline: none; }
.card__open:focus-visible::after { outline: 3px solid var(--foret); outline-offset: 3px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: auto; padding-top: 4px; }
.card__foot .btn { position: relative; z-index: 1; }

/* Onglet Valeur : grille dense de petites cartes, sans action (donc sans effet au survol). */
.hero__intro { text-wrap: balance; }
.grid--valeur { gap: 14px; } /* colonnes de .grid : 1 sur mobile, 2 sur tablette, 3 sur desktop */
.vcard {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-content: start;
  align-items: center;
  gap: 10px 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-glass);
  background: var(--blanc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 20px 44px -28px rgba(40, 64, 24, .55);
}
.vcard__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(161, 224, 77, .24); }
.vcard__icon .i { width: 20px; height: 20px; }
.vcard h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.vcard p { grid-column: 1 / -1; font-size: .9375rem; line-height: 1.45; text-wrap: pretty; }
.vcard .vcard__ex { padding: 8px 12px; border-radius: 14px; background: var(--rosee); color: var(--ink-soft); font-size: .875rem; }
.vcard__ex strong { margin-right: .35em; color: var(--foret); }

/* Fiche concurrent (modale native) */
.fiche {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--r-board);
  background: var(--blanc);
  color: var(--foret);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5);
}
.fiche::backdrop { background: rgba(21, 44, 18, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.fiche__in { position: relative; display: grid; gap: 20px; padding: clamp(22px, 4vw, 32px); }
.fiche__close { position: absolute; top: 16px; right: 16px; }
.fiche h2 { padding-right: 52px; font-size: clamp(1.625rem, 4vw, 2rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.fiche h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.fiche dl { display: grid; gap: 16px; }
.fiche dt { color: var(--ink-soft); font-size: .8125rem; font-weight: 500; line-height: 1.3; }
.fiche dd { margin-top: 4px; }
.panel { padding: 14px 18px; border-radius: var(--r-glass); background: var(--rosee); }
.note { background: var(--ambre); } /* l'ambre signale, une fois par écran au plus */
.note strong { margin-right: .35em; }
.ads { display: grid; gap: 8px; margin-top: -8px; }
.ads a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: rgba(21, 44, 18, .06);
  font-weight: 600;
  text-decoration: none;
}
@media (hover: hover) { .ads a:hover { background: rgba(21, 44, 18, .12); } }
.ads small { color: var(--ink-soft); font-size: .8125rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.ads .i { margin-left: auto; }
.fiche__in > .btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .card:hover { transform: none; }
}
