/**
 * [2026-05-01] AJOUT - Surcouche gnetresa pour la charte Front Dashboard v2.1.1
 *
 * CONTEXTE : Les styles du cartouche de page Front (header-card-v211) etaient
 *            dupliques dans BackOfficeContentBootstrap, avec des styles inline
 *            differents entre les branches avec et sans sidebar.
 * DESCRIPTION : Centralise le fond de page, le cartouche titre/meta/stepper et
 *               expose des variables CSS surchargeables par module.
 * DEPENDANCES :
 * - CSSFrontDashboardV211 / theme.min.css (Front Dashboard v2.1.1)
 * - BackOfficeContentBootstrap
 * - LastModifiedInfosBootstrap
 * - StepsDisplayerBootstrap
 * AUTEUR : Cursor AI
 * REFERENCE : Conversation Cursor du 2026-05-01
 *
 * NOTE : Ce fichier est une surcouche applicative gnetresa. Il ne fait pas
 * partie du theme Htmlstream natif ; une CSS module peut le surcharger en etant
 * chargee apres ce fichier via le binding frontDashboardModuleCSS.
 */

:root {
	--adns-front-v211-page-bg: #f0f4fb;
	--adns-front-v211-card-bg: #ffffff;
	--adns-front-v211-card-border: #e8edf5;
	--adns-front-v211-card-radius: 12px;
	--adns-front-v211-title-color: inherit;
	--adns-front-v211-badge-bg: #eef2ff;
	--adns-front-v211-badge-color: #5e6b82;
	--adns-front-v211-badge-border: #dde4f1;
	--adns-front-v211-meta-color: #8b97aa;
	--adns-front-v211-separator-color: #e6ebf3;
}

#webadnspage {
	background: var(--adns-front-v211-page-bg);
}

.header-card-v211 {
	background: var(--adns-front-v211-card-bg);
	border: 1px solid var(--adns-front-v211-card-border);
	border-radius: var(--adns-front-v211-card-radius);
}

