/*
 * Point d'entrée unique du système de design, chargé par toutes les mises en page :
 * place de marché, espace éleveur, super-admin, impression et mini-sites des élevages.
 * Les fichiers sont dans design/ ; les valeurs (couleurs, polices, tailles, espacements) dans design/jetons.css.
 * Voir docs/design-system.md.
 */

/* Polices de la charte (hébergées sur la plateforme, licence SIL OFL 1.1). Plus Jakarta Sans : titres, boutons, navigation. Inter : texte courant, champs, tableaux. */

@font-face { font-family: 'Plus Jakarta Sans'; src: url('polices/PlusJakartaSans-SemiBold.woff2?v=1794464556') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('polices/PlusJakartaSans-Bold.woff2?v=1794464556') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('polices/PlusJakartaSans-ExtraBold.woff2?v=1794464557') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('polices/Inter-Regular.woff2?v=1794464557') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('polices/Inter-Medium.woff2?v=1794464557') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('polices/Inter-SemiBold.woff2?v=1794464557') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }



/* Jetons du système de design « Lagon » : seule source des couleurs, typographies, espacements, rayons et ombres. Changer une valeur ici change toute la plateforme et tous les mini-sites. */

:root {
  /* Encres : textes */
  --encre: #0B2F38;               /* texte principal, 14:1 sur blanc */
  --encre-rvb: 11, 47, 56;        /* --encre en composantes, pour les ombres et voiles translucides : à changer avec --encre */
  --encre-douce: #3D5A63;         /* texte secondaire, 7:1 */
  --gris: #587179;                /* texte discret et légendes, 4,9:1 sur le fond de page */
  --gris-clair: #7A939A;          /* traits d'appui et pointillés, jamais du texte */
  --encre-inverse: #FFFFFF;       /* texte sur marque ou accent */
  --encre-inverse-douce: #D3E6EB; /* texte secondaire sur marque */

  /* Marque : pétrole, titres, aplats, navigation */
  --marque: #0F4C5C;
  --marque-fonce: #0A3742;        /* survol, pied de page, barre latérale sombre */
  --marque-douce: #DCEDF1;        /* fonds d'appui, élément actif doux */

  /* Accent : corail, réservé aux actions */
  --accent: #CF3B26;              /* bouton principal, texte blanc 4,9:1 */
  --accent-fonce: #A92E1C;        /* survol, texte corail sur blanc */
  --accent-doux: #FCE9E5;         /* mises en avant douces, réservé */

  /* Surfaces */
  --fond: #F5F9FA;                /* fond de page, blanc bleuté */
  --blanc: #FFFFFF;               /* cartes, champs, fenêtres */
  --surface-forte: #E6F1F3;       /* surface mise en avant, survol de ligne */
  --surface-creuse: #EEF4F6;      /* zones en retrait : pistes, onglets, vignettes */
  --photo-vide: linear-gradient(160deg, #D5E4E8, #AFC8CF); /* emplacement d'une photo absente */
  --entete-voile: rgba(255, 255, 255, .92); /* fond translucide de l'en-tête */

  /* Bordures */
  --bord: #DCE6E9;                /* cartes et séparateurs */
  --bord-fort: #C3D3D8;           /* séparateurs de tableau */
  --bord-champ: #7A939A;          /* bord des champs, 3,3:1 sur blanc */
  --trait: 1px;                   /* épaisseur des bordures de cartes */
  --trait-fort: 1.5px;            /* boutons contour, champs en erreur */
  --trait-epais: 2px;             /* pointillés, bordures marquées */

  /* États : succès, alerte, erreur, notes internes, messages non lus */
  --ok: #11695A;
  --ok-doux: #E2F3EF;
  --alerte: #8A5A00;
  --alerte-doux: #FFF3D6;
  --erreur: #B3261E;
  --erreur-doux: #FDE8E6;
  --non-lu: #FCE9E5;              /* fond d'un message non lu */
  --note-interne: #EEEBFA;        /* fond d'une note interne du support */
  --note-interne-bord: #5B4BB0;   /* bordure et texte d'une note interne */
  --ambassadeur: #6A3D8F;         /* statut Ambassadeur (parrainage) : volontairement hors des teintes des badges de vérification, 8:1 sur son fond doux */
  --ambassadeur-doux: #F3ECFA;
  --fondateur: #705600;           /* badge Éleveur fondateur (premiers éleveurs validés) : or sombre, hors des teintes des badges de vérification et du violet de l'Ambassadeur, 6,2:1 sur son fond doux, 7:1 en texte blanc dessus */
  --fondateur-doux: #FAF2CF;
  --desactive-fond: #E7EDEF;
  --desactive-texte: #6E8389;

  /* Espèces : badges colorés (le chien, et toute espèce sans jeu propre, prend celui du chien) */
  --espece-chien-fond: #DCEDF1;
  --espece-chien-encre: #0F4C5C;
  --espece-chat-fond: #ECE8FA;
  --espece-chat-encre: #4A3A99;

  /* Voiles : fonds translucides au-dessus des photos et derrière les fenêtres */
  --voile-fenetre: rgba(var(--encre-rvb), .55);
  --voile-compteur: rgba(var(--encre-rvb), .8);
  --voile-visionneuse: rgba(8, 28, 34, .96);
  --voile-bouton-clair: rgba(255, 255, 255, .16);
  --voile-puce-claire: rgba(255, 255, 255, .12); /* puce translucide sur un aplat pétrole */
  --voile-photo: linear-gradient(180deg, rgba(var(--encre-rvb), 0) 55%, rgba(var(--encre-rvb), .55) 100%);

  /* Ombres */
  --ombre-carte: 0 1px 2px rgba(var(--encre-rvb), .05), 0 2px 8px rgba(var(--encre-rvb), .04);
  --ombre-survol: 0 4px 12px rgba(var(--encre-rvb), .08), 0 12px 32px rgba(var(--encre-rvb), .08);
  --ombre-flottante: 0 8px 24px rgba(var(--encre-rvb), .10), 0 24px 56px rgba(var(--encre-rvb), .10);
  --ombre-pastille: 0 1px 3px rgba(var(--encre-rvb), .18);
  --ombre-logo: 0 2px 8px rgba(var(--encre-rvb), .18);
  --ombre-focus: 0 0 0 4px var(--marque-douce);

  /* Polices */
  --titre: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --texte: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --code: ui-monospace, 'Cascadia Code', Consolas, 'Liberation Mono', monospace; /* clés d'API, exemples de la documentation */

  /* Échelle typographique */
  --t-titre-1: clamp(30px, 5vw, 52px);
  --t-titre-2: clamp(24px, 3vw, 32px);
  --t-page: 34px;
  --t-grand: clamp(28px, 4vw, 40px);
  --t-xl: 30px;
  --t-l: 26px;
  --t-section: 24px;
  --t-cadre: 22px;
  --t-carte: 21px;              /* h3, titres des cartes et fiches */
  --t-m: 20px;
  --t-carte-s: 19px;            /* titres des cartes et offres, nom de la marque */
  --t-s: 18px;
  --t-xs: 17px;
  --t-corps: 16px;              /* texte courant et champs */
  --t-texte-s: 15px;
  --t-discret: 14px;            /* textes discrets, mentions */
  --t-texte-xs: 13px;
  --t-mini: 12px;
  --t-micro: 12px;

  /* Espacements */
  --marge: clamp(16px, 4vw, 40px);
  --e-1: 2px;
  --e-2: 4px;
  --e-3: 8px;
  --e-4: 12px;
  --e-5: 16px;
  --e-6: 22px;
  --e-7: 32px;
  --e-8: 48px;

  /* Rayons */
  --rayon-xs: 8px;              /* pastilles carrées, petites vignettes */
  --rayon-s: 12px;              /* champs, cellules */
  --rayon-m: 16px;              /* photos, encarts */
  --rayon: 20px;                /* cartes */
  --rayon-l: 24px;              /* grands blocs, bandeaux, fenêtres */
  --rayon-pilule: 999px;        /* boutons, puces, pastilles */
  --rayon-rond: 50%;

  /* Dimensions : hauteurs des champs et des boutons, largeur du contenu, mouvements */
  --h-champ: 48px;
  --h-champ-s: 40px;
  --h-tactile: 44px;            /* zone tactile minimale */
  --h-barre-mobile: 64px;       /* barre de raccourcis fixée en bas de l'écran du téléphone (espace) */
  --h-jauge: 10px;              /* épaisseur d'une jauge d'avancement */
  --puce-etape: 34px;           /* numéro rond d'une étape d'un parcours */
  --colonne-classement: 260px;  /* largeur minimale d'un classement (écran « En direct ») */
  --larg-infobulle: 280px;      /* largeur d'une infobulle (badges de confiance) */
  --photo-parent: 88px;         /* photo d'un parent (bloc « Les parents ») */
  --larg-petit: 148px;          /* vignette d'un petit (« Les autres petits de la portée ») */
  --larg-noeud-arbre: 232px;    /* carte d'un ancêtre dans l'arbre généalogique (ordinateur) */
  --photo-noeud: 56px;          /* photo d'un ancêtre dans l'arbre généalogique */
  --arbre-popin-largeur: min(96vw, 1500px);  /* fenêtre « Agrandir » de l'arbre généalogique */
  --arbre-popin-hauteur: 92vh;
  --icone-arbre: 20px;          /* icône du bouton « Agrandir » */
  --photo-sujet-arbre: 68px;    /* photo de l'animal au centre de l'arbre */
  --arbre-liaison: 28px;        /* portée des traits qui relient un ancêtre à ses parents */
  --patte-progression: 14px;    /* pattes de la progression de l'arbre (ancêtres renseignés) */
  --mouvement-arbre: .5s cubic-bezier(.2, .8, .2, 1); /* apparition des cartes de l'arbre */
  --delai-generation: .09s;     /* décalage d'une génération à la suivante */
  /* Arbre généalogique : couleurs par sexe (père : bleu lagon, mère : rose), titres en médaille dorée */
  --sexe-male: #1F6F8B;         /* texte et liseré, 5,7:1 sur blanc */
  --sexe-male-doux: #E3F1F6;
  --sexe-male-trait: #8FC1D3;   /* traits de liaison, jamais du texte */
  --sexe-femelle: #B8457A;      /* texte et liseré, 5:1 sur blanc */
  --sexe-femelle-doux: #FBE9F1;
  --sexe-femelle-trait: #E3A3C0;
  --medaille-fond: var(--alerte-doux);
  --medaille-encre: var(--alerte);
  /* Pictogrammes en masque (la couleur vient de background) : patte, mâle, femelle, médaille, plus */
  --icone-patte: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.5' rx='5.6' ry='4.6'/%3E%3Cellipse cx='5.2' cy='11.2' rx='2.2' ry='2.9'/%3E%3Cellipse cx='9.4' cy='6.4' rx='2.2' ry='3'/%3E%3Cellipse cx='14.6' cy='6.4' rx='2.2' ry='3'/%3E%3Cellipse cx='18.8' cy='11.2' rx='2.2' ry='2.9'/%3E%3C/svg%3E");
  --icone-male: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='14' r='5.2'/%3E%3Cpath d='M14 10l6-6M14.5 4H20v5.5'/%3E%3C/svg%3E");
  --icone-femelle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.5' r='5.2'/%3E%3Cpath d='M12 13.7V21M8.5 18h7'/%3E%3C/svg%3E");
  --icone-medaille: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M8 14l-1.8 7.5L12 18.6l5.8 2.9L16 14z'/%3E%3C/svg%3E");
  --icone-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --larg-apercu-reseau: 320px;  /* colonne de l'aperçu d'une publication (super-admin, Réseaux sociaux) */
  --larg-choix-image: 140px;    /* image à cocher d'une publication */
  --larg-image-apercu: 96px;    /* image dans l'aperçu d'une publication */
  --vignette-suggestion: 56px;  /* vignette d'une suggestion « À publier » */
  --larg-code-qr: 220px;        /* QR code de la double authentification */
  /* Carte vivante (super-admin, En direct) : fond sombre de la marque, une teinte par famille de page, par type de visiteur et par provenance */
  --carte-fond: var(--marque-fonce);
  --carte-fond-clair: #124B5B;
  --carte-fond-profond: #062830;
  --carte-trait: rgba(211, 230, 235, .16);       /* anneau et séparateurs sur la carte */
  --carte-texte: var(--encre-inverse);
  --carte-texte-doux: var(--encre-inverse-douce);
  --carte-halo: rgba(6, 40, 48, .92);            /* contour des textes posés sur la carte */
  --carte-encre-bulle: #062830;                  /* chiffre dans une bulle claire */
  --carte-reflet: rgba(255, 255, 255, .24);
  --carte-centre-haut: #2B8FA3;                  /* bulle des internautes : dégradé */
  --carte-centre-bas: var(--marque);
  --carte-flux: rgba(211, 230, 235, .7);
  --carte-point: #FFFFFF;
  --carte-panneau-fond: rgba(6, 40, 48, .96);
  --h-carte: clamp(540px, 76vh, 760px);          /* hauteur du dessin */
  --z-plein-ecran: 1000;                         /* carte vivante en plein écran de repli : au-dessus de tout le reste */
  --larg-panneau-carte: 320px;                   /* panneau de détail d'une bulle (ordinateur) */
  --famille-accueil: #4FD1C5;
  --famille-recherche: #5BA8FF;
  --famille-annonce: #FF8A6B;
  --famille-annuaire: #A99BFF;
  --famille-elevage: #FF9CCB;
  --famille-race: #F7C95C;
  --famille-portees: #FFA94D;
  --famille-guides: #86E08F;
  --famille-outils: #C5E86A;
  --famille-tarifs: #EDE0A6;
  --famille-fondateurs: #D49BFF;
  --famille-inscription: #6FE3B4;
  --famille-connexion: #A9BDD1;
  --famille-gestion: #FFC0A8;
  --famille-admin: #E6EDF2;
  --famille-minisite: #F2759A;
  --famille-autre: #8FA5B0;
  --type-humains: #8BE3F0;
  --type-connectes: #FFD27F;
  --type-moteurs: #A3ADFF;
  --type-ia: #FF9DBE;
  --type-autres: #A2B2B8;
  --source-direct: #C8DDE3;
  --source-retour: #9FD5C9;
  --source-moteur: #7FB8FF;
  --source-social: #FFB070;
  --source-ia: #FF9DBE;
  --source-site: #C3B1FF;
  /* Tableau de bord en direct (super-admin) : thème sombre « salle de contrôle » ; séries validées avec le validateur de palettes sur --tableau-panneau (cinq teintes dans l'ordre, 3:1 au moins, voisines distinctes en vision des couleurs) */
  --tableau-fond: var(--carte-fond-profond);     /* fond de la page en plein écran */
  --tableau-panneau: var(--carte-fond);          /* surface d'un panneau et de ses graphiques */
  --tableau-bord: rgba(211, 230, 235, .14);      /* bord d'un panneau */
  --tableau-repere: rgba(211, 230, 235, .10);    /* lignes de repère des graphiques et piste des barres */
  --tableau-axe: rgba(211, 230, 235, .32);       /* axe et ligne de base */
  --tableau-curseur: rgba(242, 248, 250, .55);   /* repère vertical posé au survol de la courbe */
  --tableau-texte: #F2F8FA;                      /* chiffres et titres, 12:1 sur le panneau */
  --tableau-texte-doux: #C6DBE1;                 /* libellés, 9:1 */
  --tableau-texte-discret: #8FB0B9;              /* graduations et notes, 5,5:1 */
  --serie-1: #3987E5;                            /* série 1 : bleu (une seule série : toujours celle-ci) */
  --serie-2: #D95926;                            /* série 2 : orange */
  --serie-3: #199E70;                            /* série 3 : vert d'eau */
  --serie-4: #C98500;                            /* série 4 : ambre */
  --serie-5: #D55181;                            /* série 5 : rose */
  --etape-1: #CDE2FB;                            /* étapes ordonnées d'un entonnoir : une seule teinte, du clair au foncé, pas de 0,06 de clarté au moins */
  --etape-2: #A5C9F2;
  --etape-3: #7DB0EE;
  --etape-4: #5598E7;
  --etape-5: #2A78D6;
  --tableau-ok: #0CA30C;                         /* états : toujours avec une icône et un libellé, jamais la couleur seule */
  --tableau-attention: #FAB219;
  --tableau-alerte: #EC835A;
  --tableau-aire-haut: .26;                      /* opacité du dégradé sous la courbe, en haut */
  --tableau-aire-bas: .02;                       /* opacité du dégradé sous la courbe, en bas */
  --t-geant: 96px;                               /* chiffre principal d'un écran de contrôle */
  --t-chiffre: 44px;                             /* chiffre d'un panneau */
  --t-chiffre-s: 28px;                           /* chiffre secondaire */
  --h-barre-tableau: 14px;                       /* épaisseur d'une barre de classement */
  --h-pile-tableau: 24px;                        /* épaisseur de la barre empilée */
  --rayon-donnee: 4px;                           /* bout arrondi d'une barre, coins d'un segment */
  --h-courbe-tableau: 180px;                     /* hauteur minimale de la courbe */
  --interligne-tableau: 1.3;                     /* interligne du tableau de bord, plus serré que celui du site */
  --larg-nom-barre: 40%;                         /* colonne du nom dans un classement en barres */
  --larg-valeur-barre: 9ch;                      /* colonne de la valeur dans un classement en barres */
  --duree-tableau: .7s;                          /* apparition des graphiques et croissance des barres */
  --duree-pouls: 2.4s;                           /* pulsation du chiffre principal */
  --larg-chiffre-tableau: 8ch;                   /* colonne d'un chiffre dans l'entonnoir */
  --echelle-tableau: 1;                          /* échelle des tailles du tableau de bord (écran de 1 000 px de haut) */
  --echelle-tableau-large: 1.3;                  /* écran de 1 300 px de haut au moins */
  --echelle-tableau-immense: 1.95;               /* écran de 1 900 px de haut au moins */
  /* Mise en page et mouvements : largeur du contenu, durées */
  --larg-contenu: 1240px;
  --mouvement: .2s ease;
  --mouvement-rapide: .15s ease;
}

@media (max-width: 767px) {
  :root { --h-champ-s: var(--h-tactile); } /* téléphone : boutons « petit », puces et bouton Menu à 44 px au moins */
  :root { --arbre-popin-largeur: 100vw; --arbre-popin-hauteur: 100vh; } /* téléphone : l'arbre agrandi prend tout l'écran */
  :root { --h-carte: 700px; } /* téléphone : carte vivante plus haute que large, panneau de détail dessous */
}



/* Base : réinitialisation, typographie des éléments HTML, accessibilité. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 var(--t-corps)/1.55 var(--texte); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--marque); text-underline-offset: 3px; }
a:hover { color: var(--marque-fonce); }
h1, h2, h3 { font-family: var(--titre); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1, h2 { color: var(--marque); }
h3 { color: var(--encre); font-weight: 700; }
h1 { font-size: var(--t-titre-1); line-height: 1.1; letter-spacing: -.025em; }
h2 { font-size: var(--t-titre-2); }
h3 { font-size: var(--t-carte); }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--marque); outline-offset: 2px; }
.lien-evitement { position: absolute; left: -9999px; }
.lien-evitement:focus { left: 16px; top: 16px; z-index: 100; background: var(--blanc); padding: 8px 14px; border-radius: var(--rayon-pilule); }



/* Mise en page : conteneurs, piles, grilles, en-tête et pied de page. */

/* Mise en page */
.conteneur { width: 100%; max-width: var(--larg-contenu); margin: 0 auto; padding: 0 var(--marge); }
.section { padding-block: clamp(32px, 6vw, 64px); display: flex; flex-direction: column; gap: 20px; }
.pile { display: flex; flex-direction: column; gap: 12px; }
.pile-l { display: flex; flex-direction: column; gap: 24px; }
.ligne { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ligne-entre { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.grille-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.texte-long { max-width: 760px; font-size: var(--t-xs); line-height: 1.7; color: var(--encre-douce); }
.texte-long p + p { margin-top: 12px; }
/* Intertitres saisis dans un texte (h2, h3) : de l'air avant, un écart serré avec ce qu'ils annoncent. */
.texte-long > :is(h2, h3) { margin: var(--e-7) 0 var(--e-3); }
.texte-long > :is(h2, h3):first-child { margin-top: 0; }
.texte-long > :is(h2, h3) + * { margin-top: 0; }

/* En-tête de la place de marché et des mini-sites */
.entete { position: sticky; top: 0; z-index: 20; background: var(--entete-voile); backdrop-filter: blur(10px); border-bottom: var(--trait) solid var(--bord); }
.entete .conteneur { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 68px; }
.marque { display: flex; align-items: center; gap: 10px; min-height: var(--h-tactile); color: var(--marque); text-decoration: none; }
.marque:hover { color: var(--marque-fonce); }
.marque strong { font: 800 var(--t-carte-s) var(--titre); letter-spacing: -.02em; }
.marque .logo { width: 38px; height: 38px; border-radius: var(--rayon-s); background: var(--marque); color: var(--encre-inverse); display: grid; place-items: center; font: 800 var(--t-mini) var(--titre); overflow: hidden; flex: none; }
.marque img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { min-height: var(--h-tactile); display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--rayon-pilule); color: var(--encre-douce); text-decoration: none; font: 600 var(--t-texte-s) var(--titre); }
.nav a:hover { background: var(--surface-forte); color: var(--marque); }
.nav a[aria-current="page"] { background: var(--marque-douce); color: var(--marque); }
.actions-entete .menu-bouton { display: none; }
@media (max-width: 1023px) {
  .entete .nav, .entete .actions-entete .bouton-contour { display: none; }
  .entete .actions-entete .menu-bouton { display: inline-flex; }
  .entete.ouvert .nav { display: flex; flex-direction: column; flex-wrap: nowrap; position: absolute; top: 100%; left: 0; right: 0; background: var(--blanc); border-bottom: var(--trait) solid var(--bord); box-shadow: var(--ombre-flottante); padding: 8px var(--marge) 16px; }
  .entete.ouvert .nav a { min-height: var(--h-champ); font-size: var(--t-xs); border-radius: var(--rayon-s); }
}

/* Fiche annonce / animal */
.fiche { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .fiche { grid-template-columns: 1fr; } }

/* Pied de page */
.pied { margin-top: 48px; background: var(--marque-fonce); color: var(--encre-inverse-douce); padding: 48px 0 28px; font-size: var(--t-discret); }
.pied a { color: var(--encre-inverse-douce); text-decoration: none; }
.pied a:hover { color: var(--encre-inverse); text-decoration: underline; }
.pied :focus-visible { outline-color: var(--encre-inverse); }
.pied .discret { color: var(--encre-inverse-douce); }
.pied .colonnes { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.pied :is(h2, h3) { color: var(--encre-inverse); font-size: var(--t-s); font-weight: 700; margin-bottom: 8px; }
.pied ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }



/* Composants réutilisables : étiquettes, boutons, messages, cartes, formulaires, galerie, tableaux, fiches d'élevage, offres. */

/* Étiquettes et petits textes */
.etiquette { font: 700 var(--t-texte-xs) var(--titre); letter-spacing: .04em; text-transform: uppercase; color: var(--gris); }
.etiquette.rouge { color: var(--accent-fonce); }
.discret { color: var(--gris); font-size: var(--t-discret); }
.mono { font-variant-numeric: tabular-nums; }
.pastille { display: inline-flex; align-items: center; gap: 4px; font: 600 var(--t-texte-xs)/1.2 var(--texte); padding: 4px 10px; border-radius: var(--rayon-pilule); background: var(--blanc); color: var(--encre); box-shadow: var(--ombre-pastille); white-space: nowrap; }
.pastille.verte { background: var(--ok-doux); color: var(--ok); box-shadow: none; }
.pastille.rouge { background: var(--accent); color: var(--encre-inverse); box-shadow: none; }
.pastille.rose { background: var(--accent-doux); color: var(--accent-fonce); box-shadow: none; }
.pastille.grise { background: var(--surface-creuse); color: var(--encre-douce); box-shadow: none; }

/* Boutons */
.bouton, .bouton-contour, .bouton-sombre, .bouton-lien {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h-champ); padding: 0 var(--e-6);
  border: var(--trait-fort) solid transparent; border-radius: var(--rayon-pilule);
  font: 700 var(--t-corps)/1.1 var(--titre); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--mouvement-rapide), color var(--mouvement-rapide), border-color var(--mouvement-rapide);
}
.bouton { background: var(--accent); color: var(--encre-inverse); }
.bouton:hover { background: var(--accent-fonce); color: var(--encre-inverse); }
/* Téléphone : un libellé long passe à la ligne au lieu de sortir de l'écran. */@media (max-width: 560px) { .bouton, .bouton-contour, .bouton-sombre { white-space: normal; text-align: center; max-width: 100%; } }
.bouton-contour { background: var(--blanc); border-color: var(--marque); color: var(--marque); }
.bouton-contour:hover { background: var(--marque); color: var(--encre-inverse); }
.bouton-sombre { background: var(--marque); color: var(--encre-inverse); }
.bouton-sombre:hover { background: var(--marque-fonce); color: var(--encre-inverse); }
.bouton-lien { background: transparent; color: var(--marque); min-height: var(--h-tactile); padding: 0 var(--e-4); }
.bouton-lien:hover { background: var(--surface-forte); color: var(--marque); }
.bouton.petit, .bouton-contour.petit, .bouton-sombre.petit { min-height: var(--h-champ-s); padding: 0 var(--e-5); font-size: var(--t-discret); }
.bouton[disabled], .bouton-contour[disabled], .bouton-sombre[disabled] { background: var(--desactive-fond); border-color: transparent; color: var(--desactive-texte); cursor: not-allowed; }
.bouton.danger { background: var(--blanc); border-color: var(--erreur); color: var(--erreur); }
.bouton.danger:hover { background: var(--erreur); color: var(--encre-inverse); }

