/* ===================================================================
   LA FAÇON DE FAIRE DE PARRAINAGE.CO, dans les couleurs d'Ascendra.
   -------------------------------------------------------------------
   Demandé par Joris le 24 octobre 2026 : « je veux que ça ressemble à
   parrainage.co finalement, avec ma direction artistique ». Chargée en
   dernier, après annuaire-atelier.css.

   CE QUI VIENT DE PARRAINAGE.CO, ce sont des GESTES : l'ouverture centrée
   avec une grande recherche, les « marques à la une » en deux rangées qui
   défilent de côté, une page de toutes les marques, les derniers codes en
   lignes avec une colonne à droite, les meilleurs parrains en visages,
   comment ça marche en deux colonnes, les guides en cartes, les offres
   similaires au pied de chaque marque. Leur bleu reste chez eux.
   =================================================================== */

.an-lecteur { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.an-centre { text-align: center; margin: 18px 0 0; }
.an-titre-centre { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 18px; text-align: center; font: 800 clamp(1.4rem, 2.6vw, 1.85rem)/1.2 var(--ff-titre); letter-spacing: var(--ls-titre); color: var(--text); }
.an-titre-centre svg { width: 26px; height: 26px; color: var(--accent-ink); }
.an-titre-chaud { margin: 0 0 16px; font: 800 clamp(1.35rem, 2.4vw, 1.7rem)/1.2 var(--ff-titre); letter-spacing: var(--ls-titre); color: var(--accent-ink); }

/* ---------- L'ouverture centrée et la grande recherche ---------- */

.an-ouverture--co { text-align: center; padding-bottom: clamp(30px, 4vw, 52px); }
.an-ouverture--co .an-dedans { display: grid; justify-items: center; gap: 0; max-width: 820px; }
.an-ouverture--co h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.an-ouverture--co .an-chapo { margin-inline: auto; }

.an-grande-recherche { position: relative; display: flex; gap: 8px; width: min(100%, 640px); margin: 22px auto 0; }
.an-grande-recherche > svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; color: #4c5954; pointer-events: none; z-index: 1; }
.an-grande-recherche input { flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 0 14px 0 50px !important; border-radius: var(--angle); border: 1px solid rgba(255, 255, 255, .35); background: #ffffff; color: #0d1512; font: 500 1.05rem var(--ff-texte); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7); }
.an-grande-recherche input::placeholder { color: #5c6763; }
.an-grande-recherche input:focus-visible { outline: 3px solid #8ff2bc; outline-offset: 2px; }
.an-grande-recherche .an-bouton { flex: 0 0 auto; min-height: 56px; }
@media (max-width: 520px) { .an-grande-recherche { flex-direction: column; } .an-grande-recherche > svg { top: 28px; } .an-grande-recherche .an-bouton { width: 100%; } }

/* ---------- Les marques à la une ---------- */

.an-une { margin-top: 6px; }
.an-une-cadre { overflow: hidden; padding: 4px 0 14px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
/* LA RANGÉE DÉFILE TOUTE SEULE, demande de Joris le 26 octobre 2026. Elle
   est écrite deux fois : quand la première moitié est sortie, la seconde
   est exactement à sa place, et la boucle repart sans saut. Le décalage
   vaut la moitié de la piste plus la moitié d'un écart, puisque la piste
   compte un écart de moins que de colonnes. */
.an-une-piste {
  list-style: none; margin: 0; padding: 0 2px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto);
  grid-auto-columns: 150px; gap: 14px; width: max-content;
  animation: an-une-defile 60s linear infinite;
}
.an-une-cadre:hover .an-une-piste, .an-une-cadre:focus-within .an-une-piste { animation-play-state: paused; }
@keyframes an-une-defile { to { transform: translateX(calc(-50% - 7px)); } }
.an-une-carte {
  display: grid; justify-items: center; align-content: center; gap: 8px; height: 100%; min-height: 150px; padding: 16px 10px; text-align: center; text-decoration: none;
  border-radius: var(--angle); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text);
  transition: transform var(--mv-court) var(--mv-courbe), border-color var(--mv-court) var(--mv-courbe), box-shadow var(--mv-court) var(--mv-courbe);
}
.an-une-carte:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.an-une-carte:focus-visible { outline: 3px solid var(--accent-fonce); outline-offset: 2px; }
.an-une-logo { display: grid; place-items: center; width: 64px; height: 64px; font: 800 1.1rem var(--ff-titre); color: var(--muted); }
.an-une-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--angle-objet); }
.an-une-nom { font: 800 .95rem/1.2 var(--ff-titre); }
.an-une-gain { font: 800 1rem/1.2 var(--ff-titre); color: var(--muted); }

/* ---------- Les derniers codes et leur colonne ---------- */

.an-deux-colonnes { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); margin-top: 10px; }
@media (min-width: 1000px) { .an-deux-colonnes { grid-template-columns: minmax(0, 1fr) 330px; column-gap: 28px; align-items: start; } }
.an-derniers, .an-lignes, .an-colonne-co, .an-ligne { text-align: left; }
.an-lignes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.an-ligne {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "logo corps" "voir voir"; gap: 12px 16px; align-items: center;
  padding: 16px; border-radius: var(--angle); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
}
.an-ligne--tete { border-color: var(--accent-line); background: linear-gradient(90deg, var(--accent-wash), transparent 50%), var(--surface); }
.an-ligne-logo { grid-area: logo; display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--angle-objet); background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.an-ligne-logo img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; }
/* LE LOGO SANS CADRE, AUSSI DANS LES DERNIERS CODES, le 27 octobre 2026.
   Joris l'a vu sur deux marques : la règle du 26 octobre avait oublié
   ces lignes, et l'icône restait posée dans un carré gris bordé. Même
   traitement : l'icône seule, en grand, avec ses coins et son ombre. Le
   cadre ne reste que pour une marque sans logo, où il porte l'initiale. */