.header-card-v211 .header-title {
	color: var(--adns-front-v211-title-color);
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.1;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.header-card-v211 .header-title-status .label,
.header-card-v211 .header-title-status .badge,
.header-card-v211 .header-title-badge {
	align-items: center;
	background: var(--adns-front-v211-badge-bg) !important;
	border: 1px solid var(--adns-front-v211-badge-border) !important;
	border-radius: 999px !important;
	color: var(--adns-front-v211-badge-color) !important;
	display: inline-flex;
	font-size: .72rem !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	padding: .22rem .55rem !important;
	vertical-align: middle;
	white-space: nowrap;
}

.header-card-v211 .header-title-status,
.header-card-v211 .header-title-status * {
	font-size: .72rem !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	white-space: nowrap;
}

.header-card-v211 .header-title-idbadge {
	align-items: center;
	background: var(--adns-front-v211-badge-bg);
	border: 1px solid var(--adns-front-v211-badge-border);
	border-radius: 999px;
	color: var(--adns-front-v211-badge-color);
	display: inline-flex;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1;
	padding: .22rem .55rem;
	white-space: nowrap;
}

.header-card-v211 .header-meta {
	color: var(--adns-front-v211-meta-color);
	font-size: .9rem;
}

.header-card-v211 .header-meta .pageDateModified {
	background: transparent;
	border: none;
	border-radius: 0;
	font-size: inherit;
	font-style: normal;
	padding: 0;
	text-align: left;
}

.header-card-v211 .header-meta .last-modified-infos-inner {
	font-size: 0.8125rem !important;
	font-weight: 400 !important;
	letter-spacing: 0.01em;
	text-transform: none;
}

.header-card-v211 .header-meta .last-modified-infos-inner a {
	color: inherit;
	font-weight: 400 !important;
	text-decoration: none;
	text-transform: none;
}

.header-card-v211 .header-meta .last-modified-infos-inner a:hover {
	text-decoration: underline;
}

.header-card-v211 .header-separator {
	border: 0;
	border-top: 1px solid var(--adns-front-v211-separator-color);
	margin: .35rem 0 .55rem 0;
}

.header-card-v211 .header-card-v211-stepper {
	margin-top: 1.35rem;
	padding-top: 0.4rem;
}

/**
 * [2026-05-30] AJOUT - Tokens et styles BackOfficeContentBootstrap V1.1
 *
 * CONTEXTE : Nouveaux bindings stateBadge, subTitleText, readOnlyLabel,
 *            contextLabel, titleSize, friendlyDate, showBreadcrumb.
 * DÉPENDANCES : BackOfficeContentBootstrap V1.1
 * AUTEUR : Cursor AI
 */

:root {
	/* Tailles titre */
	--bo-title-size-default: 2rem;
	--bo-title-size-compact: 1.1875rem;

	/* Badges état */
	--bo-badge-success-bg: #E1F5EE;
	--bo-badge-success-fg: #0F6E56;
	--bo-badge-warn-bg:    #FAEEDA;
	--bo-badge-warn-fg:    #854F0B;
	--bo-badge-danger-bg:  #FCE7E7;
	--bo-badge-danger-fg:  #B42318;
	--bo-badge-info-bg:    #DBEAFE;
	--bo-badge-info-fg:    #1E40AF;

	/* Badge lecture seule */
	--bo-readonly-bg:     #F9FAFB;
	--bo-readonly-border: #E5E7EB;
	--bo-readonly-fg:     #6B7280;

	/* Sous-titre + meta + context */
	--bo-subtitle-size:  0.75rem;
	--bo-subtitle-color: #6B7280;
	--bo-context-size:   0.625rem;
	--bo-context-color:  #9CA3AF;
}

/* Taille titre compact */
.header-card-v211 .header-title.bo-title-compact {
	font-size: var(--bo-title-size-compact);
}

/* Badge état contextuel */
.bo-badge-state {
	align-items: center;
	border-radius: 999px;
	display: inline-flex;
	font-size: .72rem;
	font-weight: 700;
	gap: .25rem;
	line-height: 1;
	padding: .22rem .6rem;
	white-space: nowrap;
}
.bo-badge-success { background: var(--bo-badge-success-bg); color: var(--bo-badge-success-fg); }
.bo-badge-warn    { background: var(--bo-badge-warn-bg);    color: var(--bo-badge-warn-fg); }
.bo-badge-danger  { background: var(--bo-badge-danger-bg);  color: var(--bo-badge-danger-fg); }
.bo-badge-info    { background: var(--bo-badge-info-bg);    color: var(--bo-badge-info-fg); }

/* Sous-titre */
.header-card-v211 .bo-subtitle {
	color: var(--bo-subtitle-color);
	font-size: var(--bo-subtitle-size);
	font-weight: 400;
	line-height: 1.3;
	margin-top: .15rem;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Badge lecture seule */
.bo-readonly-badge {
	align-items: center;
	background: var(--bo-readonly-bg);
	border: 1px solid var(--bo-readonly-border);
	border-radius: 999px;
	color: var(--bo-readonly-fg);
	display: inline-flex;
	font-size: .72rem;
	font-weight: 600;
	gap: .25rem;
	line-height: 1;
	padding: .2rem .55rem;
	white-space: nowrap;
}

/* Label contextuel pagination */
.bo-context-label {
	color: var(--bo-context-color);
	font-size: var(--bo-context-size);
	font-style: italic;
	letter-spacing: .01em;
	text-align: right;
}

/**
 * [2026-05-31] AJOUT V1.1.1 - Architecture en 2 niveaux + pagination compacte
 *
 * CONTEXTE : Correction audit visuel — le niveau 2 (meta-line) doit avoir un fond
 *            gris pâle séparé du niveau 1 par une ligne fine, et la pagination doit
 *            être réellement compacte (boutons 22px, input 34px) dans un container gris.
 * DÉPENDANCES : BackOfficeContentBootstrap.html (bande .bo-header-level-2), ListeNavigator.
 * AUTEUR : Antoine LAGIER / Cursor AI
 * RÉFÉRENCE : CDC_BackOfficeContentBootstrap_V1.1.md (règles 2, 8, 12)
 */

/* Séparateur fin entre niveau 1 et niveau 2 (pleine largeur) */
.header-card-v211 .bo-header-divider {
	border: 0;
	border-top: 1px solid var(--adns-front-v211-separator-color);
	margin: .25rem -1rem 0;
}
@media (min-width: 992px) {
	.header-card-v211 .bo-header-divider {
		margin-left: -1.5rem;
		margin-right: -1.5rem;
	}
}

/* Niveau 2 : meta-line à fond UNIFORME (V1.1.5, règle 13).
   PAS de fond différent du niveau 1 — seule la ligne .bo-header-divider sépare.
   Le fond gris de r13397 a été retiré (effet "footer mal placé"). */
.header-card-v211 .bo-header-level-2 {
	align-items: center;
	color: var(--adns-front-v211-meta-color);
	display: flex;
	font-size: .8rem;
	gap: .5rem;
	margin-top: .45rem;
	padding-bottom: .1rem;
	padding-top: .1rem;
}
.header-card-v211 .bo-header-level-2 .pageDateModified,
.header-card-v211 .bo-header-level-2 a {
	color: var(--adns-front-v211-meta-color);
}

/* Espaceur poussant le bouton Droits à l'extrême droite */
.bo-meta-spacer {
	flex: 1 1 auto;
}

/* Bouton "Droits" de la meta-line */
.bo-meta-rights {
	align-items: center;
	color: var(--adns-front-v211-meta-color);
	display: inline-flex;
	gap: .35rem;
	text-decoration: none;
	white-space: nowrap;
}
.bo-meta-rights:hover {
	color: #2563eb;
}

/* Pagination compacte regroupée dans un container gris */
.header-card-v211 .bo-pagination-wrap {
	align-items: center;
	background: var(--adns-front-v211-page-bg);
	border: .5px solid var(--adns-front-v211-card-border);
	border-radius: 8px;
	display: inline-flex;
	gap: .25rem;
	padding: 2px 4px;
}
.header-card-v211 .bo-pagination-wrap .btn-group .btn {
	align-items: center;
	display: inline-flex;
	height: 22px;
	justify-content: center;
	padding: 0;
	width: 22px;
}
.header-card-v211 .bo-pagination-wrap .lnav-index-input {
	width: 34px;
}

/**
 * [2026-06-04] AJOUT - Indicateurs de presence/absence de contact pour les
 * cartes entreprise (motif MotifEntrepriseFront, communauteListeEntreprises).
 *
 * CONTEXTE : Refactor UX du motif Entreprise vers AdnsCardFront. La barre
 *            footer affiche site / telephone / mail comme indicateurs visuels
 *            d'etat plutot que comme boutons grises (langage graphique fort
 *            present/absent au scan).
 * DEPENDANCES : MotifEntrepriseFront.html (slot footer)
 * AUTEUR : Antoine LAGIER / Claude Code (Opus 4.7) - 04/06/2026
 * REFERENCE : LEAD-37
 */
.contact-indicator {
	align-items: center;
	border-radius: 50%;
	display: inline-flex;
	font-size: .85rem;
	height: 32px;
	justify-content: center;
	transition: background .2s, color .2s;
	width: 32px;
}
.contact-indicator.is-present {
	background: #377dff;
	color: #fff;
	cursor: help;
}
.contact-indicator.is-present:hover {
	background: #2c6ae1;
}
.contact-indicator.is-absent {
	background: transparent;
	color: #6c757d;
	cursor: default;
	opacity: .35;
}

/* Wrapper <a> autour de la card entreprise (motif) :
   neutralise le soulignement et conserve la couleur du contenu.
   [2026-06-05] MODIFICATION : passage en flex pour hauteur uniforme par rangee */
a.card-link-wrapper,
a.card-link-wrapper:hover {
	color: inherit;
	display: flex;
	height: 100%;
	text-decoration: none;
}

/**
 * [2026-06-05] AJOUT - Card entreprise enrichie (motif liste)
 *
 * CONTEXTE : Apres le refactor LEAD-37, la liste paraissait fade. Refonte du
 *            motif pour ajouter :
 *            - Hero unifie (preview crawl OU initiales sur gradient)
 *            - Business-tags : secteur APE mappe sous le nom (L2)
 *            - Footer : compteur contacts + date MAJ relative (L1)
 *            - Hover : translation + shadow bleutee + zoom indicateurs
 *            Hauteur uniforme par rangee grace au flex column.
 * DEPENDANCES : MotifEntrepriseFront (html + helpers Java)
 * AUTEUR : Antoine LAGIER / Claude Code (Opus 4.7) - 05/06/2026
 * REFERENCE : LEAD-37
 */
.card-entreprise {
	background: #fff;
	border: 1px solid #dce6f0;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(15, 39, 68, 0.04);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform .25s, box-shadow .25s, border-color .25s;
	width: 100%;
}
a.card-link-wrapper:hover .card-entreprise {
	border-color: #ddeeff;
	box-shadow: 0 8px 28px -8px rgba(0, 85, 204, 0.25);
	transform: translateY(-3px);
}

/* Hero unifie : preview crawl OU initiales sur gradient */
.card-entreprise .hero {
	height: 160px;
	overflow: hidden;
	position: relative;
}
.card-entreprise .hero-preview img {
	display: block;
	height: 100%;
	object-fit: cover;
	object-position: top;
	width: 100%;
}
.card-entreprise .hero-preview::after {
	background: linear-gradient(180deg, transparent 60%, rgba(15, 39, 68, 0.08) 100%);
	content: '';
	inset: 0;
	pointer-events: none;
	position: absolute;
}
.card-entreprise .hero-initials {
	align-items: center;
	background: linear-gradient(135deg, #ddeeff 0%, #f0e8ff 100%);
	display: flex;
	height: 100%;
	justify-content: center;
	position: relative;
}
.card-entreprise .hero-initials::before {
	background-image:
		radial-gradient(circle at 20% 30%, rgba(0, 85, 204, 0.08), transparent 40%),
		radial-gradient(circle at 80% 70%, rgba(107, 63, 160, 0.08), transparent 40%);
	content: '';
	inset: 0;
	position: absolute;
}
.card-entreprise .hero-initials .initials {
	color: #0055cc;
	font-size: 4.5rem;
	font-weight: 800;
	letter-spacing: -2px;
	line-height: 1;
	opacity: 0.85;
	position: relative;
	z-index: 1;
}

/* Body : titre + business-tags (L2) + adresse */
.card-entreprise .card-body-entreprise {
	flex: 1;
	padding: 14px 18px 12px;
}
.card-entreprise .card-title-entreprise {
	color: #0f2744;
	display: -webkit-box;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 4px;
	min-height: 2.6em;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.card-entreprise .business-tags {
	color: #6b8caa;
	font-size: 12px;
	line-height: 1.4;
	margin-bottom: 8px;
	min-height: 1.4em; /* reserve l'espace meme sans secteur APE */
}
.card-entreprise .business-tags strong {
	color: #3d5a7a;
	font-weight: 600;
}
.card-entreprise .addr {
	color: #3d5a7a;
	font-size: 12.5px;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: lowercase;
	white-space: nowrap;
}
.card-entreprise .city {
	color: #6b8caa;
	font-size: 12.5px;
}

/* Meta-row : indicateurs contact */
.card-entreprise .meta-row {
	align-items: center;
	border-top: 1px solid #eaf0f7;
	display: flex;
	justify-content: space-between;
	padding: 10px 18px;
}
.card-entreprise .indicators {
	display: flex;
	gap: 6px;
}
.card-entreprise .contact-indicator {
	height: 28px;
	width: 28px;
	font-size: .75rem;
}
a.card-link-wrapper:hover .card-entreprise .contact-indicator.is-present {
	transform: scale(1.08);
	transition: transform .2s;
}

/* Footer L1 : compteur contacts + date MAJ */
.card-entreprise .card-footer-entreprise {
	background: #f0f4f8;
	border-top: 1px solid #eaf0f7;
	color: #6b8caa;
	display: flex;
	flex-wrap: wrap;
	font-size: 11.5px;
	gap: 8px;
	padding: 8px 18px;
}
.card-entreprise .footer-chunk {
	align-items: center;
	display: inline-flex;
	gap: 4px;
}
.card-entreprise .footer-chunk strong {
	color: #3d5a7a;
	font-weight: 600;
}
.card-entreprise .footer-chunk-right {
	margin-left: auto;
}