/* Messages */
.flash { margin: 12px 0 0; padding: 14px 18px; border-radius: var(--rayon-m); background: var(--ok-doux); color: var(--encre); box-shadow: inset 4px 0 0 var(--ok); }
.flash.erreur { background: var(--erreur-doux); box-shadow: inset 4px 0 0 var(--erreur); }
.encart { padding: 20px 22px; border-radius: var(--rayon-m); background: var(--marque-douce); display: flex; flex-direction: column; gap: 8px; }
.encart.neutre { background: var(--surface-creuse); }
.encart.prudence { background: var(--alerte-doux); color: var(--alerte); }
.encart.sombre { background: var(--marque); color: var(--encre-inverse); }
.encart.sombre :is(h1, h2, h3) { color: var(--encre-inverse); }
.encart.sombre .discret { color: var(--encre-inverse-douce); }
.encart.sombre a:not(.bouton) { color: var(--encre-inverse); }

/* Cartes */
.carte { border: var(--trait) solid var(--bord); border-radius: var(--rayon); background: var(--blanc); box-shadow: var(--ombre-carte); overflow: hidden; display: flex; flex-direction: column; color: var(--encre); text-decoration: none; transition: box-shadow var(--mouvement), transform var(--mouvement); }
a.carte:hover { box-shadow: var(--ombre-survol); transform: translateY(-2px); color: var(--encre); }
.carte .visuel { aspect-ratio: 4 / 3; background: var(--photo-vide); position: relative; display: flex; align-items: flex-end; justify-content: space-between; padding: 8px; }
.carte .visuel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carte .visuel .pastille { position: relative; }
.carte .corps { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 3px; }
.carte .corps strong { font: 700 var(--t-carte-s) var(--titre); }
.carte .en-tete { font: 600 var(--t-texte-xs) var(--texte); color: var(--accent-fonce); }
.cadre { border: var(--trait) solid var(--bord); border-radius: var(--rayon); background: var(--blanc); padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--ombre-carte); }

/* Grilles de cartes : annonces (deux colonnes sur téléphone) et fiches d'élevage. */
.grille-cartes { display: grid; gap: var(--e-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr)); }
.grille-fiches { display: grid; gap: var(--e-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 640px) {
  .grille-cartes { gap: var(--e-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
}

/* Carte d'annonce : photo en portrait, pastilles sur la photo, nom, race, lieu, prix. */
.carte-annonce { position: relative; display: flex; flex-direction: column; background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon); overflow: hidden; color: var(--encre); text-decoration: none; box-shadow: var(--ombre-carte); transition: box-shadow var(--mouvement), transform var(--mouvement); }
.carte-annonce:hover, .carte-annonce:focus-visible { box-shadow: var(--ombre-survol); transform: translateY(-2px); color: var(--encre); }
.carte-annonce .photo { position: relative; margin: 8px 8px 0; aspect-ratio: 4 / 5; border-radius: var(--rayon-m); overflow: hidden; background: var(--photo-vide); display: flex; flex-wrap: wrap; align-content: flex-end; gap: 6px; padding: 8px; }
.carte-annonce .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carte-annonce .photo::after { content: ''; position: absolute; inset: 0; background: var(--voile-photo); pointer-events: none; }
.carte-annonce .photo .pastille { position: relative; z-index: 1; }
.carte-annonce .mise-en-avant { position: absolute; top: 16px; left: 16px; z-index: 2; }
.carte-annonce .legende { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 16px; }
.carte-annonce .legende strong { font: 700 var(--t-xs)/1.25 var(--titre); }
.carte-annonce .legende .mono { font: 400 var(--t-discret)/1.4 var(--texte); color: var(--encre-douce); }
.carte-annonce .legende .prix { font: 800 var(--t-xs) var(--titre); color: var(--marque); margin-top: 4px; }
@media (min-width: 640px) { .carte-annonce .legende strong { font-size: var(--t-carte-s); } }
@media (prefers-reduced-motion: reduce) { .carte-annonce, .carte-elevage, .carte, .offre { transition: none; } .carte-annonce:hover, .carte-elevage:hover, a.carte:hover, .offre:hover { transform: none; } }

/* Formulaires */
.formulaire { display: flex; flex-direction: column; gap: 16px; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ > label, .champ > .libelle { font-weight: 600; font-size: var(--t-discret); color: var(--encre-douce); }
.champ .aide { font-size: var(--t-texte-xs); color: var(--gris); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"], input[type="search"], input[type="url"], select, textarea {
  width: 100%; min-height: var(--h-champ); padding: 10px var(--e-5); border: var(--trait) solid var(--bord-champ); border-radius: var(--rayon-s); background: var(--blanc); color: var(--encre); font: 400 var(--t-corps) var(--texte);
  transition: border-color var(--mouvement-rapide), box-shadow var(--mouvement-rapide);
}
input::placeholder, textarea::placeholder { color: var(--gris); }
input:hover, select:hover, textarea:hover { border-color: var(--encre-douce); }
select { appearance: none; padding-right: 44px; background-image: linear-gradient(45deg, transparent 50%, var(--encre-douce) 50%), linear-gradient(135deg, var(--encre-douce) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--marque); outline: none; box-shadow: var(--ombre-focus); }
input:disabled, select:disabled, textarea:disabled { background: var(--desactive-fond); color: var(--desactive-texte); border-color: var(--bord); cursor: not-allowed; }
.champ-erreur { color: var(--erreur); font-size: var(--t-discret); font-weight: 500; }
.case { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-texte-s); }
.case input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--marque); flex: none; }
.colonnes-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.piege { position: absolute; left: -9999px; }

/* Inscription : champs propres aux élevages ou aux autres professionnels. */
/* Activités cumulables : les champs de l'élevage si l'élevage est coché, ceux des métiers si l'un d'eux l'est. */
.inscription-activite:not(:has(.activite-pro:checked)) .pour-pros { display: none; }
.inscription-activite:not(:has(#metier-breeder:checked)) .pour-elevage { display: none; }
.formulaire:not(:has(#autre-espece:checked)) .champ-autre-espece { display: none; }
.siren-ok { color: var(--ok); font-weight: 600; }
.siren-erreur { color: var(--erreur); font-weight: 600; }

/* Galerie : grande photo, miniatures en carrousel, visionneuse plein écran */
.galerie { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.galerie .principale { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: var(--rayon-l); overflow: hidden; background: var(--photo-vide); cursor: zoom-in; }
.galerie .principale img { width: 100%; height: 100%; object-fit: cover; }
.galerie-compteur { position: absolute; right: 12px; bottom: 12px; background: var(--voile-compteur); color: var(--encre-inverse); font-size: var(--t-mini); padding: 3px 10px; border-radius: var(--rayon-pilule); }
.galerie-bande { display: flex; align-items: center; gap: 8px; }
.galerie-miniatures { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; flex: 1; }
.galerie-miniatures::-webkit-scrollbar { display: none; }
.galerie-miniature { flex: 0 0 calc((100% - 24px) / 4); scroll-snap-align: start; border-radius: var(--rayon-s); overflow: hidden; border: var(--trait-epais) solid transparent; aspect-ratio: 4 / 3; }
.galerie-miniature img { width: 100%; height: 100%; object-fit: cover; }
.galerie-miniature.active { border-color: var(--marque); }
.galerie-fleche { flex: none; width: var(--h-tactile); height: var(--h-tactile); border-radius: var(--rayon-rond); border: var(--trait) solid var(--bord); background: var(--blanc); color: var(--marque); font-size: var(--t-m); line-height: 1; cursor: pointer; box-shadow: var(--ombre-carte); }
.galerie-fleche:hover { background: var(--marque); color: var(--encre-inverse); }
.visionneuse { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: var(--voile-visionneuse); }
.visionneuse[open] { display: grid; place-items: center; }
.visionneuse::backdrop { background: var(--voile-visionneuse, rgba(8, 28, 34, .96)); } /* repli : les anciens navigateurs ne transmettent pas les jetons à ::backdrop */
.visionneuse img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: var(--rayon-s); }
.visionneuse-fermer, .visionneuse-fleche { position: absolute; border: 0; background: var(--voile-bouton-clair); color: var(--encre-inverse); border-radius: var(--rayon-rond); width: 52px; height: 52px; font-size: var(--t-xl); cursor: pointer; }
.visionneuse-fermer { top: 16px; right: 16px; }
.visionneuse-fleche { top: 50%; transform: translateY(-50%); }
.visionneuse-fleche.precedente { left: 16px; }
.visionneuse-fleche.suivante { right: 16px; }
.visionneuse-compteur { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--encre-inverse); font-size: var(--t-texte-xs); }
.mentions { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: var(--t-texte-s); }
.mentions dt { color: var(--gris); }
.mentions dd { margin: 0; font-weight: 500; }
.colonne-contact { position: sticky; top: 84px; }

/* Tableaux */
.tableau-conteneur { overflow-x: auto; border: var(--trait) solid var(--bord); border-radius: var(--rayon); background: var(--blanc); box-shadow: var(--ombre-carte); }
table.tableau { width: 100%; border-collapse: collapse; font-size: var(--t-texte-s); }
.tableau th { text-align: left; font: 600 var(--t-texte-xs) var(--texte); color: var(--encre-douce); background: var(--surface-creuse); padding: 12px 16px; border-bottom: var(--trait) solid var(--bord-fort); white-space: nowrap; }
.tableau td { padding: 12px 16px; border-bottom: var(--trait) solid var(--bord); vertical-align: top; }
.tableau tbody tr:hover td { background: var(--surface-forte); }
.tableau tr:last-child td { border-bottom: 0; }
.tableau td.actions { text-align: right; white-space: nowrap; }
/* Téléphone : chaque ligne devient une petite fiche, chaque valeur précédée du nom de sa colonne (data-label posé par app.js). */
@media (max-width: 640px) {
  .tableau-conteneur { overflow-x: visible; }
  .tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau tr { padding: 10px 14px; border-bottom: var(--trait) solid var(--bord); }
  .tableau tr:last-child { border-bottom: 0; }
  .tableau td, .tableau td.actions { padding: 3px 0; border-bottom: 0; text-align: left; white-space: normal; }
  .tableau td[data-label]:not([data-label=""])::before { content: attr(data-label) " : "; font: 600 var(--t-texte-xs) var(--texte); color: var(--encre-douce); }
  .tableau tbody tr:hover td { background: transparent; }
}
.vide { padding: 28px; text-align: center; color: var(--gris); }

/* Fiche d'élevage ou de professionnel : photo, logo ou monogramme, badges des espèces et des races */
.carte-elevage {
  position: relative; display: flex; flex-direction: column; background: var(--blanc); color: var(--encre); text-decoration: none;
  border: var(--trait) solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-carte);
  transition: box-shadow var(--mouvement), transform var(--mouvement);
}
.carte-elevage:hover, .carte-elevage:focus-visible { box-shadow: var(--ombre-survol); transform: translateY(-2px); color: var(--encre); }
.carte-elevage.en-avant { border-color: var(--accent); }
.carte-elevage-photo { position: relative; margin: 8px 8px 0; aspect-ratio: 16 / 10; border-radius: var(--rayon-m); background: var(--photo-vide); }
.carte-elevage-photo > img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--rayon-m); }
.carte-elevage .mise-en-avant { position: absolute; top: 8px; right: 8px; z-index: 2; }
.carte-elevage-logo { position: absolute; left: 14px; bottom: -26px; width: 60px; height: 60px; border-radius: var(--rayon-m); overflow: hidden; background: var(--blanc); border: 3px solid var(--blanc); box-shadow: var(--ombre-logo); display: grid; place-items: center; }
.carte-elevage-logo img { width: 100%; height: 100%; object-fit: cover; }
.carte-elevage-logo.monogramme, .monogramme { background: var(--marque); color: var(--encre-inverse); font: 800 var(--t-carte) var(--titre); letter-spacing: .02em; }
.carte-elevage-corps { display: flex; flex-direction: column; gap: 6px; padding: 38px 16px 18px; }
.carte-elevage-corps strong { font: 700 var(--t-carte)/1.2 var(--titre); }
.carte-elevage-corps .discret { font-size: var(--t-discret); }
.carte-elevage-texte { font-size: var(--t-discret); color: var(--encre-douce); }
.carte-elevage-pied { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: var(--t-texte-xs); }
/* Téléphone : dans les listes (annuaire), la carte d'élevage passe en ligne, photo carrée à gauche, pour voir plusieurs fiches par écran. */
@media (max-width: 560px) {
  .grille-fiches:not(.defile-mobile) .carte-elevage { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: start; }
  .grille-fiches:not(.defile-mobile) .carte-elevage-photo { margin: var(--e-3); aspect-ratio: 1; }
  .grille-fiches:not(.defile-mobile) .carte-elevage-logo { width: 36px; height: 36px; left: 4px; bottom: 4px; border-width: 2px; font-size: var(--t-texte-xs); }
  .grille-fiches:not(.defile-mobile) .carte-elevage-corps { padding: var(--e-3) 12px 12px 0; gap: 4px; }
  .grille-fiches:not(.defile-mobile) .carte-elevage-corps strong { font-size: var(--t-texte-s); }
  .grille-fiches:not(.defile-mobile) .carte-elevage .mise-en-avant { top: 4px; right: 4px; }
}
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-espece, .badge-race { display: inline-flex; align-items: center; font: 500 var(--t-texte-xs) var(--texte); padding: 3px 10px; border-radius: var(--rayon-pilule); white-space: nowrap; }
.badge-espece { font-weight: 600; background: var(--espece-chien-fond); color: var(--espece-chien-encre); }
.badge-espece.espece-chat { background: var(--espece-chat-fond); color: var(--espece-chat-encre); }
.badge-race { background: var(--surface-creuse); color: var(--encre-douce); }
.badge-race.plus { background: transparent; border: var(--trait) dashed var(--gris-clair); color: var(--gris); }