.an-ligne-logo:has(img) { background: none; border: 0; }
.an-ligne-logo img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, .14); }
.an-ligne-corps { grid-area: corps; min-width: 0; }
.an-ligne-titre { margin: 0; font: 800 1.02rem/1.3 var(--ff-titre); }
.an-ligne-titre a { color: var(--text); text-decoration: none; padding-block: 12px; margin-block: -12px; }
.an-ligne-titre a:hover { text-decoration: underline; }
.an-ligne-texte { margin: 4px 0 0; color: var(--text); font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.an-ligne-meta { margin: 6px 0 0; color: var(--faint); font-size: 14px; }
.an-ligne-meta a { color: var(--accent-ink); font-weight: 700; padding-block: 12px; margin-block: -12px; }
.an-ligne-voir { grid-area: voir; width: 100%; }
@media (min-width: 640px) {
  .an-ligne { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "logo corps voir"; }
  .an-ligne-voir { width: auto; white-space: nowrap; }
}
.an-colonne-co { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 1000px) { .an-colonne-co { position: sticky; top: 92px; } }
.an-colonne-co .an-bloc h2 { font-size: 1.1rem; }

.an-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.an-logos a { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 70px; padding: 10px 6px; border-radius: var(--angle); border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; color: var(--text); text-align: center; transition: border-color var(--mv-court) var(--mv-courbe), transform var(--mv-court) var(--mv-courbe); }
.an-logos a:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.an-logos img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.an-logos b { font: 800 1rem var(--ff-titre); color: var(--muted); }
.an-logos span { font: 700 14px/1.25 var(--ff-titre); }
.an-logos small { font: 800 14px/1.2 var(--ff-titre); }
.an-logos--larges { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.an-logos--larges a { min-height: 120px; background: var(--surface); box-shadow: var(--shadow-sm); }

/* ---------- Nos meilleurs parrains ---------- */

.an-meilleurs { margin-top: 18px; }
.an-visages { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 10px; max-width: 900px; }
.an-visages a { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; text-align: center; text-decoration: none; color: var(--text); border-radius: var(--angle); }
.an-visages a:hover b { text-decoration: underline; }
.an-visages .an-avatar--grand { width: 72px; height: 72px; font-size: 1.5rem; margin-bottom: 6px; }
.an-visages .an-avatar--grand img { width: 32px; height: 32px; right: -6px; bottom: -6px; }
.an-visages b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 .95rem var(--ff-titre); }
.an-visages span { color: var(--muted); font-size: 14px; }

/* ---------- Comment ça marche, en deux colonnes ---------- */

.an-deux-voies { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .an-deux-voies { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; } }
.an-deux-voies li { display: grid; justify-items: center; gap: 10px; text-align: center; color: #c6cfcb; }
.an-deux-voies h3 { margin: 0; color: #f5f7f6; font: 800 1.25rem/1.25 var(--ff-titre); }
.an-deux-voies p { margin: 0; max-width: 44ch; line-height: 1.6; }
.an-deux-voies .an-pas-illu { width: min(170px, 50%); }

/* ---------- La page de marque : les offres similaires ---------- */

.an-voisines { margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  .an-une-carte, .an-logos a { transition: none; }
  /* Sans mouvement, la rangée redevient celle qu'on fait défiler au doigt. */
  .an-une-cadre { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .an-une-piste { animation: none; }
  .an-une-double { display: none; }
}

/* Le badge « En tête » ne se coupe pas sur deux lignes à côté du nom. */
.an-ligne-titre .an-carte-boost { white-space: nowrap; font-size: 14px; }

/* ===================================================================
   L'ANNUAIRE EN CLAIR, décision de Joris le 24 octobre 2026 : « le vert est
   trop foncé, il n'est pas assez épuré, il est trop dark. Il y a déjà
   beaucoup de noir sur le site ». L'ouverture et le bloc « Comment ça
   marche » quittent l'encre pour le papier, avec un voile de vert à peine
   posé. Tout passe par les jetons de tokens.css : le mode nuit, choisi par
   le visiteur, garde donc ses couleurs sombres sans une ligne de plus.
   Ce bloc ne vaut que pour les pages de l'annuaire, body.an : le reste du
   site garde son ouverture sur l'encre.
   =================================================================== */

.an .an-ouverture {
  color: var(--text); border-bottom: 1px solid var(--line);
  background: radial-gradient(70% 120% at 50% -30%, var(--accent-wash) 0%, transparent 70%), linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.an .an-ouverture.grain::after, .an .an-ouverture.halo::before, .an .an-comment--encre.grain::after { display: none; }
.an .an-ouverture h1 { color: var(--text); }
/* Le titre de l'accueil de l'annuaire en vert, comme les titres du reste du
   site, demande de Joris le 26 octobre 2026. */
.an .an-ouverture--co h1 { color: var(--accent-ink); }
.an .an-chapo { color: var(--muted); }
.an .an-fil, .an .an-fil a { color: var(--muted); }
.an .an-fil a:hover { color: var(--text); }
.an .an-fil span[aria-hidden] { color: var(--faint); }
.an .an-logo { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.an .an-preuves li, .an .an-ligne-preuves li { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); color: var(--muted); }
.an .an-preuves b, .an .an-ligne-preuves b { color: var(--text); }
.an .an-preuves span { color: var(--muted); }
.an .an-ligne-preuves svg { color: var(--accent-ink); }
.an .an-niveau-ligne, .an .an-progression p { color: var(--muted); }
.an .an-jauge { background: var(--surface-3); }
.an .an-profil-tete .an-avatar { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.an .an-profil-niveau { background: var(--surface); border-color: var(--line); color: var(--text); }
.an .an-ouverture .an-bouton:not(.an-bouton--plein), .an .an-ouverture .an-bouton--clair, .an .an-comment--encre .an-bouton--clair {
  background: var(--surface); border-color: var(--line-strong); color: var(--text); box-shadow: var(--shadow-sm);
}
.an .an-ouverture .an-bouton:not(.an-bouton--plein):hover, .an .an-ouverture .an-bouton--clair:hover, .an .an-comment--encre .an-bouton--clair:hover { background: var(--surface); border-color: var(--accent-line); color: var(--accent-ink); }
.an .an-ouverture .an-bouton:focus-visible { outline-color: var(--accent-fonce); }
.an .an-ouverture .an-bouton--plein { box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 12px 24px -16px rgba(4, 22, 11, .45); }
.an .an-grande-recherche input { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow); }
.an .an-grande-recherche input::placeholder { color: var(--faint); }
.an .an-grande-recherche input:focus-visible { outline-color: var(--accent-fonce); }
.an .an-grande-recherche > svg { color: var(--muted); }

.an .an-comment--encre {
  color: var(--text); border-color: var(--line);
  background: radial-gradient(60% 80% at 50% 0%, var(--accent-wash) 0%, transparent 70%), var(--surface);
}
.an .an-comment--encre h2, .an .an-comment--encre .an-pas strong, .an .an-deux-voies h3 { color: var(--text); }
.an .an-comment-sous, .an .an-comment--encre .an-pas li, .an .an-deux-voies li, .an .an-comment--encre .an-gain-date { color: var(--muted); }
.an .an-comment--encre .an-gain-date a { color: var(--accent-ink); }
/* Les dessins sont détourés depuis le 24 octobre 2026 : plus besoin du masque
   qui fondait leur fond noir dans l'encre. */
.an .an-pas-illu { -webkit-mask-image: none; mask-image: none; filter: drop-shadow(0 14px 18px rgba(4, 22, 11, .14)); }
.an .an-titre-chaud { color: var(--text); }

/* CORRECTIONS DU 24 OCTOBRE 2026, relevées sur le site en ligne.
   La barre fixe du téléphone cachait la dernière ligne du pied de page :
   la place se réserve sur la page entière, pas seulement sur son corps.
   Les deux cadres de l'offre du moment se lisent à gauche : centrés, leurs
   puces restaient au bord et leur texte au milieu. */
@media (max-width: 759px) { body.an:has(.an-barre-fixe) { padding-bottom: 84px; } }
.an-cadre, .an-cadre h3, .an-cadre-etapes, .an-cadre-etapes li { text-align: left; }
.an-cadre h3 { justify-content: flex-start; }

/* LE LOGO SANS CADRE, le 26 octobre 2026. Joris l'a vu sur son telephone :
   l'icone de la marque etait posee dans une boite, elle meme bordee, et le
   cadre virait au sombre. Une icone d'application porte deja son fond et
   ses coins : elle s'affiche seule, en grand. Le cadre ne reste que pour
   une marque sans logo, ou il porte l'initiale. */
.an .an-tuile-logo:has(img),
.an .an-logo:has(img) { padding: 0; background: none; border: 0; box-shadow: none; }
.an .an-tuile-logo img,
.an .an-logo img { border-radius: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, .14); }