/* Offres des partenaires */
.offres { display: flex; flex-direction: column; gap: 14px; }
.offres h2 { margin: 0; }
.offres-grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.offres.compactes h2 { font-size: var(--t-m); }
.offres.compactes .offres-grille { grid-template-columns: 1fr; gap: 10px; }
.offre { display: flex; flex-direction: column; background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-carte); overflow: hidden; text-decoration: none; color: var(--encre); transition: box-shadow var(--mouvement), transform var(--mouvement); }
.offre:hover, .offre:focus-visible { box-shadow: var(--ombre-survol); transform: translateY(-2px); color: var(--encre); }
.offre-banniere { width: 100%; height: auto; aspect-ratio: 8 / 3; object-fit: cover; display: block; }
.offre-corps { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.offre-tete { display: flex; align-items: center; gap: 12px; }
.offre-logo { width: 48px; height: 48px; border-radius: var(--rayon-s); object-fit: contain; background: var(--blanc); border: var(--trait) solid var(--bord); flex: none; display: grid; place-items: center; font-size: var(--t-xs); }
.offre-logo.monogramme { background: var(--marque); color: var(--encre-inverse); }
.offre-societe { font-size: var(--t-texte-s); }
.offre-titre { font: 700 var(--t-carte-s)/1.3 var(--titre); }
.offre-texte { font-size: var(--t-discret); color: var(--encre-douce); }
.offre-bouton { margin-top: auto; font: 700 var(--t-discret) var(--titre); color: var(--accent-fonce); }
.offres.compactes .offre-titre { font-size: var(--t-corps); }
.offre-mention { font-size: var(--t-mini); margin: 0; }

/* Éléments que le script révèle ou masque (filtres, boutons d'ajout) : l'attribut hidden l'emporte sur l'affichage de leur classe. */
:is(.champ, .case, .cadre, .bouton, .bouton-contour)[hidden] { display: none; }

/* Badges de confiance (fiche annonce, fiche élevage) : pastille avec infobulle au survol et au clavier. */
.badges-confiance { display: flex; flex-wrap: wrap; gap: var(--e-3); margin: 0; padding: 0; list-style: none; }
.badge-confiance { position: relative; }
.badge-confiance .pastille { cursor: help; }
.badge-confiance .pastille:focus-visible { outline: var(--trait-epais) solid var(--marque); outline-offset: var(--e-1); }
.badge-confiance .infobulle { position: absolute; left: 0; top: calc(100% + var(--e-2)); z-index: 5; width: max-content; max-width: min(var(--larg-infobulle), 80vw); padding: var(--e-3) var(--e-4); border-radius: var(--rayon-s); background: var(--marque-fonce); color: var(--encre-inverse); font: 400 var(--t-texte-xs)/1.45 var(--texte); box-shadow: var(--ombre-flottante); opacity: 0; visibility: hidden; transition: opacity var(--mouvement-rapide); }
.badge-confiance:hover .infobulle, .badge-confiance:focus-within .infobulle { opacity: 1; visibility: visible; }

/* Carte d'annonce : disponibilité et petits d'une portée sous le titre. */
.carte-annonce .legende .dispo { font: 600 var(--t-texte-xs)/1.4 var(--texte); color: var(--ok); }
.carte-annonce .legende .dispo.attente { color: var(--encre-douce); }
.carte-annonce .legende .prix.sur-demande { font: 600 var(--t-discret) var(--texte); color: var(--encre-douce); }

/* Passeport de confiance (fiche annonce, fiche élevage) : vérifié (coche verte), déclaré (point gris), mentions obligatoires. */
.passeport { display: flex; flex-direction: column; gap: var(--e-6); }
.passeport-partie { display: flex; flex-direction: column; gap: var(--e-3); }
.passeport-partie + .passeport-partie { border-top: var(--trait) solid var(--bord); padding-top: var(--e-5); }
.passeport-liste { display: flex; flex-direction: column; gap: var(--e-3); margin: 0; padding: 0; list-style: none; font-size: var(--t-texte-s); }
.passeport-liste li { display: flex; flex-direction: column; gap: var(--e-1); position: relative; padding-left: var(--e-6); }
.passeport-liste li span { color: var(--encre-douce); }
.passeport-liste li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.passeport-liste.verifie li::before { content: "\2713"; color: var(--ok); }
.passeport-liste.declare li::before { content: "\2022"; color: var(--gris); }

/* Bloc « Les parents » : une carte par parent, photo, identité, tests de santé publiés. */
.parents { display: grid; gap: var(--e-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.parent { display: flex; flex-direction: column; gap: var(--e-3); }
.parent-entete { display: flex; gap: var(--e-4); align-items: center; }
.parent-photo { flex: none; width: var(--photo-parent); height: var(--photo-parent); border-radius: var(--rayon-m); overflow: hidden; background: var(--photo-vide); }
.parent-photo img { width: 100%; height: 100%; object-fit: cover; }
.parent .mentions { margin: 0; }
.resultats-sante { display: flex; flex-direction: column; gap: var(--e-2); margin: 0; padding: 0; list-style: none; font-size: var(--t-texte-s); }
.resultats-sante li { display: flex; justify-content: space-between; gap: var(--e-3); border-top: var(--trait) solid var(--bord); padding-top: var(--e-2); }

/* Pedigree : statut déclaré ou examiné, numéros, estimation de consanguinité. */
.pedigree { display: flex; flex-direction: column; gap: var(--e-4); }
.pedigree-statut { margin: 0; }
.pedigree-numeros { margin: 0; }
.pedigree-consanguinite { display: flex; flex-direction: column; gap: var(--e-2); border-top: var(--trait) solid var(--bord); padding-top: var(--e-4); }
.pedigree-consanguinite p { margin: 0; }

/* Arbre généalogique (commun/_arbre) : listes imbriquées, lues de gauche à droite sur ordinateur (animal, parents,
   grands-parents, arrière-grands-parents), en liste indentée dont les branches se replient sur téléphone.
   Cartes colorées selon le sexe (bleu lagon pour les pères, rose pour les mères), pastille ronde avec une patte quand il
   n'y a pas de photo, traits de liaison arrondis, apparition génération par génération (coupée si l'on demande moins
   d'animations). */
.arbre-defile { overflow-x: auto; padding: var(--e-3) var(--e-3) var(--e-4); }
/* Ordinateur : app.js réduit l'arbre à la largeur du cadre (échelle et hauteur calculées), sans défilement. */
.arbre-defile[data-ajuste] { overflow: hidden; height: var(--arbre-hauteur); }
.arbre-defile[data-ajuste] .arbre { transform: scale(var(--arbre-echelle)); transform-origin: 0 0; }
.arbre-barre { display: flex; align-items: center; justify-content: space-between; gap: var(--e-4); }
.arbre-progression { display: flex; align-items: center; flex-wrap: wrap; gap: var(--e-3); margin: 0; font-size: var(--t-mini); font-weight: 600; color: var(--gris); }
.arbre-pattes { display: inline-flex; flex-wrap: wrap; gap: var(--e-1); }
.patte { display: inline-block; width: var(--patte-progression); height: var(--patte-progression); background: var(--bord-fort); -webkit-mask: var(--icone-patte) center / contain no-repeat; mask: var(--icone-patte) center / contain no-repeat; }
.patte.pleine { background: var(--marque); animation: arbre-pop var(--mouvement-arbre) backwards; }
.arbre-agrandir { display: none; }
.arbre-agrandir:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; width: var(--h-tactile); height: var(--h-tactile); padding: 0; border: var(--trait) solid var(--bord); border-radius: var(--rayon-rond); background: var(--blanc); color: var(--marque); cursor: pointer; box-shadow: var(--ombre-carte); transition: background var(--mouvement-rapide), color var(--mouvement-rapide), transform var(--mouvement-rapide); }
.arbre-agrandir:hover, .arbre-agrandir:focus-visible { background: var(--marque); color: var(--encre-inverse); transform: scale(1.08); }
.arbre-agrandir svg, .arbre-popin-commandes svg { width: var(--icone-arbre); height: var(--icone-arbre); }
.arbre, .arbre-liste { list-style: none; margin: 0; padding: 0; }
.arbre { width: max-content; min-width: 100%; }
.arbre-noeud { position: relative; display: flex; align-items: center; }
.arbre-liste { display: flex; flex-direction: column; justify-content: center; gap: var(--e-4); margin-left: var(--arbre-liaison); padding-left: var(--arbre-liaison); }
.arbre-liste[hidden] { display: none; }
/* Liaisons : un trait part de l'ancêtre, rejoint le trait vertical qui relie ses deux parents, et se courbe vers chacun
   (bleu vers le père, rose vers la mère). */
.arbre-liste > .arbre-noeud::before { content: ""; position: absolute; left: calc(-1 * var(--arbre-liaison)); width: var(--arbre-liaison); border: 0 solid var(--sexe-male-trait); }
.arbre-liste > .arbre-noeud:first-child::before { top: 50%; height: calc(50% + var(--e-4)); border-top-width: var(--trait-epais); border-left-width: var(--trait-epais); border-top-left-radius: var(--rayon-s); }
.arbre-liste > .arbre-noeud:last-child::before { top: calc(-1 * var(--e-4)); height: calc(50% + var(--e-4)); border-color: var(--sexe-femelle-trait); border-bottom-width: var(--trait-epais); border-left-width: var(--trait-epais); border-bottom-left-radius: var(--rayon-s); }
.arbre-noeud.a-parents > .noeud::after { content: ""; position: absolute; left: 100%; top: 50%; width: var(--arbre-liaison); border-top: var(--trait-epais) solid var(--bord-fort); }

/* Carte d'un animal : liseré de la couleur du sexe, photo ronde cerclée ou patte, nom, détails, puces. */
.noeud { --sexe-couleur: var(--marque); --sexe-fond: var(--marque-douce); position: relative; flex: none; display: flex; flex-direction: column; gap: var(--e-3); width: var(--larg-noeud-arbre); padding: var(--e-4) var(--e-4) var(--e-4) var(--e-5); background: linear-gradient(var(--sexe-couleur), var(--sexe-couleur)) left / var(--e-2) 100% no-repeat, var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon-m); box-shadow: var(--ombre-carte); font-size: var(--t-discret); line-height: 1.35; color: var(--encre-douce); transition: transform var(--mouvement), box-shadow var(--mouvement); }
.noeud:hover { transform: translateY(calc(-1 * var(--e-1))); box-shadow: var(--ombre-survol); }
.noeud.male { --sexe-couleur: var(--sexe-male); --sexe-fond: var(--sexe-male-doux); }
.noeud.femelle { --sexe-couleur: var(--sexe-femelle); --sexe-fond: var(--sexe-femelle-doux); }
.noeud.sujet { --photo-noeud: var(--photo-sujet-arbre); background: linear-gradient(var(--sexe-couleur), var(--sexe-couleur)) left / var(--e-2) 100% no-repeat, linear-gradient(165deg, var(--marque-douce), var(--blanc)); border-color: var(--bord-fort); box-shadow: var(--ombre-survol); }
.noeud.inconnu { padding-left: var(--e-4); background: var(--surface-creuse); border-style: dashed; box-shadow: none; }
.noeud.inconnu:hover { transform: none; }
.noeud.brouillon { background: var(--surface-creuse); }
.noeud-role { display: inline-flex; align-items: center; gap: var(--e-2); font: 700 var(--t-mini) var(--titre); letter-spacing: .04em; text-transform: uppercase; color: var(--sexe-couleur); }
.noeud-role::before { content: ""; flex: none; width: 1.2em; height: 1.2em; background: currentColor; -webkit-mask: var(--icone-patte) center / contain no-repeat; mask: var(--icone-patte) center / contain no-repeat; }
.noeud.male .noeud-role::before { -webkit-mask-image: var(--icone-male); mask-image: var(--icone-male); }
.noeud.femelle .noeud-role::before { -webkit-mask-image: var(--icone-femelle); mask-image: var(--icone-femelle); }
.noeud.inconnu .noeud-role { color: var(--gris); }
.noeud-identite { display: flex; align-items: center; gap: var(--e-4); min-width: 0; }
.noeud-texte { display: flex; flex-direction: column; gap: var(--e-1); min-width: 0; }
.noeud-nom { font: 700 var(--t-texte-s)/1.25 var(--titre); color: var(--encre); overflow-wrap: anywhere; }
.noeud.sujet .noeud-nom { font-size: var(--t-corps); }
.noeud-nom a { color: inherit; }
.noeud-nom a:hover, .noeud-nom a:focus-visible { color: var(--sexe-couleur); }
.noeud-photo, .noeud-avatar { flex: none; width: var(--photo-noeud); height: var(--photo-noeud); margin: var(--e-1); border-radius: var(--rayon-rond); box-shadow: 0 0 0 var(--e-1) var(--blanc), 0 0 0 calc(var(--e-1) + var(--trait-epais)) var(--sexe-couleur); }
.noeud-photo { object-fit: cover; background: var(--photo-vide); transition: transform var(--mouvement); }
.noeud-avatar { display: grid; place-items: center; background: var(--sexe-fond); }
.noeud-avatar::before { content: ""; width: 54%; height: 54%; background: var(--sexe-couleur); -webkit-mask: var(--icone-patte) center / contain no-repeat; mask: var(--icone-patte) center / contain no-repeat; }
.noeud-photo-lien { display: block; flex: none; border-radius: var(--rayon-rond); }
.noeud-photo-lien:hover .noeud-photo, .noeud-photo-lien:focus-visible .noeud-photo { transform: scale(1.07); }
.noeud:hover .noeud-photo, .noeud:hover .noeud-avatar { animation: arbre-secousse var(--mouvement-arbre); }
.noeud-numero { align-self: flex-start; padding: var(--e-1) var(--e-3); border-radius: var(--rayon-xs); background: var(--surface-creuse); color: var(--encre); font-size: var(--t-mini); overflow-wrap: anywhere; }
.noeud-numero .discret { color: var(--gris); }
.noeud-titres { display: inline-flex; align-items: center; gap: var(--e-2); align-self: flex-start; padding: var(--e-1) var(--e-3); border-radius: var(--rayon-s); background: var(--medaille-fond); color: var(--medaille-encre); font-size: var(--t-mini); font-weight: 700; }
.noeud-titres::before { content: ""; flex: none; width: 1.3em; height: 1.3em; background: currentColor; -webkit-mask: var(--icone-medaille) center / contain no-repeat; mask: var(--icone-medaille) center / contain no-repeat; }
.noeud-vide, .noeud-aide { color: var(--gris); }
.noeud-vide { display: inline-flex; align-items: center; gap: var(--e-3); }
.noeud-vide::before { content: ""; flex: none; width: 1.4em; height: 1.4em; background: var(--gris-clair); opacity: .55; -webkit-mask: var(--icone-patte) center / contain no-repeat; mask: var(--icone-patte) center / contain no-repeat; }
.noeud-ajout { display: inline-flex; align-items: center; gap: var(--e-2); align-self: flex-start; padding: var(--e-2) var(--e-4); border-radius: var(--rayon-pilule); background: var(--marque-douce); color: var(--marque); font-weight: 600; text-decoration: none; transition: background var(--mouvement-rapide), color var(--mouvement-rapide); }
.noeud-ajout::before { content: ""; flex: none; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--icone-plus) center / contain no-repeat; mask: var(--icone-plus) center / contain no-repeat; }
.noeud-ajout:hover, .noeud-ajout:focus-visible { background: var(--marque); color: var(--encre-inverse); }
.noeud .resultats-sante { font-size: var(--t-texte-xs); }
.noeud.modifiable:hover { box-shadow: var(--ombre-survol); }
.arbre-bascule { display: none; align-self: flex-start; min-height: var(--h-tactile); padding: 0; border: 0; background: none; color: var(--marque); font: 600 var(--t-discret) var(--texte); text-decoration: underline; cursor: pointer; }

/* Apparition génération par génération, petit saut des pattes de la progression, secousse de la photo au survol. */
@keyframes arbre-apparition { from { opacity: 0; transform: translateX(calc(-1 * var(--e-5))) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes arbre-secousse { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-9deg) scale(1.07); } 65% { transform: rotate(6deg) scale(1.07); } }
@keyframes arbre-pop { from { transform: scale(0); } 70% { transform: scale(1.3); } to { transform: scale(1); } }
.arbre .noeud { animation: arbre-apparition var(--mouvement-arbre) backwards; }
.arbre-noeud.generation-1 > .noeud { animation-delay: var(--delai-generation); }
.arbre-noeud.generation-2 > .noeud { animation-delay: calc(2 * var(--delai-generation)); }
.arbre-noeud.generation-3 > .noeud { animation-delay: calc(3 * var(--delai-generation)); }
@media (prefers-reduced-motion: reduce) {
  .arbre .noeud, .noeud:hover .noeud-photo, .noeud:hover .noeud-avatar, .patte.pleine { animation: none; }
  .noeud, .noeud-photo, .arbre-agrandir { transition: none; }
}

@media (max-width: 767px) {
  .arbre:not(.arbre-plan) { width: auto; }
  .arbre:not(.arbre-plan) .arbre-noeud { display: block; }
  .arbre:not(.arbre-plan) .arbre-liste { margin-left: var(--e-3); padding-left: var(--e-4); margin-top: var(--e-3); border-left: var(--trait-epais) solid var(--bord-fort); }
  .arbre:not(.arbre-plan) .arbre-noeud.a-parents > .noeud::after, .arbre:not(.arbre-plan) .arbre-liste > .arbre-noeud::before { display: none; }
  .arbre:not(.arbre-plan) .noeud { width: auto; }
  .arbre-bascule:not([hidden]) { display: inline-flex; align-items: center; }
}

/* Arbre agrandi (fenêtre ouverte par le bouton « Agrandir », app.js) : l'arbre est copié dans un plan que l'on déplace
   et que l'on zoome comme une carte ; la disposition de gauche à droite est gardée aussi sur téléphone (.arbre-plan). */
.arbre-popin { width: var(--arbre-popin-largeur); height: var(--arbre-popin-hauteur); max-width: 100vw; max-height: 100vh; margin: auto; padding: 0; border: 0; border-radius: var(--rayon-l); background: var(--blanc); color: var(--encre); box-shadow: var(--ombre-flottante); overflow: hidden; }
.arbre-popin[open] { display: flex; flex-direction: column; }
.arbre-popin::backdrop { background: var(--voile-fenetre, rgba(11, 47, 56, .55)); }
.arbre-popin-entete { display: flex; align-items: center; justify-content: space-between; gap: var(--e-4); padding: var(--e-4) var(--e-5); border-bottom: var(--trait) solid var(--bord); }
.arbre-popin-titre { display: inline-flex; align-items: center; gap: var(--e-3); font: 700 var(--t-texte-s)/1.25 var(--titre); color: var(--encre); overflow-wrap: anywhere; }
.arbre-popin-titre::before { content: ""; flex: none; width: 1.4em; height: 1.4em; background: var(--marque); -webkit-mask: var(--icone-patte) center / contain no-repeat; mask: var(--icone-patte) center / contain no-repeat; }
.arbre-popin-zone { position: relative; flex: 1; min-height: 0; background-color: var(--surface-creuse); background-image: radial-gradient(circle, var(--bord-fort) var(--trait-fort), transparent var(--trait-fort)); background-size: var(--e-7) var(--e-7); }
.arbre-popin-fenetre { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.arbre-popin-fenetre:focus-visible { outline: var(--trait-epais) solid var(--marque); outline-offset: calc(-1 * var(--trait-epais)); }
.arbre-popin-fenetre.deplace { cursor: grabbing; }
.arbre-popin-plan { position: absolute; top: 0; left: 0; width: max-content; padding: var(--e-6); transform-origin: 0 0; }
.arbre-plan { width: max-content; min-width: 0; }
.arbre-popin-commandes { position: absolute; right: var(--e-5); bottom: var(--e-5); display: flex; flex-direction: column; border: var(--trait) solid var(--bord); border-radius: var(--rayon-l); background: var(--blanc); box-shadow: var(--ombre-flottante); overflow: hidden; }
.arbre-popin-commandes button, .arbre-popin-fermer { display: inline-flex; align-items: center; justify-content: center; width: var(--h-tactile); height: var(--h-tactile); padding: 0; border: 0; background: var(--blanc); color: var(--marque); font: 600 var(--t-xl)/1 var(--texte); cursor: pointer; }
.arbre-popin-commandes button + button { border-top: var(--trait) solid var(--bord); }
.arbre-popin-commandes button:hover, .arbre-popin-commandes button:focus-visible, .arbre-popin-fermer:hover, .arbre-popin-fermer:focus-visible { background: var(--marque); color: var(--encre-inverse); }
.arbre-popin-fermer { border-radius: var(--rayon-rond); }
.arbre-popin-aide { position: absolute; left: var(--e-5); bottom: var(--e-5); max-width: calc(100% - var(--h-tactile) - 3 * var(--e-5)); margin: 0; padding: var(--e-2) var(--e-4); border-radius: var(--rayon-pilule); background: var(--blanc); color: var(--gris); font-size: var(--t-mini); box-shadow: var(--ombre-carte); pointer-events: none; }

/* Descendants d'un reproducteur : liste imbriquée des petits d'une portée et de leurs propres petits. */
.descendants { display: flex; flex-direction: column; gap: var(--e-3); margin: 0; padding: 0; list-style: none; }
.descendants .descendants { margin-top: var(--e-3); padding-left: var(--e-5); border-left: var(--trait-fort) solid var(--bord-fort); }
.descendants li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--e-2) var(--e-3); }
.descendants li > .descendants { flex-basis: 100%; }
.descendant-nom { font: 700 var(--t-texte-s) var(--titre); }

/* « Les autres petits de la portée » : rangée défilante de vignettes avec statut. */
.petits-portee { display: flex; gap: var(--e-4); overflow-x: auto; padding: var(--e-1) var(--e-1) var(--e-3); margin: 0; list-style: none; scroll-snap-type: x mandatory; }
.petits-portee li { flex: none; width: var(--larg-petit); scroll-snap-align: start; }
.petit { display: flex; flex-direction: column; gap: var(--e-2); color: var(--encre); text-decoration: none; }
.petit .photo { position: relative; aspect-ratio: 1; border-radius: var(--rayon-m); overflow: hidden; background: var(--photo-vide); }
.petit .photo img { width: 100%; height: 100%; object-fit: cover; }
.petit .photo .pastille { position: absolute; left: var(--e-2); bottom: var(--e-2); }
.petit strong { font: 700 var(--t-texte-s)/1.25 var(--titre); }
a.petit:hover strong, a.petit:focus-visible strong { color: var(--marque); }
@media (prefers-reduced-motion: reduce) { .badge-confiance .infobulle { transition: none; } }

/* Bouton « Partager » : partage du téléphone (app.js), sinon menu de liens simples (aucun script de réseau social). */
.partage { position: relative; display: inline-flex; }
.partage-menu > summary { list-style: none; cursor: pointer; }
.partage-menu > summary::-webkit-details-marker { display: none; }
.partage-liens { position: absolute; z-index: 20; top: calc(100% + var(--e-2)); left: 0; width: var(--larg-infobulle); display: flex; flex-direction: column; gap: var(--e-2); padding: var(--e-4); background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon-m); box-shadow: var(--ombre-flottante); }
.partage-liens a { color: var(--marque); font-weight: 600; text-decoration: none; padding: var(--e-1) 0; }
.partage-liens a:hover, .partage-liens a:focus-visible { text-decoration: underline; }
.partage-copie { display: flex; flex-direction: column; gap: var(--e-1); font-size: var(--t-discret); color: var(--gris); }
.partage-copie input { width: 100%; min-height: var(--h-champ-s); padding: 0 var(--e-3); border: var(--trait) solid var(--bord-champ); border-radius: var(--rayon-s); font: inherit; color: var(--encre); background: var(--fond); }
.partage-encart textarea { width: 100%; resize: vertical; }
.partage-encart .partage { align-self: flex-start; }

/* Double authentification : QR code (dessiné par Noyau\CodeQr), clé à saisir à la main, codes de secours. */
.code-qr { display: block; width: var(--larg-code-qr); max-width: 100%; height: auto; background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon-s); }
.cle-secrete { margin: 0; padding: var(--e-3) var(--e-4); border: var(--trait-epais) dashed var(--marque); border-radius: var(--rayon-s); background: var(--surface-creuse); font: 600 var(--t-texte-s)/1.5 var(--code); color: var(--encre); word-break: break-all; user-select: all; }
.codes-secours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-2) var(--e-4); margin: 0; padding: var(--e-4); list-style: none; background: var(--surface-creuse); border-radius: var(--rayon-s); font: 600 var(--t-texte-s)/1.5 var(--code); color: var(--encre); user-select: all; }
.adresse-otpauth { font: 400 var(--t-discret)/1.5 var(--code); color: var(--gris); word-break: break-all; }



/* Gabarits de pages : accueil, recherche, race, annuaires. */

/* Accueil : bandeau pétrole arrondi, recherche dans un bloc blanc */
.bandeau { width: calc(100% - 2 * var(--marge)); max-width: calc(var(--larg-contenu) - 2 * var(--marge)); margin: var(--e-5) auto 0; background: var(--marque); border-radius: var(--rayon-l); padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px); }
.bandeau .conteneur { display: flex; flex-direction: column; gap: 18px; padding: 0; }
.bandeau h1 { color: var(--encre-inverse); }
.bandeau .etiquette { align-self: flex-start; padding: 4px 12px; border-radius: var(--rayon-m); background: var(--voile-puce-claire); color: var(--encre-inverse); }
.bandeau .texte-long { color: var(--encre-inverse-douce); }
.recherche-rapide { display: grid; gap: 10px; grid-template-columns: auto 1fr 1fr auto; align-items: center; background: var(--blanc); border-radius: var(--rayon); padding: 10px; max-width: 940px; box-shadow: var(--ombre-flottante); }
@media (max-width: 760px) { .recherche-rapide { grid-template-columns: 1fr; } }
.puces { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.puce { min-height: var(--h-champ-s); display: inline-flex; align-items: center; padding: 0 var(--e-5); border-radius: var(--rayon-pilule); border: var(--trait) solid var(--bord); background: var(--blanc); color: var(--encre-douce); font: 600 var(--t-discret) var(--titre); text-decoration: none; cursor: pointer; }
.puce:hover { border-color: var(--marque); color: var(--marque); }
.puce[aria-pressed="true"], .puce.active { background: var(--marque); border-color: var(--marque); color: var(--encre-inverse); }
input.puce-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
input.puce-radio:checked + .puce { background: var(--marque); border-color: var(--marque); color: var(--encre-inverse); }
input.puce-radio:focus-visible + .puce { outline: 3px solid var(--marque); outline-offset: 2px; }

/* Recherche */
.recherche { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .recherche { grid-template-columns: 1fr; } }
.filtres { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-carte); }
@media (max-width: 900px) { .filtres { position: static; } }
.carte-geo { height: 420px; border: var(--trait) solid var(--bord); border-radius: var(--rayon); overflow: hidden; background: var(--surface-forte); }
.pagination { display: flex; justify-content: center; padding: 16px 0; }

/* Page race : la race d'abord */
.race-entete { background: var(--marque-douce); padding: clamp(28px, 5vw, 56px) 0; }
.race-entete-grille { display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; }
.race-entete.avec-photo .race-entete-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
@media (max-width: 860px) { .race-entete.avec-photo .race-entete-grille { grid-template-columns: 1fr; } }
.race-entete h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; margin: 0; }
.race-chapo { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; max-width: 60ch; margin: 0; color: var(--encre-douce); }
.race-photo { margin: 0; background: var(--blanc); padding: 8px; border-radius: var(--rayon-l); box-shadow: var(--ombre-flottante); }
.race-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon-m); }
.race-photo figcaption { font: 500 var(--t-texte-xs) var(--texte); color: var(--gris); padding: 8px 8px 4px; }
.race-reperes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 0; margin: -26px 0 0; position: relative; background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-survol); overflow: hidden; }
.race-reperes > div { padding: 14px 18px; border-right: var(--trait) solid var(--bord); border-bottom: var(--trait) solid var(--bord); }
.race-reperes dt { font: 600 var(--t-texte-xs) var(--texte); color: var(--gris); }
.race-reperes dd { margin: 4px 0 0; font: 700 var(--t-corps)/1.35 var(--titre); }
.race-corps { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .race-corps { grid-template-columns: 1fr; } }
.race-texte { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
.race-texte .texte-long { max-width: 70ch; }
.race-texte .texte-long ul { padding-left: 1.2em; }
.race-texte .texte-long li { margin: 4px 0; }
.race-section { display: grid; gap: 14px 28px; scroll-margin-top: 90px; }
.race-section h2 { font-size: clamp(26px, 3vw, 32px); margin: 0; grid-column: 1 / -1; }
.race-section.avec-image.image-right { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
.race-section.avec-image.image-right .race-section-image { order: 2; }
.race-section.avec-image.image-left { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.race-section.avec-image.image-full .race-section-image img { aspect-ratio: 16 / 7; }
@media (max-width: 700px) { .race-section.avec-image.image-right, .race-section.avec-image.image-left { grid-template-columns: 1fr; } .race-section.avec-image.image-right .race-section-image { order: 0; } }
.race-section-image { margin: 0; align-self: start; }
.race-section-image img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon-m); box-shadow: var(--ombre-carte); }
.race-section-image figcaption { font: 500 var(--t-mini) var(--texte); color: var(--gris); padding-top: 8px; }
.race-colonne { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 960px) { .race-colonne { position: static; } }
.race-sommaire ol { margin: 8px 0 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.race-complement { background: var(--surface-creuse); }
.race-sous-titre { font: 700 var(--t-cadre) var(--titre); margin: 28px 0 14px; }
.races-voisines { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.race-voisine { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--encre); font-weight: 600; }
.race-voisine img, .race-voisine .monogramme { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon-m); display: grid; place-items: center; }
.apercu-section { border-top: var(--trait-epais) dashed var(--bord-fort); padding-top: 10px; font-size: var(--t-texte-s); }

/* Annuaires : navigation à facettes, carte, fiches */
.annuaire { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .annuaire { grid-template-columns: 1fr; } }
.facettes { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-carte); max-height: calc(100vh - 100px); overflow-y: auto; }
@media (max-width: 900px) { .facettes { position: static; max-height: none; } }
.facette-recherche { display: flex; gap: 6px; }
.facette-recherche input { flex: 1; min-width: 0; }
.facette { display: flex; flex-direction: column; gap: 6px; border-top: var(--trait) solid var(--bord); padding-top: 12px; }
.facette:first-of-type { border-top: 0; padding-top: 0; }
.facette-titre { font: 700 var(--t-texte-xs) var(--titre); letter-spacing: .04em; text-transform: uppercase; color: var(--gris); cursor: default; }
details.facette > summary.facette-titre { cursor: pointer; }
.facette ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.facette li a, .facette-case { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: var(--rayon-s); color: var(--encre); text-decoration: none; font-size: var(--t-texte-s); }
.facette li a:hover, .facette-case:hover { background: var(--surface-forte); color: var(--encre); }
.facette li a.choisi, .facette-case.choisi { background: var(--marque); color: var(--encre-inverse); }
.facette li a.choisi .compte, .facette-case.choisi .compte { color: var(--encre-inverse); }
.facette .compte { font: 500 var(--t-mini) var(--texte); font-variant-numeric: tabular-nums; color: var(--gris); }
.facette-longue { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; }
.facette-titre .compte { margin-left: var(--e-2); }
.facette-filtre { min-height: 38px; padding: var(--e-2) var(--e-4); font-size: var(--t-texte-s); }
.facette-libelle { display: inline-flex; align-items: center; gap: var(--e-3); min-width: 0; }
.facette-code { flex: none; min-width: 34px; padding: 1px var(--e-2); border-radius: var(--rayon-xs); background: var(--surface-creuse); font: 600 var(--t-mini) var(--texte); text-align: center; color: var(--encre); }
.facette li a.choisi .facette-code { background: var(--blanc); }
.facette-vide { margin: 0; padding: var(--e-2) var(--e-3); font-size: var(--t-texte-s); color: var(--gris); }
.facette-case { justify-content: flex-start; }
.facette-case .compte { margin-left: auto; }
.case-visuelle { width: 16px; height: 16px; border: var(--trait-fort) solid currentColor; border-radius: var(--rayon-xs); flex: none; }
.facette-case.choisi .case-visuelle { background: var(--blanc); box-shadow: inset 0 0 0 3px var(--marque); }
.carte-annuaire { height: 380px; }
.carte-annuaire[hidden] { display: none; }

/* Super-admin : charte graphique (/admin/charte) */
.charte-jetons { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e-4) var(--e-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.charte-jeton { display: flex; flex-direction: column; gap: var(--e-1); min-width: 0; }
.charte-nom { font-size: var(--t-texte-xs); font-weight: 600; color: var(--encre); }
.charte-valeur { font-size: var(--t-mini); color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.charte-note { font-size: var(--t-mini); line-height: 1.4; color: var(--gris); }
.charte-apercu { display: block; margin-bottom: var(--e-2); }
.charte-couleur .charte-apercu { height: 56px; border-radius: var(--rayon-s); border: var(--trait) solid var(--bord); background-color: var(--blanc); }
.charte-ombre .charte-apercu { height: 56px; margin: var(--e-3) var(--e-3) var(--e-4); border-radius: var(--rayon-s); background: var(--blanc); }
.charte-rayon .charte-apercu { width: 72px; height: 48px; border: var(--trait-fort) solid var(--marque); background: var(--marque-douce); }
.charte-espacement .charte-apercu { height: 12px; border-radius: var(--rayon-xs); background: var(--accent); }
.charte-taille .charte-apercu, .charte-police .charte-apercu { line-height: 1.2; color: var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.charte-taille .charte-apercu { font-family: var(--titre); }
.charte-facettes { position: static; max-width: 300px; max-height: none; }

/* Guides éditoriaux : en-tête, texte et colonne « Voir aussi » d'un guide. */
.guide-entete { background: var(--marque-douce); padding-block: var(--e-8); }
.guide-entete .conteneur { display: flex; flex-direction: column; gap: var(--e-4); }
.guide-chapo { font-size: var(--t-s); line-height: 1.55; max-width: 60ch; color: var(--encre-douce); }
.guide-corps { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--e-8); align-items: start; }
@media (max-width: 960px) { .guide-corps { grid-template-columns: 1fr; } }
.guide-texte { min-width: 0; }
.guide-texte .texte-long { max-width: 70ch; }
.guide-texte .texte-long :is(ul, ol) { padding-left: 1.2em; }
.guide-texte .texte-long li { margin: var(--e-2) 0; }
.guide-colonne { position: sticky; top: 90px; display: flex; flex-direction: column; gap: var(--e-5); }
@media (max-width: 960px) { .guide-colonne { position: static; } }
.guide-colonne .bouton-contour { white-space: normal; text-align: center; padding-block: var(--e-3); line-height: 1.25; }

/* Crédit d'une photo (pages races et guides) : discret, sous l'image */
.credit-photo { display: block; font: 400 var(--t-mini) var(--texte); color: var(--gris); }
.credit-photo a { color: inherit; }
.guide-photo { margin: 0; max-width: 960px; }
.guide-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--rayon-m); box-shadow: var(--ombre-carte); }
.guide-photo figcaption { font: 500 var(--t-texte-xs) var(--texte); color: var(--gris); padding-top: var(--e-3); }
/* Image dans le texte d'un guide (repère « [image N] », Web\Redaction) ; repère sans image signalé dans l'aperçu */
.texte-long .figure-texte { margin: var(--e-6) 0; }
.figure-texte img { display: block; width: 100%; height: auto; border-radius: var(--rayon-m); }
.figure-texte figcaption { font: 500 var(--t-texte-xs) var(--texte); color: var(--gris); padding-top: var(--e-3); }
.repere-inconnu { padding: var(--e-3); border: var(--trait) dashed var(--erreur); background: var(--erreur-doux); color: var(--erreur); font-size: var(--t-texte-xs); border-radius: var(--rayon-s); }

/* Outils : rubrique, comparateur de races, questionnaire, âge humain, prénoms. */
.outil .corps { gap: var(--e-3); padding: var(--e-6); }
.outil .corps span:last-child { color: var(--encre-douce); font-size: var(--t-texte-s); }
.comparateur-entetes { display: grid; gap: var(--e-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.comparateur-race img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.comparateur-liens { margin-top: var(--e-3); }
.comparateur-champs { display: grid; gap: var(--e-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.tableau-outil tbody th[scope="row"] { background: transparent; color: var(--encre); font: 600 var(--t-texte-s) var(--texte); white-space: normal; border-bottom: var(--trait) solid var(--bord); min-width: 140px; }
.tableau-outil tbody tr:last-child th { border-bottom: 0; }
.tableau-outil td { min-width: 180px; }
@media (max-width: 640px) {
  .tableau-outil tbody th[scope="row"] { display: block; width: 100%; padding: 0 0 var(--e-2); border-bottom: 0; }
  .tableau-outil td { min-width: 0; }
}
.questionnaire-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.questionnaire-race h3 a { color: var(--marque); text-decoration: none; }
.questionnaire-race h3 a:hover { text-decoration: underline; }
.questionnaire-question { margin: 0; }
.questionnaire-legende { display: flex; flex-direction: column; gap: var(--e-2); padding: 0; font: 700 var(--t-s) var(--titre); color: var(--encre); }
.age-grille { align-items: start; }
.age-valeur { font: 800 var(--t-l) var(--titre); color: var(--marque); }
.prenoms-annee { max-width: 820px; }
.prenoms-lettres { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e-4); grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.prenoms-lettre { align-items: center; padding: var(--e-5) var(--e-3); text-align: center; gap: var(--e-2); }
.prenoms-lettre strong { font: 800 var(--t-xl) var(--titre); color: var(--marque); }
.prenoms-lettre.actuelle { border-color: var(--accent); background: var(--accent-doux); }
.prenoms-liste { list-style: none; margin: 0; padding: 0; columns: 4 160px; column-gap: var(--e-6); }
.prenoms-liste li { break-inside: avoid; padding: var(--e-2) 0; border-bottom: var(--trait) solid var(--bord); font-size: var(--t-texte-s); }



/* Pages publiques et comptes : classes propres à ces gabarits (place de marché, inscription, connexion). */

/* Grille de cartes plus serrée que .grille (liste des races). */
.grille-serree { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
/* Ligne d'une liste séparée de la précédente par un filet (portées à venir). */
.ligne-separee { border-top: var(--trait) solid var(--bord); padding-top: var(--e-3); }
/* Titre cliquable d'un bloc repliable (races par espèce à l'inscription). */
.resume-repli { padding: var(--e-3) 0; }

/* Bandeau de consentement aux cookies (CNIL) : en bas d'écran, sans voile ni blocage de la page, défilant s'il est long. */
.consentement { position: fixed; left: var(--e-5); right: var(--e-5); bottom: var(--e-5); z-index: 50; max-width: 680px; max-height: 80vh; overflow-y: auto; margin: 0 auto; display: flex; flex-direction: column; gap: var(--e-4); padding: var(--e-5) var(--e-6); background: var(--blanc); color: var(--encre); border: var(--trait) solid var(--bord); border-top: var(--trait-fort) solid var(--marque); border-radius: var(--rayon); box-shadow: var(--ombre-flottante); font-size: var(--t-texte-s); }
.consentement[hidden], .consentement-detail[hidden] { display: none; }
.consentement p { margin: 0; }
.consentement-titre { margin: 0; font: 700 var(--t-xs) var(--titre); }
.consentement-detail { display: flex; flex-direction: column; gap: var(--e-3); }
.consentement-finalite { display: flex; gap: var(--e-4); align-items: flex-start; justify-content: space-between; padding: var(--e-3) 0; border-top: var(--trait) solid var(--bord); }
.consentement-finalite .discret { flex: none; }
.consentement-actions { display: flex; flex-wrap: wrap; gap: var(--e-3); justify-content: flex-end; }
@media (max-width: 560px) {
  .consentement { left: var(--e-3); right: var(--e-3); bottom: var(--e-3); padding: var(--e-4); }
  .consentement-actions > * { flex: 1 1 100%; }
}

/* Maillage du pied de page : recherches fréquentes */
.maillage { border-top: var(--trait) solid var(--marque); padding-top: var(--e-5); }
.liens-maillage { columns: 2; column-gap: var(--e-6); }
.lien-pied { color: inherit; text-decoration: none; font: inherit; padding: 0; }
/* Maillage : listes de liens vers les pages par département */
.liens-departements { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e-2) var(--e-6); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.texte-seo { border-top: var(--trait) solid var(--bord); }
/* Pages d'une race : prix constaté et liens entre ses pages d'atterrissage (annonces, portées, élevages, saillies, régions) */
.declinaisons { display: flex; flex-direction: column; gap: var(--e-6); }
.prix-constate { max-width: 760px; }
.prix-constate p { margin: 0; }
.prix-fourchette { font-size: var(--t-s); line-height: 1.5; }
/* Liens « Voir aussi » des fiches (maillage interne) */
.voir-aussi ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: var(--e-2); }

/* Messages de sensibilisation obligatoires (arrêté du 28 juin 2023) : lisibles, jamais masqués. */
.messages-legaux { display: grid; gap: var(--e-3); padding: var(--e-5); border-radius: var(--rayon-m); background: var(--marque-douce); color: var(--encre); font-size: var(--t-discret); line-height: 1.5; }
.messages-legaux p { margin: 0; }
.messages-legaux a { overflow-wrap: anywhere; }

/* Site fermé au public (mode maintenance) : page seule, centrée, sans menu. */
.maintenance { min-height: 100vh; display: grid; place-items: center; background: var(--fond); padding: var(--e-5); }
.maintenance-cadre { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: var(--e-5); padding: var(--e-8) var(--e-7); background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon-l); box-shadow: var(--ombre-flottante); text-align: center; }
.maintenance-cadre h1 { font-size: var(--t-titre-2); margin: 0; }
.maintenance-cadre .formulaire { text-align: left; }
.maintenance-marque { flex-direction: column; justify-content: center; gap: var(--e-3); font-size: var(--t-m); }
.maintenance-marque img { width: 72px; height: 72px; }
.maintenance-acces a { color: inherit; }
@media (max-width: 480px) { .maintenance-cadre { padding: var(--e-7) var(--e-5); } }
/* Page d'attente : formulaire de la liste d'attente sous le message, et message de retour dans le cadre. */
.attente-formulaire { border-top: var(--trait) solid var(--bord); padding-top: var(--e-6); }
.attente-formulaire .titre-cadre { margin: 0; }
.maintenance-cadre .flash { margin: 0; text-align: left; }

/* Recherche sur téléphone : les filtres secondaires et la carte sont repliés derrière un bouton, les annonces viennent tout de suite. */
.bouton-filtres, .bouton-carte-mobile { display: none; }
.filtres-plus { display: contents; }
@media (max-width: 900px) {
  .bouton-filtres, .bouton-carte-mobile { display: inline-flex; align-self: flex-start; }
  .filtres .filtres-plus { display: none; }
  .filtres.deplie .filtres-plus { display: flex; flex-direction: column; gap: 14px; }
  .recherche { grid-template-columns: minmax(0, 1fr); }
  .filtres, .filtres .champ { min-width: 0; }
  .filtres .puces { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: var(--e-2); }
  .zone-carte-mobile { display: none; }
  .zone-carte-mobile.deplie { display: block; }
}

/* Recherche par distance : ville ou code postal, rayon, position ; compteur de résultats. */
.champ-ville select, .champ-ville input[type="text"] { width: 100%; }
.champ-ville.compact { display: flex; min-width: 0; }
.recherche-ville { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e-4); }
.recherche-ville .champ-ville { flex: 1 1 260px; }
.compteur-resultats { margin: 0; }

/* Accueil sur téléphone : chaque section d'annonces ou de fiches devient une rangée qui défile au doigt, au lieu d'une longue grille. */
@media (max-width: 640px) {
  .defile-mobile { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 68%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--marge)); padding: 0 var(--marge) var(--e-3); scroll-padding-inline: var(--marge); scrollbar-width: none; }
  .grille-fiches.defile-mobile { grid-auto-columns: 82%; }
  .defile-mobile > * { scroll-snap-align: start; }
}

/* Page Développeurs : documentation de l'API, exemples de commandes et tableaux des routes. */
.doc-api h2 { margin-top: var(--e-7); }
.doc-api code { font: 400 .92em var(--code); background: var(--surface-creuse); padding: 0 var(--e-2); border-radius: var(--rayon-xs); word-break: break-word; }
.doc-api pre { margin: var(--e-3) 0 var(--e-5); padding: var(--e-4) var(--e-5); background: var(--marque-fonce); color: var(--encre-inverse); border-radius: var(--rayon-s); overflow-x: auto; font: 400 var(--t-texte-xs)/1.6 var(--code); }
.doc-api pre code { background: none; padding: 0; color: inherit; font: inherit; }
.doc-api .tableau td:first-child { white-space: nowrap; }

/* État vide des listes publiques : message, alerte e-mail, liens utiles, invitation aux professionnels. */
.etat-vide { display: flex; flex-direction: column; gap: var(--e-6); padding: var(--e-7) var(--e-6); background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-carte); }
.etat-vide-titre { font-size: var(--t-cadre); margin: 0; }
.etat-vide-colonnes { display: grid; gap: var(--e-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.etat-vide-liens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--e-3); font-size: var(--t-texte-s); }
.etat-vide-pro { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--e-4); padding: var(--e-5); border-radius: var(--rayon-m); background: var(--surface-creuse); }
@media (max-width: 480px) { .etat-vide { padding: var(--e-6) var(--e-5); } }

/* Accueil : compteurs d'activité (affichés seulement au-delà du seuil réglé) et races populaires. */
.compteurs-activite { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.compteur-activite { display: flex; flex-direction: column; gap: var(--e-1); height: 100%; padding: var(--e-5); background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-carte); color: var(--encre-douce); text-decoration: none; }
.compteur-activite:hover { box-shadow: var(--ombre-survol); color: var(--encre-douce); }
.compteur-activite strong { font: 800 var(--t-xl)/1.1 var(--titre); color: var(--marque); }
.races-populaires .puce .mono { margin-left: var(--e-3); color: var(--gris); }
.races-populaires .puce:hover .mono { color: inherit; }

/* Page Tarifs : packs de crédits, tableau des prix, questions fréquentes. */
.tarifs-packs { display: grid; gap: var(--e-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.tarif-pack { display: flex; flex-direction: column; gap: var(--e-1); padding: var(--e-5); background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-carte); }
.tarif-pack strong { font: 800 var(--t-l)/1.1 var(--titre); color: var(--marque); }
.tarifs-tableau td:last-child { white-space: nowrap; }
.tarifs-gratuit { font-weight: 600; color: var(--ok); }
details.question-tarif { background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon-m); }
details.question-tarif summary { cursor: pointer; padding: var(--e-4) var(--e-5); font: 700 var(--t-xs) var(--titre); }
details.question-tarif[open] { box-shadow: var(--ombre-carte); }
details.question-tarif p { margin: 0; padding: 0 var(--e-5) var(--e-5); color: var(--encre-douce); }

/* Favoris sans compte : cœur posé par app.js sur chaque carte (annonce, fiche), bouton des fiches, lien de l'en-tête. */
.favori-carte { position: relative; display: flex; flex-direction: column; }
.favori-carte > .carte-annonce, .favori-carte > .carte-elevage { flex: 1; }
.favori-bouton { position: absolute; top: 14px; right: 14px; z-index: 3; display: grid; place-items: center; width: var(--h-tactile); height: var(--h-tactile); padding: 0; border: var(--trait) solid var(--bord); border-radius: var(--rayon-rond); background: var(--blanc); color: var(--encre-douce); box-shadow: var(--ombre-pastille); cursor: pointer; }
.favori-carte.elevage .favori-bouton { right: auto; left: 14px; }
.favori-bouton svg, .favori-fiche svg, .favoris-entete svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.favori-bouton[aria-pressed="true"], .favori-fiche[aria-pressed="true"] { color: var(--accent); }
.favori-bouton[aria-pressed="true"] svg, .favori-fiche[aria-pressed="true"] svg, .favoris-entete svg { fill: currentColor; }
.favori-bouton:hover, .favori-bouton:focus-visible { border-color: var(--accent); color: var(--accent); }
.favori-fiche { gap: var(--e-3); }
.favori-indisponible { opacity: .75; }
.favori-indisponible .photo { background: var(--surface-creuse); }
.favoris-entete { position: relative; display: inline-grid; place-items: center; width: var(--h-tactile); height: var(--h-tactile); border-radius: var(--rayon-rond); color: var(--accent); }
.favoris-entete[hidden], [data-favoris-rien][hidden], [data-favoris-lien][hidden] { display: none; }
.favoris-entete:hover { background: var(--surface-forte); color: var(--accent-fonce); }
.favoris-compteur { position: absolute; top: 2px; right: 0; min-width: 18px; padding: 0 4px; border-radius: var(--rayon-pilule); background: var(--marque); color: var(--encre-inverse); font: 700 var(--t-mini)/18px var(--texte); text-align: center; }
.favoris-section { display: flex; flex-direction: column; gap: var(--e-4); margin-top: var(--e-6); }
.favoris-annonce { position: fixed; left: 50%; bottom: var(--e-6); z-index: 50; transform: translateX(-50%); max-width: calc(100% - 32px); padding: var(--e-4) var(--e-5); border-radius: var(--rayon-m); background: var(--marque-fonce); color: var(--encre-inverse); box-shadow: var(--ombre-flottante); font-size: var(--t-discret); }
.favoris-annonce[hidden] { display: none; }

/* Avis d'adoptants vérifiés (fiche d'un élevage, dépôt d'un avis). */
.avis-fiche { display: flex; flex-direction: column; gap: var(--e-4); scroll-margin-top: 96px; }
.avis-moyenne { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: var(--e-3); }
.avis-etoiles { color: var(--accent); letter-spacing: .08em; white-space: nowrap; }
.avis-reponse { margin-top: var(--e-3); padding: var(--e-4) var(--e-5); border-left: var(--trait-epais) solid var(--marque); border-radius: var(--rayon-xs); background: var(--surface-creuse); }
.avis-reponse p { margin: var(--e-2) 0 0; }
.avis-note .ligne { flex-wrap: wrap; }

/* Badge « Ambassadeur » (programme de parrainage, fiche élevage et annonces) : étiquette carrée à losange, violette,
   jamais la pilule ni les teintes des badges de vérification ; infobulle au survol et au clavier. */
.badge-ambassadeur { position: relative; display: inline-flex; }
.etiquette-ambassadeur { display: inline-flex; align-items: center; gap: var(--e-3); padding: var(--e-2) var(--e-4); border: var(--trait-fort) solid var(--ambassadeur); border-radius: var(--rayon-xs); background: var(--ambassadeur-doux); color: var(--ambassadeur); font: 600 var(--t-texte-xs)/1.2 var(--texte); white-space: nowrap; cursor: help; }
.etiquette-ambassadeur::before { content: ''; width: var(--e-3); height: var(--e-3); background: var(--ambassadeur); transform: rotate(45deg); }
.etiquette-ambassadeur:focus-visible { outline: var(--trait-epais) solid var(--ambassadeur); outline-offset: var(--e-1); }
.badge-ambassadeur .infobulle { position: absolute; left: 0; top: calc(100% + var(--e-2)); z-index: 5; width: max-content; max-width: min(var(--larg-infobulle), 80vw); padding: var(--e-3) var(--e-4); border-radius: var(--rayon-s); background: var(--ambassadeur); color: var(--encre-inverse); font: 400 var(--t-texte-xs)/1.45 var(--texte); white-space: normal; box-shadow: var(--ombre-flottante); opacity: 0; visibility: hidden; transition: opacity var(--mouvement-rapide); }
.badge-ambassadeur:hover .infobulle, .badge-ambassadeur:focus-within .infobulle { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .badge-ambassadeur .infobulle { transition: none; } }

/* Badge « Éleveur fondateur » (premiers éleveurs validés : fiche élevage, annonces, cartes de l'annuaire, mini-site) : pastille or
   à numéro d'ordre plein, jamais le vert des badges de vérification ni le violet de l'Ambassadeur ; infobulle au survol et au clavier
   (aucune dans une carte cliquable : variante sans tabindex). */
.badge-fondateur { position: relative; display: inline-flex; align-self: flex-start; }
.etiquette-fondateur { display: inline-flex; align-items: center; gap: var(--e-3); padding: var(--e-1) var(--e-2) var(--e-1) var(--e-4); border: var(--trait-fort) solid var(--fondateur); border-radius: var(--rayon-pilule); background: var(--fondateur-doux); color: var(--fondateur); font: 600 var(--t-texte-xs)/1.2 var(--texte); letter-spacing: normal; text-transform: none; white-space: nowrap; }
.etiquette-fondateur[tabindex] { cursor: help; }
.numero-fondateur { padding: var(--e-1) var(--e-3); border-radius: var(--rayon-pilule); background: var(--fondateur); color: var(--encre-inverse); }
.etiquette-fondateur:focus-visible { outline: var(--trait-epais) solid var(--fondateur); outline-offset: var(--e-1); }
.badge-fondateur .infobulle { position: absolute; left: 0; top: calc(100% + var(--e-2)); z-index: 5; width: max-content; max-width: min(var(--larg-infobulle), 80vw); padding: var(--e-3) var(--e-4); border-radius: var(--rayon-s); background: var(--fondateur); color: var(--encre-inverse); font: 400 var(--t-texte-xs)/1.45 var(--texte); letter-spacing: normal; text-transform: none; white-space: normal; box-shadow: var(--ombre-flottante); opacity: 0; visibility: hidden; transition: opacity var(--mouvement-rapide); }
.badge-fondateur:hover .infobulle, .badge-fondateur:focus-within .infobulle { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .badge-fondateur .infobulle { transition: none; } }

/* Page « Éleveurs fondateurs » : bloc des places restantes, bien visible avant la liste des avantages. */
.places-fondateurs-chiffre { margin: 0; font: 800 var(--t-grand)/1.1 var(--titre); color: var(--marque); }



/* Espace éleveur et super-admin : barre latérale, médias, support, fiche client. */

/* Espace de gestion et super-admin : barre latérale sombre (équipe) ou claire (éleveur, classe .claire) */
.espace { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
@media (max-width: 960px) { .espace { grid-template-columns: 1fr; align-content: start; } }
.barre { background: var(--marque-fonce); color: var(--encre-inverse-douce); padding: 18px 14px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 961px) { .barre { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.barre .marque { color: var(--encre-inverse); }
.barre .marque .logo { background: var(--encre-inverse); color: var(--marque); }
.barre .etiquette { color: var(--encre-inverse-douce); }
.barre nav { display: flex; flex-direction: column; gap: 2px; }
.barre nav a { color: var(--encre-inverse-douce); text-decoration: none; padding: 0 12px; min-height: var(--h-champ-s); border-radius: var(--rayon-s); font: 500 var(--t-texte-s) var(--texte); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.barre nav a:hover { background: var(--marque); color: var(--encre-inverse); }
.barre nav a[aria-current="page"] { background: var(--blanc); color: var(--marque); font-weight: 600; }
.barre .groupe { font: 700 var(--t-mini) var(--titre); letter-spacing: .04em; text-transform: uppercase; color: var(--encre-inverse-douce); padding: 14px 12px 4px; }
.barre .compteur { font: 600 var(--t-mini) var(--texte); background: var(--accent); color: var(--encre-inverse); border-radius: var(--rayon-pilule); padding: 1px 8px; }
/* Pastilles du menu : « à traiter » en corail (.compteur), « nouveau » plus discrète (.compteur.nouveau) ; texte complet pour les lecteurs d'écran. */
.barre .pastilles { display: inline-flex; align-items: center; gap: var(--e-2); flex-shrink: 0; }
.barre .compteur.nouveau { background: transparent; color: var(--encre-inverse); box-shadow: inset 0 0 0 var(--trait) var(--encre-inverse-douce); }
.barre nav a[aria-current="page"] .compteur.nouveau { color: var(--marque); box-shadow: inset 0 0 0 var(--trait) var(--marque); }
.barre.claire .compteur.nouveau { background: var(--marque-douce); color: var(--marque); box-shadow: none; }
.barre.claire nav a[aria-current="page"] .compteur.nouveau { background: var(--blanc); }
.barre .bouton-barre .pastilles { margin-left: var(--e-3); }
.barre .bouton-barre:hover .compteur.nouveau { color: var(--encre-inverse); box-shadow: inset 0 0 0 var(--trait) var(--encre-inverse-douce); background: transparent; }
.barre .lecteur-seul { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.barre :focus-visible { outline-color: var(--encre-inverse); }
.barre .bouton-lien { color: inherit; justify-content: flex-start; }
.barre .bouton-lien:hover { background: var(--marque); color: var(--encre-inverse); }
.barre .bouton-barre { background: transparent; border-color: var(--encre-inverse-douce); color: var(--encre-inverse); }
.barre .bouton-barre:hover { background: var(--marque); color: var(--encre-inverse); }
.barre.claire { background: var(--blanc); color: var(--encre-douce); border-right: var(--trait) solid var(--bord); }
.barre.claire .marque { color: var(--marque); }
.barre.claire .marque .logo { background: var(--marque); color: var(--encre-inverse); }
.barre.claire .etiquette { color: var(--gris); }
.barre.claire nav a { color: var(--encre-douce); }
.barre.claire nav a:hover { background: var(--surface-forte); color: var(--marque); }
.barre.claire nav a[aria-current="page"] { background: var(--marque-douce); color: var(--marque); }
.barre.claire .groupe { color: var(--gris); }
.barre.claire :focus-visible { outline-color: var(--marque); }
.barre.claire .bouton-lien:hover { background: var(--surface-forte); color: var(--marque); }
.barre.claire .bouton-barre { background: var(--blanc); border-color: var(--marque); color: var(--marque); }
.barre.claire .bouton-barre:hover { background: var(--marque); color: var(--encre-inverse); }
@media (max-width: 960px) {
  .barre { position: static; height: auto; }
  .barre nav { display: none; }
  .barre.ouvert nav { display: flex; }
  /* Téléphone : la déconnexion est rangée avec le menu, pas affichée en permanence en haut de chaque page. */
  .barre > .pousse-bas { display: none; }
  .barre.ouvert > .pousse-bas { display: block; }
  .barre { gap: var(--e-3); padding: 12px 14px; }
}
.espace main { padding: clamp(20px, 4vw, 36px); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.chiffres { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
/* Téléphone : chiffres par deux, pour les voir d'un coup d'œil. */
@media (max-width: 560px) { .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-3); } .chiffre { padding: 12px 14px; } .chiffre strong { font-size: var(--t-section); } }
.chiffre { background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-carte); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--encre-douce); }
a.chiffre:hover { box-shadow: var(--ombre-survol); color: var(--encre-douce); }
.chiffre strong { font: 800 var(--t-xl)/1.1 var(--titre); color: var(--marque); }
.chiffre.alerte { border-color: var(--accent); }
.onglets { display: flex; gap: 6px; flex-wrap: wrap; }
.etapes { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; counter-reset: etape; }
.etapes li { counter-increment: etape; font-size: var(--t-corps); color: var(--gris); display: flex; align-items: center; gap: 6px; }
.etapes li::before { content: counter(etape); width: 26px; height: 26px; border-radius: var(--rayon-rond); border: var(--trait-fort) solid var(--gris-clair); display: grid; place-items: center; font: 600 var(--t-mini) var(--texte); }
.etapes li.faite::before { background: var(--marque); border-color: var(--marque); color: var(--encre-inverse); content: '✓'; }
.etapes li.courante { color: var(--encre); font-weight: 600; }
.etapes li.courante::before { border-color: var(--accent); background: var(--accent); color: var(--encre-inverse); }
.graphique { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 8px 0; border-bottom: var(--trait) solid var(--bord-fort); }
.graphique span { flex: 1; background: var(--marque); min-height: 2px; border-radius: var(--e-1) var(--e-1) 0 0; }
.graphique span:hover { background: var(--accent); }

/* Gestion : photos et vidéos d'un élément */
.medias-gestion { display: flex; flex-direction: column; gap: 10px; }
.medias-grille { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.media-vignette { position: relative; display: flex; flex-direction: column; gap: 4px; }
.media-vignette img, .media-attente { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon-s); background: var(--surface-creuse); }
.media-attente { display: grid; place-items: center; font: 500 var(--t-mini) var(--texte); color: var(--gris); }
.media-vignette.principale img { outline: 3px solid var(--marque); outline-offset: -3px; }
.media-vignette .pastille { position: absolute; top: 6px; left: 6px; }
.media-actions { display: flex; justify-content: space-between; gap: 6px; }
.lien-bouton { border: 0; background: none; padding: 2px 0; font: 500 var(--t-texte-xs) var(--texte); color: var(--marque); text-decoration: underline; cursor: pointer; }
.lien-bouton.rouge { color: var(--accent-fonce); }
p.aide, .aide.mono { font-size: var(--t-texte-xs); color: var(--gris); margin: 0; }
.logo-apercu { width: 96px; height: 96px; border-radius: var(--rayon-l); overflow: hidden; border: var(--trait) solid var(--bord); display: grid; place-items: center; flex: none; }
.logo-apercu img { width: 100%; height: 100%; object-fit: cover; }
.logo-apercu .monogramme { width: 100%; height: 100%; display: grid; place-items: center; font-size: var(--t-xl); }
.galerie-videos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.galerie-videos video { width: 100%; aspect-ratio: 16 / 9; background: var(--marque-fonce); border-radius: var(--rayon-m); }
.entete-elevage { display: flex; gap: 20px; align-items: center; }
.logo-apercu.grand { width: 112px; height: 112px; background: var(--blanc); box-shadow: var(--ombre-logo); }
@media (max-width: 560px) { .entete-elevage { flex-direction: column; align-items: flex-start; } }

/* Support : liste des tickets et fil de discussion */
.liste-tickets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ticket-ligne { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center; padding: 14px 16px; background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon-m); box-shadow: var(--ombre-carte); color: var(--encre); text-decoration: none; }
.ticket-ligne .discret { grid-column: 2; font-size: var(--t-texte-xs); }
.ticket-ligne .pastille { grid-row: 1; grid-column: 3; }
.ticket-ligne .pastille.rouge { grid-row: 2; }
.ticket-ligne:hover { box-shadow: var(--ombre-survol); color: var(--encre); }
.ticket-ligne.non-lu, tr.non-lu td { background: var(--non-lu); }
.ticket-fil { max-height: 70vh; overflow-y: auto; }
.fil-support { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.fil-jour { text-align: center; font: 500 var(--t-mini) var(--texte); color: var(--gris); }
.fil-jour span { background: var(--surface-creuse); padding: 3px 10px; border-radius: var(--rayon-pilule); }
.fil-evenement { text-align: center; font-size: var(--t-texte-xs); color: var(--gris); }
.fil-message { display: flex; flex-direction: column; gap: 4px; max-width: min(78%, 640px); align-self: flex-start; }
.fil-message.moi { align-self: flex-end; align-items: flex-end; }
.fil-auteur { display: flex; gap: 8px; align-items: center; font-size: var(--t-texte-xs); font-weight: 600; }
.fil-auteur .mono { font-weight: 400; color: var(--gris); }
.fil-bulle { background: var(--surface-creuse); padding: 10px 16px; border-radius: var(--rayon-xs) var(--rayon) var(--rayon) var(--rayon); }
.fil-message.moi .fil-bulle { background: var(--marque); color: var(--encre-inverse); border-radius: var(--rayon) var(--rayon-xs) var(--rayon) var(--rayon); }
.fil-message.interne .fil-bulle { background: var(--note-interne); color: var(--encre); border: var(--trait) dashed var(--note-interne-bord); border-radius: var(--rayon-m); }
.fil-bulle p { margin: 0 0 8px; }
.fil-bulle p:last-child, .fil-bulle ul:last-child { margin-bottom: 0; }

/* Super-admin : fiche client, comptes de paiement */
.chiffres-client { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.chiffres-client .cadre { gap: 4px; }
.chiffres-client strong { font: 800 var(--t-section) var(--titre); color: var(--marque); }
.chiffres-client .discret { font-size: var(--t-texte-xs); }
details.cadre > summary { cursor: pointer; list-style-position: inside; }
.compte-actif { border-color: var(--marque); box-shadow: inset 0 0 0 1px var(--marque); }

.apercu-courriel { width: 100%; height: 640px; border: var(--trait) solid var(--bord); border-radius: var(--rayon); background: var(--fond); }

/* Barre latérale : bouton du menu (affiché sous 961 px), titre de la marque, rôle de l'équipe */
.barre .marque strong { font-size: var(--t-xs); }
@media (min-width: 961px) { .barre .bouton-barre { display: none; } }
@media (max-width: 960px) { .barre .bouton-barre { display: inline-flex; } }

/* Gabarits de l'espace : classes qui remplacent les styles écrits dans les pages */
.texte-m { font-size: var(--t-corps); }
.titre-carte-s { font-size: var(--t-carte-s); }
.police-titre { font-family: var(--titre); font-weight: 700; line-height: normal; }
.chiffre strong.titre-cadre { font-size: var(--t-cadre); }
.contenu-debut { align-items: flex-start; }
.aligne-droite { text-align: right; }
.ecart-ample { gap: var(--e-6); }
.marge-haut-s { margin-top: var(--e-3); }
.marge-bas-s { margin-bottom: var(--e-3); }
.ligne-en-ligne { display: inline-flex; }
.grille-etroite { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.groupe-cadre { border: var(--trait) solid var(--bord); border-radius: var(--rayon-m); padding: var(--e-4); }
.groupe-cadre > legend { padding: 0 var(--e-2); }
.valeur-champ { min-height: var(--h-champ); display: flex; align-items: center; }
.champ-petit { min-height: var(--h-champ-s); }
.champ-ample { min-width: 280px; }
.tableau-totaux { max-width: 320px; margin-left: auto; }

/* Registres : titre visible seulement à l'impression */
.imprime { display: none; }
@media print { .imprime { display: block; } }

/* Champ compact : plus fort que la hauteur minimale imposée par type de champ (input[type=...]). */
:is(input, select, textarea).champ-petit { min-height: var(--h-champ-s); }

/* Vérification des coordonnées (réglages) : une ligne par coordonnée. */
.coordonnee { padding: var(--e-2) 0; border-bottom: var(--trait) solid var(--bord); }
.coordonnee:last-child { border-bottom: 0; }

/* Finances (super-admin) : barres encaissé / dépenses, ligne du résultat, projection en clair. */
.legende-finances { display: flex; flex-wrap: wrap; gap: var(--e-4); font-size: var(--t-discret); color: var(--gris); }
.legende-finances .cle::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: var(--e-1); margin-right: 6px; vertical-align: -1px; background: var(--gris-clair); }
.legende-finances .encaisse::before { background: var(--marque); }
.legende-finances .depense::before { background: var(--accent); }
.legende-finances .resultat::before { background: var(--encre); height: 3px; vertical-align: 3px; }
.legende-finances .projete::before { background: var(--surface-creuse); border: var(--trait) dashed var(--gris); }
.defilement-x { overflow-x: auto; }
.finances-graphe { width: 100%; min-width: 560px; height: auto; display: block; }
.finances-graphe .grille { stroke: var(--bord); stroke-width: 1; }
.finances-graphe .axe-zero { stroke: var(--gris); stroke-width: 1; }
.finances-graphe .graduation { fill: var(--gris); font: var(--t-micro) var(--texte); }
.finances-graphe .barre-encaisse { fill: var(--marque); }
.finances-graphe .barre-depense { fill: var(--accent); }
.finances-graphe .projete { opacity: .35; }
.finances-graphe .ligne-resultat { fill: none; stroke: var(--encre); stroke-width: 2; }
.tableau-finances .projection td { color: var(--gris); font-style: italic; }
.ligne-frais { border-bottom: var(--trait) solid var(--bord); padding: var(--e-2) 0; }
.ligne-frais summary { cursor: pointer; }
.chiffre strong.rouge, .tableau-finances td.rouge { color: var(--erreur); }

/* Guides (super-admin) : liste des liens de maillage d'un guide. */
.liste-liens-guide { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--e-3); }
.liste-liens-guide li { display: flex; justify-content: space-between; align-items: center; gap: var(--e-4); padding-bottom: var(--e-3); border-bottom: var(--trait) solid var(--bord); }
.liste-liens-guide li:last-child { border-bottom: 0; padding-bottom: 0; }

/* Super-admin, écran Erreurs : contexte d'une occurrence (JSON), défilant sur petit écran. */
.contexte-erreur { margin: var(--e-3) 0 0; padding: var(--e-3); border-radius: var(--rayon-s); background: var(--surface-creuse); font-size: var(--t-texte-xs); overflow-x: auto; white-space: pre-wrap; word-break: break-word; }

/* Téléphone : barres de recherche et de filtres des listes, un champ par ligne sur toute la largeur. */
@media (max-width: 640px) {
  form.ligne[role="search"] { flex-direction: column; align-items: stretch; }
  form.ligne[role="search"] > *, form.ligne[role="search"] select, form.ligne[role="search"] input:not([type="checkbox"]):not([type="radio"]) { width: 100%; max-width: none; }
  form.ligne[role="search"] label.ligne { flex-wrap: nowrap; }
}

/* Super-admin, À relire : texte complet d'un professionnel, retours à la ligne conservés. */
.texte-relu { margin: var(--e-3) 0 0; padding: var(--e-3); border-radius: var(--rayon-s); background: var(--surface-creuse); white-space: pre-line; word-break: break-word; }

/* Espace éleveur, API développeurs : clé affichée une seule fois, à copier en entier. */
.cle-api { margin: 0; padding: var(--e-4); border: var(--trait-epais) dashed var(--marque); border-radius: var(--rayon-s); background: var(--surface-creuse); font: 600 var(--t-texte-s)/1.5 var(--code); color: var(--encre); word-break: break-all; user-select: all; }

/* Photothèque de l'équipe (pages races et guides) : recherche et grille des photos des élevages sous licence */
.phototheque-filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e-4); }
.phototheque-filtres .champ { flex: 1 1 160px; }
.phototheque-grille { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.phototheque-photo { display: flex; flex-direction: column; gap: var(--e-3); padding: var(--e-3); background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon-m); }
.phototheque-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon-s); }
.phototheque-legende { font-size: var(--t-texte-xs); line-height: 1.4; }
/* Images du texte d'un guide (éditeur) : vignette, repère à copier, description, légende, crédit */
.images-texte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--e-4); }
.image-texte { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--e-4); align-items: start; padding-bottom: var(--e-4); border-bottom: var(--trait) solid var(--bord); }
@media (max-width: 640px) { .image-texte { grid-template-columns: 1fr; } }
.image-texte > img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon-s); }
.image-texte-attente { display: grid; place-items: center; aspect-ratio: 4 / 3; border: var(--trait) dashed var(--bord); border-radius: var(--rayon-s); }

/* Espace éleveur, Bien démarrer : jauge d'avancement et étapes du parcours (page et encart du tableau de bord). */
.jauge { display: block; width: 100%; height: var(--h-jauge); appearance: none; border: 0; border-radius: var(--rayon-pilule); background: var(--surface-creuse); overflow: hidden; }
.jauge::-webkit-progress-bar { background: var(--surface-creuse); border-radius: var(--rayon-pilule); }
.jauge::-webkit-progress-value { background: var(--ok); border-radius: var(--rayon-pilule); }
.jauge::-moz-progress-bar { background: var(--ok); border-radius: var(--rayon-pilule); }
.etapes-demarrage { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--e-4); }
.etape-demarrage { display: flex; gap: var(--e-5); align-items: flex-start; border: var(--trait) solid var(--bord); border-radius: var(--rayon); background: var(--blanc); padding: var(--e-6); box-shadow: var(--ombre-carte); scroll-margin-top: var(--e-7); }
.etape-demarrage.faite { background: var(--surface-creuse); box-shadow: none; }
.etape-demarrage > .pile { flex: 1; min-width: 0; }
.puce-etape { flex: none; width: var(--puce-etape); height: var(--puce-etape); border-radius: var(--rayon-rond); display: inline-flex; align-items: center; justify-content: center; font: 700 var(--t-texte-s) var(--titre); background: var(--marque-douce); color: var(--marque); }
.etape-demarrage.faite .puce-etape { background: var(--ok-doux); color: var(--ok); }
.titre-etape { margin: 0; font-size: var(--t-s); }
.points-etape { margin: 0; padding-left: var(--e-6); display: flex; flex-direction: column; gap: var(--e-2); color: var(--encre-douce); font-size: var(--t-texte-s); }
.etape-demarrage details > summary { cursor: pointer; color: var(--marque); font-size: var(--t-texte-s); }
@media (max-width: 640px) { .etape-demarrage { padding: var(--e-5); gap: var(--e-4); } }

/* Super-admin, En direct : classements de la période (pages, provenances, robots) et colonne des pages de la liste. */
.direct { display: flex; flex-direction: column; gap: var(--e-5); }
.direct-tops { display: grid; gap: var(--e-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--colonne-classement)), 1fr)); }
.direct-classement { margin: 0; padding-left: var(--e-6); display: flex; flex-direction: column; gap: var(--e-2); font-size: var(--t-texte-s); }
.direct-classement li > strong { float: right; margin-left: var(--e-3); color: var(--encre-douce); }
.direct-classement a, .direct-page a { overflow-wrap: anywhere; }

/* Menu latéral rangé par groupes repliables : titre en bouton (aria-expanded), total des pastilles visible seulement replié. */
.barre .menu-groupe { display: flex; flex-direction: column; gap: 2px; }
.barre .groupe-titre { display: flex; justify-content: space-between; align-items: center; gap: var(--e-3); width: 100%; min-height: var(--h-champ-s); margin-top: var(--e-3); padding: 0 12px; border: 0; border-radius: var(--rayon-s); background: transparent; color: var(--encre-inverse-douce); font: 700 var(--t-mini) var(--titre); letter-spacing: .04em; text-transform: uppercase; text-align: left; cursor: pointer; }
.barre .groupe-titre:hover { background: var(--marque); color: var(--encre-inverse); }
.barre .groupe-nom { display: inline-flex; align-items: center; gap: var(--e-3); }
.barre .groupe-titre .chevron { flex-shrink: 0; transition: transform var(--mouvement-rapide); }
.barre .menu-groupe.replie .chevron { transform: rotate(-90deg); }
.barre .groupe-liens { display: flex; flex-direction: column; gap: 2px; }
.barre .groupe-liens[hidden] { display: none; }
.barre .menu-groupe:not(.replie) .total-groupe { display: none; }
.barre .total-groupe .pastilles { text-transform: none; letter-spacing: 0; }
.barre.claire .groupe-titre { color: var(--gris); }
.barre.claire .groupe-titre:hover { background: var(--surface-forte); color: var(--marque); }
@media (prefers-reduced-motion: reduce) { .barre .groupe-titre .chevron { transition: none; } }

/* Barre de raccourcis du téléphone : fixée en bas, quatre raccourcis et le bouton Menu ; le contenu garde une marge basse. */
.barre-mobile { display: none; }
@media (max-width: 767px) {
  .barre-mobile { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--e-1); min-height: var(--h-barre-mobile); padding: var(--e-2) var(--e-2) calc(var(--e-2) + env(safe-area-inset-bottom)); background: var(--blanc); border-top: var(--trait) solid var(--bord); box-shadow: var(--ombre-flottante); }
  .espace { padding-bottom: calc(var(--h-barre-mobile) + env(safe-area-inset-bottom)); }
  /* Le bouton Menu du haut fait doublon avec celui de la barre. */
  .barre .bouton-barre { display: none; }
}
.barre-mobile a, .barre-mobile button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--e-1); min-height: var(--h-tactile); padding: var(--e-1) 0; border: 0; border-radius: var(--rayon-s); background: transparent; color: var(--encre-douce); font: 500 var(--t-mini) var(--texte); text-decoration: none; text-align: center; cursor: pointer; }
.barre-mobile a > span:last-child, .barre-mobile button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-mobile a:hover, .barre-mobile button:hover { color: var(--marque); background: var(--surface-forte); }
.barre-mobile [aria-current="page"], .barre-mobile button[aria-expanded="true"] { color: var(--marque); background: var(--marque-douce); font-weight: 600; }
.barre-mobile :focus-visible { outline-color: var(--marque); }
.barre-mobile .icone-raccourci { position: relative; display: inline-flex; }
.barre-mobile .pastilles { position: absolute; top: calc(-1 * var(--e-2)); left: calc(100% - var(--e-3)); display: inline-flex; gap: var(--e-1); }
.barre-mobile .compteur { font: 600 var(--t-mini)/1.4 var(--texte); background: var(--accent); color: var(--encre-inverse); border-radius: var(--rayon-pilule); padding: 0 6px; }
.barre-mobile .compteur.nouveau { background: var(--marque-douce); color: var(--marque); box-shadow: inset 0 0 0 var(--trait) var(--marque); }
.barre-mobile .lecteur-seul { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.barre-mobile.sombre { background: var(--marque-fonce); border-top-color: var(--marque); }
.barre-mobile.sombre a, .barre-mobile.sombre button { color: var(--encre-inverse-douce); }
.barre-mobile.sombre a:hover, .barre-mobile.sombre button:hover { background: var(--marque); color: var(--encre-inverse); }
.barre-mobile.sombre [aria-current="page"], .barre-mobile.sombre button[aria-expanded="true"] { background: var(--blanc); color: var(--marque); }
.barre-mobile.sombre :focus-visible { outline-color: var(--encre-inverse); }

/* Fil d'Ariane des pages de réglage du super-admin (retour vers l'accueil des réglages). */
.fil-ariane { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-3); font-size: var(--t-discret); color: var(--gris); }

/* À traiter (super-admin) : une ligne par rubrique, le nombre en tête, toute la ligne est un lien. */
.liste-a-traiter { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--e-3); }
.ligne-a-traiter { display: flex; align-items: center; gap: var(--e-5); padding: var(--e-4) var(--e-5); background: var(--blanc); border: var(--trait) solid var(--bord); border-left: var(--trait-epais) solid var(--accent); border-radius: var(--rayon-m); box-shadow: var(--ombre-carte); color: var(--encre); text-decoration: none; }
.ligne-a-traiter:hover { box-shadow: var(--ombre-survol); color: var(--encre); }
.nombre-a-traiter { min-width: var(--h-tactile); font: 800 var(--t-l)/1 var(--titre); color: var(--accent-fonce); text-align: center; }

/* Accueil des réglages : liste des réglages d'une carte, chacun avec sa phrase. */
.liste-reglages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--e-4); }
.liste-reglages li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--e-3); row-gap: var(--e-1); }
.liste-reglages a { font-weight: 600; }
.liste-reglages .discret { flex-basis: 100%; }

/* Réseaux sociaux (super-admin) : aperçu d'une publication par réseau, choix des images, vignettes des suggestions. */
.apercus-reseaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--larg-apercu-reseau)), 1fr)); gap: var(--e-5); }
.apercu-reseau { display: flex; flex-direction: column; gap: var(--e-3); padding: var(--e-4); background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon-m); box-shadow: var(--ombre-carte); }
.apercu-reseau-entete { display: flex; align-items: center; justify-content: space-between; gap: var(--e-3); font-weight: 600; }
.apercu-reseau-texte { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: var(--t-discret)/1.5 var(--texte); color: var(--encre); }
.apercu-reseau-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--larg-image-apercu), 1fr)); gap: var(--e-2); }
.apercu-reseau-images img, .choix-image img, .vignette-reseau { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--rayon-s); background: var(--photo-vide); }
.choix-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--larg-choix-image), 1fr)); gap: var(--e-3); }
.choix-image { display: flex; flex-direction: column; gap: var(--e-1); font-size: var(--t-discret); }
.vignette-reseau { width: var(--vignette-suggestion); height: var(--vignette-suggestion); flex: none; }
.ligne-suggestion { display: flex; align-items: center; gap: var(--e-4); flex-wrap: wrap; padding: var(--e-3) 0; border-bottom: var(--trait) solid var(--bord); }
.ligne-suggestion > div { flex: 1 1 var(--colonne-classement); min-width: 0; }

/* Espace éleveur, Parrainage : paliers du programme ambassadeur (seuil, avantage, état). */
.paliers-ambassadeur { display: flex; flex-direction: column; gap: var(--e-3); margin: 0; padding: 0; list-style: none; }
.palier-ambassadeur { display: flex; align-items: center; gap: var(--e-4); padding: var(--e-3) var(--e-4); border: var(--trait) solid var(--bord); border-radius: var(--rayon-s); background: var(--blanc); }
.palier-ambassadeur.obtenu { border-color: var(--ambassadeur); background: var(--ambassadeur-doux); }
.palier-seuil { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--puce-etape); height: var(--puce-etape); border-radius: var(--rayon-xs); background: var(--surface-creuse); color: var(--encre); font-weight: 600; }
.palier-ambassadeur.obtenu .palier-seuil { background: var(--ambassadeur); color: var(--encre-inverse); }
.palier-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--e-1); }

/* Tableau de pilotage (super-admin) et statistiques de l'espace éleveur : cartes d'indicateur, tendance, objectif
   (vert : atteint, corail : pas encore), petits graphiques en barres dessinés en SVG par le serveur. */
.grille-indicateurs { display: grid; gap: var(--e-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.indicateur { gap: var(--e-2); }
.indicateur .etiquette { margin: 0; font: 600 var(--t-texte-s) var(--texte); color: var(--encre-douce); }
.indicateur.atteint { border-color: var(--ok); }
.indicateur.manque { border-color: var(--accent); }
.indicateur-valeur { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--e-3); }
.indicateur-valeur strong { font: 800 var(--t-xl)/1.1 var(--titre); color: var(--marque); }
.tendance { font-size: var(--t-discret); font-weight: 600; color: var(--gris); }
.tendance.hausse { color: var(--ok); }
.tendance.baisse { color: var(--accent-fonce); }
.objectif.atteint { color: var(--ok); font-weight: 600; }
.objectif.manque { color: var(--accent-fonce); font-weight: 600; }
.barres { display: block; width: 100%; height: var(--h-champ); }
.barres rect { fill: var(--marque); }
.barres rect.atteint { fill: var(--ok); }
.barres rect.manque { fill: var(--accent); }
.barres rect.en-cours { stroke: var(--encre); stroke-width: var(--trait); stroke-dasharray: 3 2; }
.barres rect:hover { fill: var(--marque-fonce); }
.barres .ligne-objectif { stroke: var(--encre-douce); stroke-width: var(--trait); stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.tableau-pilotage th[scope="row"] { white-space: nowrap; font-weight: 500; }
.tableau-pilotage td.objectif { font-weight: 600; }
.comparaison-mois { display: grid; gap: var(--e-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }

/* Messagerie entre visiteurs et élevages (espace éleveur, page publique du visiteur, modération) : fil repris du support */
.fil-message.prudence .fil-bulle { border: var(--trait-epais) solid var(--alerte); }
.fil-signal { font-size: var(--t-texte-xs); color: var(--alerte); font-weight: 600; }
.conversation-ligne { display: flex; flex-direction: column; gap: var(--e-2); text-decoration: none; color: var(--encre); }
.conversation-ligne.non-lue { background: var(--non-lu); }
.conversation-extrait { color: var(--encre-douce); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Super-admin, En direct : choix entre la liste et la carte vivante. */
.direct-vues { display: flex; gap: var(--e-3); flex-wrap: wrap; }
.direct-vue { display: flex; flex-direction: column; gap: var(--e-1); min-height: var(--h-tactile); padding: var(--e-3) var(--e-5); border: var(--trait-fort) solid var(--bord); border-radius: var(--rayon-m); background: var(--blanc); color: var(--encre); text-decoration: none; }
.direct-vue strong { font: 700 var(--t-texte-s) var(--titre); }
.direct-vue:hover { border-color: var(--marque); }
.direct-vue.active { background: var(--marque); border-color: var(--marque); color: var(--encre-inverse); }
.direct-vue.active .discret { color: var(--encre-inverse-douce); }
/* Téléphone : les deux vues côte à côte, sans leur phrase d'aide. */
@media (max-width: 560px) { .direct-vue { flex: 1; justify-content: center; } .direct-vue .discret { display: none; } }

/* Carte vivante : scène sombre (SVG dessiné par carte-vivante.js), panneau de détail, infobulle, état vide, version texte. */
.carte-outils { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e-3) var(--e-5); }
.carte-vivante { display: flex; flex-direction: column; gap: var(--e-3); }
.carte-scene { position: relative; display: flex; border-radius: var(--rayon-l); overflow: hidden; background: radial-gradient(ellipse at 50% 42%, var(--carte-fond-clair), var(--carte-fond) 55%, var(--carte-fond-profond)); box-shadow: var(--ombre-carte); }
.carte-svg { display: block; flex: 1 1 auto; min-width: 0; width: 100%; height: var(--h-carte); touch-action: manipulation; }
.carte-maj { margin: 0; }
/* Plein écran (carte-vivante.js) : le cadre (durées, carte, panneau) prend tout l'écran ; la carte se redessine à sa nouvelle taille. */
.carte-cadre { display: flex; flex-direction: column; gap: var(--e-3); }
.carte-cadre.plein-ecran { padding: var(--e-4); background: var(--fond); overflow: auto; box-sizing: border-box; }
.carte-cadre.plein-ecran-repli { position: fixed; inset: 0; z-index: var(--z-plein-ecran); }
.carte-cadre.plein-ecran .carte-vivante { flex: 1 1 auto; min-height: 0; }
.carte-cadre.plein-ecran .carte-scene { flex: 1 1 auto; min-height: 0; }
.carte-cadre.plein-ecran .carte-svg { height: auto; min-height: 0; }
.carte-cadre.plein-ecran .carte-texte { display: none; }
html.carte-plein-ecran { overflow: hidden; }
.carte-svg text { font-family: var(--titre); fill: var(--carte-texte); paint-order: stroke; stroke: var(--carte-halo); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; user-select: none; }
.carte-anneau { fill: none; stroke: var(--carte-trait); stroke-width: var(--trait-fort); stroke-dasharray: 3 8; }
.carte-legende { font-size: var(--t-mini); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; fill: var(--carte-texte-doux); stroke: none; }
.carte-degrade-haut { stop-color: var(--carte-centre-haut); }
.carte-degrade-bas { stop-color: var(--carte-centre-bas); }
.carte-centre { pointer-events: none; }
.carte-centre-disque { fill: url(#carte-degrade-centre); stroke: var(--carte-texte-doux); stroke-width: var(--trait-epais); }
.carte-centre-halo { fill: none; stroke: var(--carte-centre-haut); stroke-opacity: .5; stroke-width: var(--trait-epais); }
.carte-centre-nombre { font-weight: 800; stroke: none; }
.carte-centre-libelle { font-size: var(--t-discret); font-weight: 600; fill: var(--carte-texte-doux); stroke: none; }
.carte-centre-sous { font-size: var(--t-mini); fill: var(--carte-texte-doux); stroke: none; }
.est-vide .carte-centre-halo { stroke-opacity: .85; }

.carte-noeud { --teinte: var(--famille-autre); cursor: pointer; outline: none; transition: opacity var(--mouvement); }
.carte-noeud.attenue { opacity: .26; }
.carte-lueur { fill: var(--teinte); opacity: .14; }
.carte-bulle { fill: var(--teinte); stroke: var(--carte-texte-doux); stroke-width: var(--trait); }
.carte-reflet { fill: var(--carte-reflet); }
.carte-compte { font-weight: 800; fill: var(--carte-encre-bulle); stroke: none; }
.carte-libelle { font-size: var(--t-texte-xs); font-weight: 700; transition: opacity var(--mouvement); }
.carte-libelle.attenue { opacity: .3; }
.carte-libelle.vide { fill: var(--carte-texte-doux); }
.carte-noeud:focus-visible .carte-bulle, .carte-noeud.choisi .carte-bulle { stroke: var(--carte-texte); stroke-width: 3px; }
.carte-noeud.choisi .carte-lueur { opacity: .38; }
.carte-type, .carte-source { --teinte: var(--type-autres); }
.carte-type .carte-bulle, .carte-source .carte-bulle { fill-opacity: .24; stroke: var(--teinte); stroke-width: 2.5px; }
.carte-source .carte-bulle { stroke-dasharray: 5 4; }
.carte-type .carte-lueur, .carte-source .carte-lueur, .carte-type .carte-reflet, .carte-source .carte-reflet { display: none; }
.carte-type .carte-compte, .carte-source .carte-compte { fill: var(--carte-texte); stroke: var(--carte-halo); stroke-width: 2px; }
.carte-noeud.vide .carte-bulle { opacity: .55; }

.carte-flux-ligne { --teinte: var(--carte-flux); fill: none; stroke: var(--teinte); stroke-linecap: round; opacity: .36; transition: opacity var(--mouvement); }
.carte-flux-ligne.lie { opacity: .95; }
.avec-selection .carte-flux-ligne:not(.lie) { opacity: .05; }
.carte-point { fill: var(--carte-point); }
.avec-selection .carte-point:not(.lie) { opacity: 0; }
.est-statique .carte-points, .est-statique .carte-ondes { display: none; }
.carte-onde { fill: none; stroke: var(--teinte); stroke-width: 3px; }

.fam-accueil { --teinte: var(--famille-accueil); }
.fam-recherche { --teinte: var(--famille-recherche); }
.fam-annonce { --teinte: var(--famille-annonce); }
.fam-annuaire { --teinte: var(--famille-annuaire); }
.fam-elevage { --teinte: var(--famille-elevage); }
.fam-race { --teinte: var(--famille-race); }
.fam-portees { --teinte: var(--famille-portees); }
.fam-guides { --teinte: var(--famille-guides); }
.fam-outils { --teinte: var(--famille-outils); }
.fam-tarifs { --teinte: var(--famille-tarifs); }
.fam-fondateurs { --teinte: var(--famille-fondateurs); }
.fam-inscription { --teinte: var(--famille-inscription); }
.fam-connexion { --teinte: var(--famille-connexion); }
.fam-gestion { --teinte: var(--famille-gestion); }
.fam-admin { --teinte: var(--famille-admin); }
.fam-minisite { --teinte: var(--famille-minisite); }
.fam-autre { --teinte: var(--famille-autre); }
.type-humains { --teinte: var(--type-humains); }
.type-connectes { --teinte: var(--type-connectes); }
.type-moteurs { --teinte: var(--type-moteurs); }
.type-ia { --teinte: var(--type-ia); }
.type-autres { --teinte: var(--type-autres); }
.src-direct { --teinte: var(--source-direct); }
.src-retour { --teinte: var(--source-retour); }
.src-moteur { --teinte: var(--source-moteur); }
.src-social { --teinte: var(--source-social); }
.src-ia { --teinte: var(--source-ia); }
.src-site { --teinte: var(--source-site); }

.carte-infobulle { position: absolute; top: 0; left: 0; z-index: 3; display: flex; flex-direction: column; gap: var(--e-1); max-width: var(--larg-infobulle); padding: var(--e-3) var(--e-4); border: var(--trait) solid var(--carte-trait); border-radius: var(--rayon-s); background: var(--carte-panneau-fond); color: var(--carte-texte); font-size: var(--t-texte-xs); pointer-events: none; overflow-wrap: anywhere; }
.carte-infobulle[hidden] { display: none; }
.carte-vide { position: absolute; left: 50%; top: 64%; z-index: 1; display: flex; flex-direction: column; gap: var(--e-2); width: min(88%, 520px); transform: translateX(-50%); text-align: center; color: var(--carte-texte-doux); pointer-events: none; }
.carte-vide strong { font: 700 var(--t-m) var(--titre); color: var(--carte-texte); }
.carte-vide[hidden] { display: none; }

.carte-panneau { display: flex; flex-direction: column; gap: var(--e-4); flex: none; width: var(--larg-panneau-carte); max-height: var(--h-carte); overflow-y: auto; padding: var(--e-5); border-left: var(--trait) solid var(--carte-trait); background: var(--carte-panneau-fond); color: var(--carte-texte); font-size: var(--t-texte-s); }
.carte-panneau[hidden] { display: none; }
.carte-panneau:focus-visible { outline: none; }
.carte-panneau-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--e-3); }
.carte-panneau h2 { margin: 0; font: 700 var(--t-m) var(--titre); color: var(--carte-texte); }
.carte-panneau h3 { margin: 0 0 var(--e-2); font: 700 var(--t-texte-xs) var(--titre); letter-spacing: .06em; text-transform: uppercase; color: var(--carte-texte-doux); }
.carte-panneau-resume { margin: 0; color: var(--carte-texte-doux); }
.carte-panneau ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--e-2); }
.carte-panneau li { display: flex; justify-content: space-between; gap: var(--e-3); overflow-wrap: anywhere; }
.carte-panneau li strong { flex: none; font-variant-numeric: tabular-nums; }
.carte-panneau-vide { margin: 0; font-size: var(--t-discret); color: var(--carte-texte-doux); }
.carte-panneau-fermer { flex: none; width: var(--h-tactile); height: var(--h-tactile); margin: calc(var(--e-3) * -1) calc(var(--e-3) * -1) 0 0; border: 0; border-radius: var(--rayon-rond); background: var(--voile-puce-claire); color: var(--carte-texte); font: 400 var(--t-xl) var(--titre); line-height: 1; cursor: pointer; }
.carte-panneau-fermer:hover { background: var(--voile-bouton-clair); }
@media (max-width: 767px) {
  .carte-scene { flex-direction: column; }
  .carte-panneau { width: auto; max-height: none; border-left: 0; border-top: var(--trait) solid var(--carte-trait); }
  .carte-vide { top: 60%; }
}
.carte-texte { border: var(--trait) solid var(--bord); border-radius: var(--rayon); background: var(--blanc); padding: var(--e-2) var(--e-5) var(--e-4); }
.carte-texte summary { display: flex; align-items: center; min-height: var(--h-tactile); font: 700 var(--t-texte-s) var(--titre); cursor: pointer; }
.carte-texte-corps { display: flex; flex-direction: column; gap: var(--e-4); }
.carte-texte-corps p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .carte-noeud, .carte-libelle, .carte-flux-ligne { transition: none; } }

/* Tableau de bord en direct : panneaux sombres (SVG et barres dessinés par tableau-en-direct.js), voyant de fraîcheur, plein écran.
   Les tailles suivent l'échelle --echelle (jetons --echelle-tableau*), pour un écran de contrôle lisible de loin. */
.tableau-cadre { --echelle: var(--echelle-tableau); --tb-2: calc(var(--e-2) * var(--echelle)); --tb-3: calc(var(--e-3) * var(--echelle)); --tb-4: calc(var(--e-4) * var(--echelle)); --tb-5: calc(var(--e-5) * var(--echelle)); --tb-6: calc(var(--e-6) * var(--echelle)); --tb-t-discret: calc(var(--t-discret) * var(--echelle)); --tb-t-texte: calc(var(--t-texte-s) * var(--echelle)); --tb-t-corps: calc(var(--t-corps) * var(--echelle)); --tb-t-m: calc(var(--t-m) * var(--echelle)); --tb-geant: calc(var(--t-geant) * var(--echelle)); --tb-chiffre: calc(var(--t-chiffre) * var(--echelle)); --tb-chiffre-s: calc(var(--t-chiffre-s) * var(--echelle)); --tb-barre: calc(var(--h-barre-tableau) * var(--echelle)); --tb-pile: calc(var(--h-pile-tableau) * var(--echelle)); display: flex; flex-direction: column; gap: var(--tb-4); box-sizing: border-box; padding: var(--tb-5); border-radius: var(--rayon-l); background: var(--tableau-fond); color: var(--tableau-texte); font-family: var(--texte); font-size: var(--tb-t-corps); line-height: var(--interligne-tableau); }
.tableau-cadre.plein-ecran { width: 100%; height: 100%; border-radius: 0; overflow: auto; }
.tableau-cadre.plein-ecran-repli { position: fixed; inset: 0; z-index: var(--z-plein-ecran); height: auto; }
html.tableau-plein-ecran { overflow: hidden; }
@media (min-height: 1300px) { .tableau-cadre.plein-ecran { --echelle: var(--echelle-tableau-large); } }
@media (min-height: 1900px) { .tableau-cadre.plein-ecran { --echelle: var(--echelle-tableau-immense); } }

.tableau-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tb-3) var(--tb-5); }
.tableau-identite { display: flex; flex-direction: column; gap: var(--e-1); min-width: 0; }
.tableau-nom { font: 800 var(--tb-t-m) var(--titre); }
.tableau-sous-titre { font-size: var(--tb-t-discret); color: var(--tableau-texte-doux); }
.tableau-outils { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-3) var(--tb-4); }
.tableau-fenetres { display: flex; flex-wrap: wrap; gap: var(--tb-2); }
.tableau-puce, .tableau-bouton { display: inline-flex; align-items: center; justify-content: center; min-height: var(--h-tactile); padding: 0 var(--tb-5); border: var(--trait-fort) solid var(--tableau-bord); border-radius: var(--rayon-pilule); background: transparent; color: var(--tableau-texte-doux); font: 600 var(--tb-t-discret) var(--texte); text-decoration: none; cursor: pointer; transition: border-color var(--mouvement-rapide), color var(--mouvement-rapide); }
.tableau-puce:hover, .tableau-bouton:hover { border-color: var(--tableau-texte-doux); color: var(--tableau-texte); }
.tableau-puce.active, .tableau-bouton[aria-pressed="true"] { border-color: var(--tableau-texte); background: var(--tableau-texte); color: var(--tableau-fond); }
.tableau-puce:focus-visible, .tableau-bouton:focus-visible, .tableau-graphique:focus-visible { outline: var(--trait-epais) solid var(--tableau-texte); outline-offset: var(--e-1); }
.tableau-bouton[hidden] { display: none; }
.tableau-maj { display: inline-flex; align-items: center; gap: var(--tb-3); margin: 0; font-size: var(--tb-t-discret); color: var(--tableau-texte-doux); }
.tableau-voyant { flex: none; width: var(--e-4); height: var(--e-4); border-radius: var(--rayon-rond); background: var(--tableau-ok); }
.tableau-voyant[data-etat="alerte"] { border-radius: 0; background: var(--tableau-alerte); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tableau-voyant[data-etat="pause"], .tableau-voyant[data-etat="attente"] { background: transparent; box-shadow: inset 0 0 0 var(--trait-epais) var(--tableau-texte-discret); }
.tableau-maj[data-etat="alerte"] { color: var(--tableau-texte); font-weight: 700; }

.tableau-grille { display: grid; gap: var(--tb-4); grid-template-columns: minmax(0, 1fr); }
.tableau-panneau { position: relative; display: flex; flex-direction: column; gap: var(--tb-3); min-width: 0; padding: var(--tb-5); border: var(--trait) solid var(--tableau-bord); border-radius: var(--rayon-m); background: var(--tableau-panneau); }
.tableau-entete { display: flex; flex-direction: column; gap: var(--e-1); }
.tableau-titre { margin: 0; font: 700 var(--tb-t-texte) var(--titre); letter-spacing: .06em; text-transform: uppercase; color: var(--tableau-texte-doux); }
.tableau-note { margin: 0; font-size: var(--tb-t-discret); color: var(--tableau-texte-discret); }
.tableau-legende { font-size: var(--tb-t-texte); color: var(--tableau-texte-doux); }
.tableau-nombre { font-weight: 800; font-family: var(--titre); }
.tableau-geant { display: flex; align-items: center; gap: var(--tb-4); margin: 0; font-size: var(--tb-geant); line-height: 1; }
.tableau-hero .tableau-secondaire { margin: 0; font-size: var(--tb-t-m); color: var(--tableau-texte-doux); }
.tableau-hero .tableau-secondaire .tableau-nombre { font-size: var(--tb-chiffre-s); color: var(--tableau-texte); }
.tableau-pouls { position: relative; flex: none; width: var(--e-4); height: var(--e-4); border-radius: var(--rayon-rond); background: var(--serie-1); }
.tableau-pouls::after { content: ""; position: absolute; inset: 0; border-radius: var(--rayon-rond); border: var(--trait-epais) solid var(--serie-1); animation: tableau-pouls var(--duree-pouls) ease-out infinite; }
@keyframes tableau-pouls { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

.tableau-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tb-4); }
.tableau-chiffre { display: flex; flex-direction: column; gap: var(--e-2); min-width: 0; }
.tableau-chiffre .tableau-nombre { font-size: var(--tb-chiffre); line-height: 1.05; }
.tableau-delta { display: inline-flex; align-items: center; gap: var(--tb-2); font-size: var(--tb-t-discret); color: var(--tableau-texte-doux); }
.tableau-delta[data-sens]::before { content: ""; flex: none; width: var(--e-4); height: var(--e-4); background: var(--tableau-texte-discret); }
.tableau-delta[data-sens="hausse"]::before { background: var(--tableau-ok); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tableau-delta[data-sens="baisse"]::before { background: var(--tableau-attention); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tableau-delta[data-sens="egal"]::before { clip-path: polygon(0 35%, 100% 35%, 100% 65%, 0 65%); }

.tableau-graphique { position: relative; flex: 1 1 auto; min-height: calc(var(--h-courbe-tableau) * var(--echelle)); border-radius: var(--rayon-xs); touch-action: manipulation; }
.tableau-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; font-family: var(--texte); font-size: var(--tb-t-discret); overflow: visible; }
.tableau-degrade-haut { stop-color: var(--serie-1); stop-opacity: var(--tableau-aire-haut); }
.tableau-degrade-bas { stop-color: var(--serie-1); stop-opacity: var(--tableau-aire-bas); }
.tableau-courbe-aire { fill: url(#tableau-degrade-aire); }
.tableau-courbe-ligne { fill: none; stroke: var(--serie-1); stroke-width: var(--trait-epais); stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.tableau-repere-ligne { stroke: var(--tableau-repere); stroke-width: var(--trait); shape-rendering: crispEdges; }
.tableau-axe-ligne { stroke: var(--tableau-axe); stroke-width: var(--trait); shape-rendering: crispEdges; }
.tableau-graduation { fill: var(--tableau-texte-discret); font-size: var(--tb-t-discret); }
.tableau-point { fill: var(--serie-1); stroke: var(--tableau-panneau); stroke-width: var(--trait-epais); }
.tableau-max-texte { fill: var(--tableau-texte); font-size: var(--tb-t-discret); font-weight: 700; paint-order: stroke; stroke: var(--tableau-panneau); stroke-width: var(--e-2); stroke-linejoin: round; }
.tableau-curseur { stroke: var(--tableau-curseur); stroke-width: var(--trait); }
.tableau-courbe-aire, .tableau-courbe-ligne { transition: opacity var(--duree-tableau) ease, stroke-dashoffset var(--duree-tableau) ease; }
.tableau-svg.est-neuf .tableau-courbe-ligne { stroke-dashoffset: 1; }
.tableau-svg.est-neuf .tableau-courbe-aire { opacity: 0; }
.tableau-infobulle { position: absolute; top: 0; left: 0; z-index: 3; display: flex; flex-direction: column; gap: var(--e-1); min-width: max-content; padding: var(--tb-3) var(--tb-4); border: var(--trait) solid var(--tableau-bord); border-radius: var(--rayon-s); background: var(--carte-panneau-fond); color: var(--tableau-texte); font-size: var(--tb-t-discret); pointer-events: none; }
.tableau-infobulle[hidden] { display: none; }
.tableau-infobulle strong { font: 800 var(--tb-t-texte) var(--titre); }
.tableau-infobulle span { color: var(--tableau-texte-doux); }
.tableau-sans-donnee { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: var(--tableau-texte-discret); font-size: var(--tb-t-texte); pointer-events: none; }
.tableau-sans-donnee[hidden] { display: none; }

.tableau-barres { display: flex; flex-direction: column; gap: var(--tb-3); margin: 0; padding: 0; list-style: none; }
.tableau-barre-ligne { display: flex; align-items: center; gap: var(--tb-4); min-width: 0; }
.tableau-barres.dense { gap: var(--tb-2); }
.tableau-barre-nom { flex: 0 0 var(--larg-nom-barre); min-width: 0; overflow-wrap: anywhere; font-size: var(--tb-t-texte); font-weight: 600; color: var(--tableau-texte); }
.tableau-barre-piste { flex: 1 1 auto; min-width: 0; height: var(--tb-barre); border-radius: var(--rayon-donnee); background: var(--tableau-repere); overflow: hidden; }
.tableau-barre-remplissage { display: block; width: calc(var(--part, 0) * 1%); height: 100%; border-radius: 0 var(--rayon-donnee) var(--rayon-donnee) 0; background: var(--teinte, var(--serie-1)); transition: width var(--duree-tableau) ease; }
.tableau-barre-valeur { flex: 0 0 var(--larg-valeur-barre); display: flex; align-items: baseline; justify-content: flex-end; gap: var(--tb-2); font-size: var(--tb-t-texte); font-variant-numeric: tabular-nums; }
.tableau-barre-valeur strong { font-weight: 800; color: var(--tableau-texte); }
.tableau-barre-part { color: var(--tableau-texte-discret); font-size: var(--tb-t-discret); }

.tableau-pile { display: flex; gap: var(--e-1); height: var(--tb-pile); }
.tableau-segment { flex: var(--part, 0) 1 0; min-width: 0; border-radius: var(--rayon-donnee); background: var(--teinte); transition: flex-grow var(--duree-tableau) ease; }
.tableau-segment[hidden] { display: none; }
.tableau-pile.vide { border-radius: var(--rayon-donnee); background: var(--tableau-repere); }
.tableau-legendes { display: flex; flex-direction: column; gap: var(--tb-2); margin: 0; padding: 0; list-style: none; }
.tableau-legende-ligne { display: flex; align-items: baseline; gap: var(--tb-3); font-size: var(--tb-t-texte); font-variant-numeric: tabular-nums; }
.tableau-pastille { flex: none; align-self: center; width: var(--e-4); height: var(--e-4); border-radius: var(--rayon-donnee); background: var(--teinte); }
.tableau-legende-nom { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: var(--tableau-texte-doux); }
.tableau-legende-ligne strong { font-weight: 800; color: var(--tableau-texte); }
.tableau-legende-part { flex: 0 0 var(--larg-valeur-barre); text-align: right; color: var(--tableau-texte-discret); font-size: var(--tb-t-discret); }

.tableau-serie-humains { --teinte: var(--serie-1); }
.tableau-serie-connectes { --teinte: var(--serie-2); }
.tableau-serie-moteurs { --teinte: var(--serie-3); }
.tableau-serie-ia { --teinte: var(--serie-4); }
.tableau-serie-autres { --teinte: var(--serie-5); }
.tableau-etape-1 { --teinte: var(--etape-1); }
.tableau-etape-2 { --teinte: var(--etape-2); }
.tableau-etape-3 { --teinte: var(--etape-3); }
.tableau-etape-4 { --teinte: var(--etape-4); }
.tableau-etape-5 { --teinte: var(--etape-5); }

.tableau-entonnoir-tete, .tableau-entonnoir-ligne { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) var(--larg-chiffre-tableau) var(--larg-chiffre-tableau); align-items: center; gap: var(--tb-3); }
.tableau-entonnoir-tete { margin: 0; font-size: var(--tb-t-discret); color: var(--tableau-texte-discret); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.tableau-entonnoir-tete span:nth-child(n+3), .tableau-entonnoir-ligne .tableau-nombre { text-align: right; }
.tableau-entonnoir-ligne { font-size: var(--tb-t-texte); font-variant-numeric: tabular-nums; }
.tableau-entonnoir-nom { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.tableau-entonnoir-ligne .tableau-nombre { font-size: var(--tb-t-m); color: var(--tableau-texte); }
.tableau-entonnoir-ligne .tableau-nombre.discret { font-size: var(--tb-t-texte); font-weight: 600; color: var(--tableau-texte-doux); }
.tableau-entonnoir-ligne .tableau-nombre[data-indisponible] { color: var(--tableau-texte-discret); font-weight: 400; }

.tableau-jauge { height: var(--tb-barre); border-radius: var(--rayon-donnee); background: var(--tableau-repere); overflow: hidden; }
.tableau-jauge-remplissage { display: block; width: calc(var(--part, 0) * 1%); height: 100%; border-radius: 0 var(--rayon-donnee) var(--rayon-donnee) 0; background: var(--serie-1); transition: width var(--duree-tableau) ease; }
.tableau-jauge[data-etat="plein"] .tableau-jauge-remplissage { background: var(--tableau-attention); }
.tableau-envois { display: flex; align-items: baseline; gap: var(--tb-3); margin: 0; font-size: var(--tb-t-texte); color: var(--tableau-texte-doux); }
.tableau-envois .tableau-nombre { font-size: var(--tb-chiffre); line-height: 1.05; color: var(--tableau-texte); }
.tableau-compteurs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tb-3) var(--tb-4); margin: 0; }
.tableau-compteurs div { display: flex; flex-direction: column; gap: var(--e-1); min-width: 0; }
.tableau-compteurs dt { font-size: var(--tb-t-discret); color: var(--tableau-texte-discret); }
.tableau-compteurs dd { margin: 0; font: 800 var(--tb-chiffre-s) var(--titre); color: var(--tableau-texte); }
.tableau-etat { display: flex; align-items: center; gap: var(--tb-3); margin: 0; font-size: var(--tb-t-texte); font-weight: 600; color: var(--tableau-texte); }
.tableau-etat::before { content: ""; flex: none; width: var(--e-4); height: var(--e-4); border-radius: var(--rayon-rond); background: var(--tableau-ok); }
.tableau-etat[data-etat="attention"]::before { border-radius: 0; background: var(--tableau-attention); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.tableau-etat[data-etat="alerte"]::before { border-radius: 0; background: var(--tableau-alerte); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tableau-etat[data-etat="neutre"]::before { background: transparent; box-shadow: inset 0 0 0 var(--trait-epais) var(--tableau-texte-discret); }
.tableau-sante-nombre { margin: 0; font-size: var(--tb-chiffre); line-height: 1.05; }

/* Inscriptions (entonnoir réel) et e-mails : motifs principaux, et cadre d'alerte d'un panneau (jamais la couleur seule : le libellé et la forme du voyant le disent aussi). */
.tableau-motifs { display: flex; flex-direction: column; gap: var(--tb-3); margin: 0; padding: 0; list-style: none; font-size: var(--tb-t-texte); }
.tableau-motifs[hidden] { display: none; }
.tableau-motif { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tb-3); color: var(--tableau-texte-doux); }
.tableau-motif-nom { min-width: 0; overflow-wrap: anywhere; }
.tableau-motif .tableau-nombre { flex: none; font-size: var(--tb-t-m); color: var(--tableau-texte); }
.tableau-panneau[data-niveau="alerte"] { border-color: var(--tableau-alerte); box-shadow: inset 0 0 0 var(--trait) var(--tableau-alerte); }
.tableau-panneau[data-niveau="attention"] { border-color: var(--tableau-attention); }

.tableau-vide { margin: 0; color: var(--tableau-texte-discret); font-size: var(--tb-t-texte); }
.tableau-vide[hidden] { display: none; }
.tableau-panneau[data-etat="indisponible"] > :not(.tableau-titre, .tableau-entete, .tableau-vide) { display: none; }
.tableau-panneau[data-etat="indisponible"] .tableau-entete > :not(.tableau-titre) { display: none; }

/* Écran large : douze colonnes, trois rangées ; en plein écran les rangées se partagent la hauteur. */
@media (min-width: 768px) {
  .tableau-grille { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tableau-grille > .tableau-hero, .tableau-grille > .tableau-courbe, .tableau-grille > .tableau-entonnoir, .tableau-grille > .tableau-inscriptions, .tableau-grille > .tableau-prospection { grid-column: span 6; }
  .tableau-grille > :not(.tableau-hero, .tableau-courbe, .tableau-entonnoir, .tableau-inscriptions, .tableau-prospection) { grid-column: span 3; }
}
@media (min-width: 1200px) {
  .tableau-grille { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tableau-grille > .tableau-hero { grid-column: span 4; }
  .tableau-grille > .tableau-courbe { grid-column: span 8; }
  .tableau-grille > .tableau-jour, .tableau-grille > .tableau-types, .tableau-grille > .tableau-prospection { grid-column: span 3; }
  .tableau-grille > .tableau-provenance, .tableau-grille > .tableau-entonnoir { grid-column: span 4; }
  .tableau-grille > .tableau-pages, .tableau-grille > .tableau-inscriptions { grid-column: span 5; }
  .tableau-grille > .tableau-courriels { grid-column: span 5; }
  .tableau-grille > .tableau-sante { grid-column: span 4; }
  .tableau-cadre.plein-ecran .tableau-grille { flex: 1 1 auto; }
}
/* Téléphone : l'entonnoir passe la barre sous le nom pour que les noms restent lisibles. */
@media (max-width: 560px) {
  .tableau-entonnoir-tete, .tableau-entonnoir-ligne { grid-template-columns: minmax(0, 1fr) var(--larg-chiffre-tableau) var(--larg-chiffre-tableau); }
  .tableau-entonnoir-tete span:nth-child(2) { display: none; }
  .tableau-entonnoir-ligne .tableau-barre-piste { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .tableau-puce, .tableau-bouton, .tableau-barre-remplissage, .tableau-jauge-remplissage, .tableau-segment, .tableau-courbe-aire, .tableau-courbe-ligne { transition: none; }
  .tableau-pouls::after { animation: none; display: none; }
  .tableau-svg.est-neuf .tableau-courbe-ligne { stroke-dashoffset: 0; }
  .tableau-svg.est-neuf .tableau-courbe-aire { opacity: 1; }
}



/* Mini-sites des élevages. */

/* Mini-site */
.bandeau-site { background: var(--marque-fonce); color: var(--encre-inverse-douce); font: 600 var(--t-mini) var(--titre); letter-spacing: .04em; text-transform: uppercase; padding: 8px 0; }
.bandeau-site .conteneur { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-entete .nav { gap: 0; }
.site-entete .nav a { padding: 0 var(--e-3); font-size: var(--t-discret); }
.site-entete .marque strong { max-width: 14ch; line-height: 1.15; }
.photo-vedette { background: var(--blanc); padding: 8px; border-radius: var(--rayon-l); box-shadow: var(--ombre-flottante); display: flex; flex-direction: column; gap: 8px; max-width: 360px; justify-self: center; }
.photo-vedette img, .photo-vedette .vide-photo { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border-radius: var(--rayon-m); background: var(--photo-vide); }
.photo-vedette .mono { padding: 0 8px 8px; color: var(--encre-douce); }
.heros-site { background: var(--marque-douce); padding: clamp(32px, 6vw, 64px) 0; }
.heros-site .conteneur { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 860px) { .heros-site .conteneur { grid-template-columns: 1fr; } }
.histoire { border-left: 4px solid var(--accent); padding: 4px 0 4px 16px; display: flex; flex-direction: column; gap: 6px; }
details.question { background: var(--blanc); border: var(--trait) solid var(--bord); border-radius: var(--rayon-m); margin-bottom: var(--e-3); }
details.question summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; font: 700 var(--t-xs) var(--titre); list-style: none; }
details.question summary::-webkit-details-marker { display: none; }
details.question summary::after { content: '+'; flex: none; width: 32px; height: 32px; border-radius: var(--rayon-rond); background: var(--marque-douce); color: var(--marque); display: grid; place-items: center; font: 700 var(--t-m) var(--titre); }
details.question[open] summary::after { content: '\2212'; }
details.question[open] { box-shadow: var(--ombre-carte); }
details.question p { padding: 0 18px 16px; color: var(--encre-douce); }
/* Bloc de contact : largeur de lecture du formulaire. */
.mesure-contact { max-width: 640px; }
/* Lien qui se présente comme un bloc (photo en vedette). */
.sans-soulignement { text-decoration: none; }
/* « Nos reproducteurs » : photo et identité du reproducteur, puis son pedigree et ses descendants. */
.reproducteur-entete { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: var(--e-6); align-items: start; }
.reproducteur-photo { display: block; border-radius: var(--rayon-m); overflow: hidden; background: var(--photo-vide); }
.reproducteur-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 560px) { .reproducteur-entete { grid-template-columns: 1fr; } .reproducteur-photo { max-width: 200px; } }
.descendants-portee { border-top: var(--trait) solid var(--bord); padding-top: var(--e-4); }
.descendants-portee p { margin: 0; }
/* Nom d'une portée (mère et père) dans la liste de l'accueil. */
.nom-portee { font: 700 var(--t-carte) var(--titre); }
/* Chapeau d'une page libre. */
.chapeau { font-size: var(--t-carte-s); }

@media print {
  .entete, .pied, .barre, .bouton, .bouton-contour, .no-print { display: none !important; }
  .espace { display: block; }
  body { background: var(--blanc); }
}

/* En-tête du mini-site sur téléphone : nom, Contact et Menu sur une seule ligne, sans déborder sur le bandeau. */
@media (max-width: 560px) {
  .site-entete .actions-entete { flex-wrap: nowrap; gap: var(--e-3); flex: none; }
  .site-entete .actions-entete .bouton { min-height: var(--h-tactile); padding: 0 16px; font-size: var(--t-texte-s); }
  .site-entete .marque { min-width: 0; }
  .site-entete .marque strong { font-size: var(--t-texte-s); overflow-wrap: anywhere; }
}



/* Documents imprimables (certificats, factures, registres) : lisibles en noir et blanc. */

/* Mise en page des documents imprimables (gabarit impression/_mise.php) */
.page-impression { background: var(--blanc); }
.feuille { max-width: 800px; margin: 0 auto; padding: 40px var(--e-7); display: flex; flex-direction: column; gap: 18px; }
.feuille table { width: 100%; border-collapse: collapse; }
.feuille td, .feuille th { padding: var(--e-3); border-bottom: var(--trait) solid var(--encre); text-align: left; }
.signature { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: var(--e-7); }
.signature div { border: var(--trait) solid var(--encre); border-radius: var(--rayon-xs); padding: var(--e-3); min-height: 90px; }
@media print { .feuille h1, .feuille h2 { color: var(--encre); } }



/* Cartes (Leaflet) : infobulles des annonces, des élevages et des professionnels. */

.bulle-fiche, .bulle-annonce { display: flex; gap: var(--e-4); align-items: center; color: var(--encre); text-decoration: none; font: 400 var(--t-discret)/1.4 var(--texte); }
.bulle-fiche:hover, .bulle-annonce:hover { color: var(--encre); }
.bulle-fiche > span, .bulle-annonce > span { display: flex; flex-direction: column; gap: var(--e-1); min-width: 0; }
.bulle-fiche strong, .bulle-annonce strong { font: 700 var(--t-corps)/1.25 var(--titre); }
.bulle-visuel, .bulle-annonce img, .bulle-vide { width: 64px; height: 64px; flex: none; object-fit: cover; border-radius: var(--rayon-s); background: var(--photo-vide); }
.bulle-visuel.logo { border-radius: var(--rayon-s); object-fit: contain; background: var(--blanc); border: var(--trait) solid var(--bord); }
.bulle-visuel.monogramme { border-radius: var(--rayon-s); display: grid; place-items: center; background: var(--marque); color: var(--encre-inverse); font: 800 var(--t-m) var(--titre); }
.bulle-detail { font-size: var(--t-texte-xs); color: var(--gris); }
.bulle-detail.accent { color: var(--accent-fonce); font-weight: 600; }
.bulle-lien { font-size: var(--t-texte-xs); font-weight: 600; color: var(--marque); }
.bulle-liste { display: flex; flex-direction: column; gap: var(--e-3); }
.bulle-titre { font: 700 var(--t-mini) var(--titre); letter-spacing: .04em; text-transform: uppercase; color: var(--gris); }
.bulle-liste .bulle-annonce + .bulle-annonce { border-top: var(--trait) solid var(--bord); padding-top: var(--e-3); }
.bulle-annonce img, .bulle-vide { width: 56px; height: 56px; }



/*
 * Utilitaires du système de design : ils remplacent les styles écrits dans les gabarits.
 * Règle : aucun attribut style="" dans les gabarits, sauf une valeur calculée (hauteur d'une barre de graphique).
 * Toutes les valeurs viennent des jetons.
 */

/* Titres : la taille suit l'échelle typographique, quel que soit le niveau HTML. */
.titre-page { font-size: var(--t-page); }
.titre-grand { font-size: var(--t-grand); }
.titre-xl { font-size: var(--t-xl); }
.titre-l { font-size: var(--t-l); }
.titre-section { font-size: var(--t-section); }
.titre-cadre { font-size: var(--t-cadre); }
.titre-m { font-size: var(--t-m); }
.titre-s { font-size: var(--t-s); }
.titre-xs { font-size: var(--t-xs); }
.texte-s { font-size: var(--t-texte-s); }
.texte-xs { font-size: var(--t-texte-xs); }
.gras { font-weight: 600; }
.pre-ligne { white-space: pre-line; }
.lien-herite, .lien-herite:hover { color: inherit; }
/* Texte réservé aux lecteurs d'écran : invisible, mais lu. */
.lecteur-seul { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Placement dans une pile ou une ligne (flex). */
.aligne-debut { align-self: flex-start; }
.aligne-centre { align-items: center; }
.aligne-fin { align-items: flex-end; }
.remplit { flex: 1; }
.remplit-large { flex: 1; min-width: min(100%, 220px); }
.ligne-entiere { flex-basis: 100%; }
.pousse-bas { margin-top: auto; }

/* Écarts entre éléments d'une pile ou d'une ligne. */
.ecart-0 { gap: 0; }
.ecart-1 { gap: var(--e-1); }
.ecart-2 { gap: var(--e-2); }
.ecart-3 { gap: var(--e-3); }
.ecart-4 { gap: var(--e-4); }
.ecart-5 { gap: var(--e-5); }
.ecart-6 { gap: var(--e-6); }

/* Marges. */
.sans-marge { margin: 0; }
.marge-haut { margin-top: var(--e-4); }
.marge-droite { margin-right: var(--e-4); }
.marge-titre { margin: var(--e-3) 0 0; }

/* Largeurs de lecture et de champ. */
.mesure-etroite { max-width: 480px; }
.mesure-moyenne { max-width: 560px; }
.mesure { max-width: 720px; }
.mesure-large { max-width: 820px; }
:is(input, select, textarea, .largeur-champ).largeur-champ-court, .largeur-champ-court { width: 100px; }
:is(input, select, textarea, .largeur-champ).largeur-champ-moyen, .largeur-champ-moyen { width: 160px; }
:is(input, select, textarea, .largeur-champ).largeur-champ-long, .largeur-champ-long { width: 220px; }
.largeur-max-champ { max-width: 200px; }
.pleine-largeur { width: 100%; }

/* Groupes de champs sans cadre (fieldset), éléments en ligne. */
.groupe-nu { border: 0; padding: 0; margin: 0; }
.en-ligne { display: inline; }
.cliquable { cursor: pointer; }
.encart-ample { padding: var(--e-6); }

/* Contenu d'un menu déroulant (details) dans un tableau. */
.menu-cellule { padding: var(--e-3) 0; min-width: min(100%, 260px); text-align: left; }

/* Images de petite taille (vignettes, logos dans l'administration). */
.vignette-logo { width: 48px; height: 48px; object-fit: contain; border: var(--trait) solid var(--bord); border-radius: var(--rayon-s); background: var(--blanc); }
.vignette-logo.grande { width: 64px; height: 64px; }
.vignette-image { width: 120px; border-radius: var(--rayon-s); }
.vignette-image.large { width: 160px; }
.image-cadre { width: 100%; border-radius: var(--rayon-s); }


