/* Carte security.txt des communes suisses. */

.dcod-sec-stxt-map {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	background: #f8f9fa;
	border-radius: 6px;
	overflow: hidden;
}

.dcod-sec-stxt-map .leaflet-container {
	background: #f8f9fa;
	font: inherit;
}

/* Filet de securite pour le cadre du popup : les couleurs des polygones sont
   appliquees en JS (donc visibles meme si une feuille de style externe pose
   probleme), mais le cadre blanc/ombre du popup vient normalement de
   leaflet.css. Si ce fichier ne se charge pas correctement dans un
   environnement donne, ces regles (chargees depuis notre propre feuille de
   style) evitent que le contenu s'affiche brut, sans fond, par-dessus la
   carte. */
.dcod-sec-stxt-map .leaflet-popup-content-wrapper {
	background: #ffffff;
	color: #1e1e1e;
	border-radius: 6px;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.dcod-sec-stxt-map .leaflet-popup-tip {
	background: #ffffff;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.dcod-sec-stxt-map .leaflet-popup-content {
	margin: 12px 14px;
	line-height: 1.5;
}

/* Legende */
.dcod-sec-stxt-legend {
	background: #ffffff;
	padding: 14px 16px 13px;
	border-radius: 10px;
	box-shadow: 0 8px 24px -10px rgba(18, 18, 18, 0.28), 0 1px 5px rgba(0, 0, 0, 0.16);
	font-size: 13px;
	line-height: 1.6;
	width: 214px;
	/* Filet de securite sur un conteneur de carte tres etroit (petit mobile,
	   colonne laterale reduite) : la marge de 10px de chaque cote vient du
	   theme Leaflet (.leaflet-bottom .leaflet-control), pas d'ici. */
	max-width: calc(100% - 20px);
	box-sizing: border-box;
}

.dcod-sec-stxt-legend__title {
	margin: 0 0 10px;
	font-size: 13.5px;
	font-weight: 700;
}

/* Chiffre-clé : pourcentage de sites "solides" parmi les entités évaluées,
   lu en premier - remplace la simple liste de puces comme première
   information de la légende. */
.dcod-sec-stxt-legend__kpi {
	display: flex;
	align-items: baseline;
	gap: 7px;
	margin-bottom: 8px;
}

.dcod-sec-stxt-legend__kpi-num {
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
	color: #00a32a;
	letter-spacing: -0.02em;
}

.dcod-sec-stxt-legend__kpi-cap {
	font-size: 11.5px;
	color: #646970;
	line-height: 1.25;
	max-width: 12ch;
}

/* Barre segmentée : même répartition good/partial/weak que le chiffre-clé,
   lue en un coup d'œil. "na" (non évalué) n'y figure pas - il n'ajoute rien
   à la question "parmi ce qui a été mesuré, quelle est la tendance ?". */
.dcod-sec-stxt-legend__band {
	display: flex;
	height: 7px;
	border-radius: 4px;
	overflow: hidden;
	background: #f0f1f2;
	margin-bottom: 9px;
}

.dcod-sec-stxt-legend__band-seg {
	height: 100%;
}

.dcod-sec-stxt-legend__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	margin-bottom: 2px;
}

.dcod-sec-stxt-legend__chip {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	color: #646970;
	white-space: nowrap;
}

.dcod-sec-stxt-legend__chip-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 2px;
	flex: none;
}

.dcod-sec-stxt-legend__note {
	margin-top: 6px;
	color: #787c82;
	font-size: 11px;
}

/* Mention « Détails après connexion » : texte seul précédé d'un cadenas, sans
   cadre ni fond - gris ardoise, jamais le vert de marque, qui signifie
   « Solide » partout ailleurs sur la carte. Classe partagée par la légende et
   par le pied de la popup : les deux disent la même chose, du même rendu. */
.dcod-sec-stxt-lock {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #4a5561;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.45;
}

.dcod-sec-stxt-lock::before {
	content: "";
	width: 12px;
	height: 12px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 7V5a3.5 3.5 0 0 1 7 0v2h.5A1.5 1.5 0 0 1 13.5 8.5v5A1.5 1.5 0 0 1 12 15H4a1.5 1.5 0 0 1-1.5-1.5v-5A1.5 1.5 0 0 1 4 7h.5Zm1.5 0h4V5a2 2 0 1 0-4 0v2Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 7V5a3.5 3.5 0 0 1 7 0v2h.5A1.5 1.5 0 0 1 13.5 8.5v5A1.5 1.5 0 0 1 12 15H4a1.5 1.5 0 0 1-1.5-1.5v-5A1.5 1.5 0 0 1 4 7h.5Zm1.5 0h4V5a2 2 0 1 0-4 0v2Z'/%3E%3C/svg%3E") center / contain no-repeat;
	flex: none;
}

/* Dans la légende : séparée du bloc « Dernier scan » par le même filet que
   le pied de la popup (.dcod-sec-stxt-popup__actions), et tenue sur une
   seule ligne dès que la largeur le permet. */
.dcod-sec-stxt-legend__lock {
	margin-top: 10px;
	padding-top: 9px;
	border-top: 1px solid #eceff1;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.dcod-sec-stxt-legend__lock {
		white-space: normal;
	}
}

/* Accès proposés directement dans la légende, sans aucun clic préalable sur
   la carte. Discrets : la légende est une aide à la lecture, pas une
   bannière publicitaire - le vert de marque reste réservé au seul chemin
   principal. Hauteur des cibles portée à ~30px (padding vertical) plutôt que
   la seule hauteur de ligne : au doigt, un lien de 16px se vise mal
   (recommandation WCAG 2.5.8 : 24x24px minimum). */
.dcod-sec-stxt-legend__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin-top: 9px;
}

.dcod-sec-stxt-legend__action {
	padding: 6px 11px;
	border-radius: 7px;
	background: #88cc00;
	color: #121212;
	font-size: 11.5px;
	font-weight: 700;
	text-decoration: none;
}

.dcod-sec-stxt-legend__action:hover,
.dcod-sec-stxt-legend__action:focus {
	background: #79b800;
	color: #121212;
}

.dcod-sec-stxt-legend__action-secondary {
	padding: 6px 2px;
	color: #646970;
	font-size: 11.5px;
	text-decoration: underline;
}

.dcod-sec-stxt-legend__action-secondary:hover,
.dcod-sec-stxt-legend__action-secondary:focus {
	color: #1e1e1e;
}

/* Date du dernier scan : libellé + valeur sur deux lignes, plus compact
   qu'une phrase "Scan du ..." lorsque la légende porte déjà les puces de
   verdict et, pour les vues restreintes, la note d'accès. */
.dcod-sec-stxt-legend__scan {
	display: flex;
	flex-direction: column;
	margin-top: 8px;
	line-height: 1.3;
}

.dcod-sec-stxt-legend__scan-label {
	font-size: 10px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #a7aaa4;
}

.dcod-sec-stxt-legend__scan-value {
	font-size: 12px;
	font-weight: 600;
	color: #787c82;
}

/* Popup */
.dcod-sec-stxt-popup {
	font-size: 13px;
	line-height: 1.5;
	min-width: 200px;
	max-width: 280px;
}

.dcod-sec-stxt-popup__muted {
	color: #787c82;
}

/* Résultat réservé : chiffre-clé et barre segmentée pour l'agrégat de
   substitution, puis un bouton d'action plutôt qu'un simple lien - c'est la
   seule sollicitation réelle du popup, elle mérite d'être vue comme telle.
   La moyenne affichée À LA PLACE du résultat masqué reste en gris et plus
   petite qu'un vrai score, pour ne jamais passer pour celui de l'entité. */
.dcod-sec-stxt-popup__kpi--ref {
	margin-top: 4px;
}

.dcod-sec-stxt-popup__kpi--ref .dcod-sec-stxt-popup__kpi-num {
	font-size: 19px;
	color: #4a5561;
}

.dcod-sec-stxt-popup__kpi {
	display: flex;
	align-items: baseline;
	gap: 7px;
	margin-top: 10px;
}

.dcod-sec-stxt-popup__kpi-num {
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	color: #00a32a;
	letter-spacing: -0.02em;
}

.dcod-sec-stxt-popup__kpi-cap {
	font-size: 12px;
	color: #646970;
	line-height: 1.3;
}

.dcod-sec-stxt-popup__band {
	display: flex;
	height: 7px;
	border-radius: 4px;
	overflow: hidden;
	background: #f0f1f2;
	margin: 7px 0;
}

.dcod-sec-stxt-popup__band-seg {
	height: 100%;
}

/* Pied d'action de la popup : épinglé au bas du cadre défilant, pour que les
   deux chemins d'accès restent visibles quelle que soit la longueur du
   contenu au-dessus (plusieurs sondes, plusieurs contrôles en échec). Sans
   cela ils passaient sous la ligne de flottaison et ne se découvraient qu'en
   défilant - le défaut que ce bloc corrige.

   Le conteneur défilant est .leaflet-popup-content (overflow-y:auto posé en
   JS) ; aucun ancêtre intermédiaire ne coupe le débordement, position:sticky
   s'y accroche donc directement. Fond opaque obligatoire : le contenu défile
   DESSOUS, il le traverserait sinon. */
.dcod-sec-stxt-popup__actions {
	position: sticky;
	bottom: 0;
	margin-top: 10px;
	padding-top: 9px;
	background: #ffffff;
	border-top: 1px solid #eceff1;
}


.dcod-sec-stxt-popup__cta {
	display: block;
	margin-top: 8px;
	padding: 8px 13px;
	background: #88cc00;
	color: #121212;
	font-weight: 700;
	font-size: 12.5px;
	text-align: center;
	text-decoration: none;
	border-radius: 8px;
}

.dcod-sec-stxt-popup__cta:hover,
.dcod-sec-stxt-popup__cta:focus {
	background: #79b800;
	color: #121212;
}

.dcod-sec-stxt-popup__cta-secondary {
	display: block;
	margin-top: 7px;
	font-size: 11.5px;
	color: #646970;
	text-align: center;
}

/* Lien vers la fiche PDF generee cote serveur (popup de la carte). */
.dcod-sec-stxt-popup__export-btn {
	display: block;
	box-sizing: border-box;
	text-decoration: none;
	width: 100%;
	margin-top: 10px;
	padding: 7px 10px;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #fff;
	color: #1e1e1e;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.dcod-sec-stxt-popup__export-btn:hover,
.dcod-sec-stxt-popup__export-btn:focus-visible {
	border-color: #88cc00;
	color: #4e7500;
	background: #f1f8df;
}

/* Detail par sonde du mode "global" : une ligne de verdict, suivie du
   detail structure des controles pour les sondes imparfaites. */
.dcod-sec-stxt-popup__probe-block {
	margin-top: 8px;
}

.dcod-sec-stxt-popup__probe-block:first-of-type {
	margin-top: 6px;
}

/* Popup structuree : un bloc par controle a corriger (echec ou partiel),
   identique quel que soit le mode de la carte (probe ou global). */
.dcod-sec-stxt-popup__checks {
	margin-top: 6px;
}

.dcod-sec-stxt-popup__check {
	margin-top: 8px;
	padding-left: 8px;
	border-left: 3px solid #d63638;
}

.dcod-sec-stxt-popup__check--partial {
	border-left-color: #dba617;
}

/* Contrôle facultatif : recommandation neutre, jamais un défaut. */
.dcod-sec-stxt-popup__check--optional {
	border-left-color: #a7aaad;
}

.dcod-sec-stxt-popup__check-optional {
	margin-left: 6px;
	padding: 0 6px;
	border-radius: 8px;
	background: #f0f0f1;
	color: #50575e;
	font-size: 10.5px;
	font-weight: 600;
	white-space: nowrap;
}

/* Agrégat de comparaison d'une entité réservée : l'ensemble est nommé. */
.dcod-sec-stxt-popup__ref-label {
	margin-top: 8px;
	color: #646970;
	font-size: 11.5px;
}

.dcod-sec-stxt-popup__check-head {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
}

.dcod-sec-stxt-popup__check-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 10px;
	font-weight: 600;
	color: #787c82;
	white-space: nowrap;
}

.dcod-sec-stxt-popup__check-label {
	font-weight: 600;
}

.dcod-sec-stxt-popup__check-why,
.dcod-sec-stxt-popup__check-fix {
	margin-top: 2px;
	font-size: 12px;
	color: #3c434a;
}

.dcod-sec-stxt-popup__check-fix::before {
	content: "→ ";
	color: #787c82;
}

/* Valeur DNS/HTTP reellement constatee pour ce site (reservee aux visiteurs
   dans leur portee) - distincte du texte explicatif generique du controle :
   c'est la preuve sur laquelle s'appuie le verdict, pas une reformulation. */
.dcod-sec-stxt-popup__check-raw {
	margin-top: 6px;
}

.dcod-sec-stxt-popup__check-raw-label {
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #a7aaa4;
	margin-bottom: 2px;
}

.dcod-sec-stxt-popup__check-raw-value {
	display: block;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 11px;
	line-height: 1.4;
	color: #3c434a;
	background: #f0f1f2;
	border-radius: 4px;
	padding: 4px 6px;
	margin-top: 2px;
	word-break: break-all;
	white-space: pre-wrap;
}

/* Correction ciblee ("valeur actuelle -> valeur attendue") : distinguee en
   vert de marque du texte 'fix' generique (jamais les deux ensemble, voir
   renderCheckDetail()) - une suggestion precise merite de se voir comme
   telle, pas comme une simple explication de plus. */
.dcod-sec-stxt-popup__check-suggestion {
	margin-top: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #3c6b00;
}

.dcod-sec-stxt-popup__check-suggestion::before {
	content: "→ ";
	color: #88cc00;
}

.dcod-sec-stxt-popup__check-doc {
	display: inline-block;
	margin-top: 3px;
	font-size: 12px;
}

/* Bouton d'exemption de controle ("faux positif ? Ignorer" / "Annuler
   l'exemption") - rendu UNIQUEMENT pour l'administrateur DCOD (voir
   renderCheckDetail(), assets/js/map.js), jamais pour le CISO ni le public.
   Discret plutot qu'un style d'alerte : action de maintenance, pas un appel
   a l'action pour le visiteur ordinaire. */
.dcod-sec-stxt-popup__check-ignore {
	display: inline-block;
	margin-top: 5px;
	padding: 3px 8px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #f6f7f7;
	color: #50575e;
	font-size: 10.5px;
	cursor: pointer;
}

.dcod-sec-stxt-popup__check-ignore:hover {
	border-color: #787c82;
	color: #1e1e1e;
}

.dcod-sec-stxt-popup__check-ignore:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Confirmation locale apres clic (ignore/unignore) : l'effet reel sur le
   score reste differe au prochain scan, ce texte le precise plutot que de
   laisser croire a un changement immediat de la carte deja chargee. */
.dcod-sec-stxt-popup__check-exempted-note {
	margin-top: 5px;
	font-size: 11px;
	font-style: italic;
	color: #787c82;
}

/* Controle deja exempte (outcome.x) : neutre, jamais rouge/orange comme un
   echec/partiel - ce n'est plus compte dans le score. */
.dcod-sec-stxt-popup__check--exempted {
	border-left-color: #c9ccd1;
}

/* Message avant premier scan */
.dcod-sec-stxt-map__placeholder {
	padding: 24px;
	text-align: center;
	color: #787c82;
}

/* Squelette de chargement : le cadre de la carte est visible tout de suite,
   avec un léger reflet animé, au lieu d'un texte seul sur fond blanc. */
.dcod-sec-stxt-map:has(> .dcod-sec-stxt-map__placeholder) {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: linear-gradient(100deg, #f3f4f2 30%, #e9ebe7 50%, #f3f4f2 70%) 0 0 / 300% 100%;
	animation: dcod-sec-skeleton 1.4s ease-in-out infinite;
}

@keyframes dcod-sec-skeleton {
	from { background-position: 100% 0; }
	to { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
	.dcod-sec-stxt-map:has(> .dcod-sec-stxt-map__placeholder) { animation: none; }
}

/* Statistiques rendues cote serveur (shortcode stats).
   Espacements en margin plutot qu'en "gap" flexbox : gap sur flexbox n'est
   fiable que depuis ~2020-2021 sur les navigateurs a jour ; certains postes
   professionnels verrouilles par l'IT tournent sur des versions figees plus
   anciennes ou l'espacement disparaitrait silencieusement. */
.dcod-sec-stxt-stats__row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.dcod-sec-stxt-stats__summary {
	font-weight: 600;
	margin: 0;
	flex: 1 1 320px;
}

/* Phrase de passage vers l'analyse consolidee, posee sous la repartition.
   Volontairement discrete : c'est une invitation, pas un troisieme appel a
   l'action sur une page qui porte deja une barre de navigation et une carte. */
.dcod-sec-stxt-stats__bridge {
	margin: 10px 0 0;
	font-size: 0.92em;
	line-height: 1.55;
	color: #55595e;
}

/* Tableaux comparatifs repris de l'analyse consolidee : ils arrivent avec
   leur propre feuille de style (dcod-sec-report), on ne redefinit donc rien
   de leur mise en forme - seulement l'espace qui les separe du bloc de
   statistiques qui les precede. */
.dcod-sec-report--embedded {
	margin-top: 18px;
}

.dcod-sec-report--embedded .dcod-sec-report__block {
	margin-bottom: 18px;
}

/* Barre de repartition : conteneur fixe sur desktop, pleine largeur des que
   la rangee passe a la ligne (mobile ou texte long) - voir le media query. */
.dcod-sec-stxt-stats__chart {
	flex: 0 0 auto;
	width: 240px;
	max-width: 100%;
	margin: 8px 0 0 20px;
}

.dcod-sec-stxt-stats__bar {
	display: flex;
	height: 14px;
	border-radius: 4px;
	overflow: hidden;
	background: #fcfcfb;
}

.dcod-sec-stxt-stats__seg {
	display: block;
	height: 100%;
	margin-right: 2px;
}

.dcod-sec-stxt-stats__seg:last-child {
	margin-right: 0;
}

.dcod-sec-stxt-stats__legend {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	color: #52514e;
}

.dcod-sec-stxt-stats__legend li {
	display: flex;
	align-items: center;
	margin: 0 14px 4px 0;
	white-space: nowrap;
}

.dcod-sec-stxt-stats__swatch {
	width: 9px;
	height: 9px;
	border-radius: 2px;
	flex: none;
	margin-right: 5px;
}

.dcod-sec-stxt-stats__legend li strong {
	margin-left: 4px;
}

.dcod-sec-stxt-stats__pct {
	color: #898781;
	margin-left: 4px;
}

@media (max-width: 640px) {
	.dcod-sec-stxt-stats__chart {
		width: 100%;
		margin-left: 0;
		margin-top: 12px;
	}
}

/* Défilement horizontal en secours plutôt qu'un débordement de la page : le
   plafond de largeur ci-dessous, combiné au blocage du retour à la ligne sur
   les deux premières colonnes, peut rendre le tableau plus large que son
   conteneur sur un petit écran ou avec des noms de communes très longs. */
.dcod-sec-stxt-stats__table-wrap {
	overflow-x: auto;
	max-width: 100%;
	box-sizing: border-box;
}

.dcod-sec-stxt-stats__table {
	width: 100%;
	max-width: 820px;
	border-collapse: collapse;
	font-size: 14px;
}

.dcod-sec-stxt-stats__table th,
.dcod-sec-stxt-stats__table td {
	padding: 6px 10px;
	text-align: left;
	border-bottom: 1px solid #dcdcde;
}

/* Les deux premières colonnes (nom du site, verdict/score) sont toujours
   courtes - jamais de raison qu'elles passent à la ligne. La dernière
   colonne (détail par catégorie / contrôles à corriger), elle, reste un
   texte libre et continue de se replier normalement : c'est elle qui doit
   céder la place, pas les deux autres. */
.dcod-sec-stxt-stats__table th:nth-child(1),
.dcod-sec-stxt-stats__table td:nth-child(1),
.dcod-sec-stxt-stats__table th:nth-child(2),
.dcod-sec-stxt-stats__table td:nth-child(2) {
	white-space: nowrap;
}

/* Historique (shortcode securitytxt_history) : barres empilees a 100%, une
   colonne par periode. Memes couleurs que la barre de repartition
   instantanee (dcod_sec_stxt_status_meta), pour rester coherent sur la page. */
.dcod-sec-stxt-history {
	margin: 8px 0;
}

.dcod-sec-stxt-history__chart {
	display: flex;
	align-items: flex-end;
	gap: 14px;
	overflow-x: auto;
	padding-bottom: 4px;
}

.dcod-sec-stxt-history__col {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: none;
}

.dcod-sec-stxt-history__bar {
	width: 32px;
	height: 150px;
	display: flex;
	flex-direction: column-reverse;
	border-radius: 4px 4px 0 0;
	overflow: hidden;
	background: #f0f1f2;
}

.dcod-sec-stxt-history__seg {
	display: block;
	width: 100%;
	margin-top: 2px;
}

/* Premier segment DOM = "Valide" = base de la pile (flex-direction:
   column-reverse place le 1er enfant en bas) : pas de marge au-dessus, sinon
   un espace apparaitrait entre lui et le bord inferieur de la barre. */
.dcod-sec-stxt-history__seg:first-child {
	margin-top: 0;
}

.dcod-sec-stxt-history__label {
	margin-top: 6px;
	font-size: 11px;
	line-height: 1.25;
	color: #787c82;
	white-space: nowrap;
	text-align: center;
}

/* Année sous le mois abrégé (« août » / « 2026 »). */
.dcod-sec-stxt-history__year {
	display: block;
	font-size: 10px;
	color: #a7aaad;
}

.dcod-sec-stxt-history__legend {
	display: flex;
	flex-wrap: wrap;
	margin-top: 14px;
	font-size: 12px;
	color: #52514e;
}

.dcod-sec-stxt-history__legend-item {
	display: flex;
	align-items: center;
	margin: 0 14px 4px 0;
}

.dcod-sec-stxt-history__swatch {
	width: 9px;
	height: 9px;
	border-radius: 2px;
	flex: none;
	margin-right: 5px;
}

/* Même filet de sécurité que .dcod-sec-stxt-stats__table-wrap : le tableau
   (Période + une colonne par statut + Total) peut dépasser la largeur d'un
   écran mobile, ce conteneur absorbe le débordement localement plutôt que
   de laisser la page entière défiler horizontalement. */
.dcod-sec-stxt-history__table-wrap {
	overflow-x: auto;
	max-width: 100%;
	box-sizing: border-box;
}

.dcod-sec-stxt-history__table {
	width: 100%;
	max-width: 720px;
	border-collapse: collapse;
	font-size: 13px;
	margin-top: 16px;
}

.dcod-sec-stxt-history__table caption {
	text-align: left;
	font-size: 12px;
	color: #787c82;
	margin-bottom: 6px;
}

.dcod-sec-stxt-history__table th,
.dcod-sec-stxt-history__table td {
	padding: 5px 9px;
	text-align: left;
	border-bottom: 1px solid #dcdcde;
}

/* Catalogue public des contrôles (shortcode dcod_sec_checks_catalog). */
.dcod-sec-catalog__probe {
	margin: 0 0 28px;
}

.dcod-sec-catalog__probe-title {
	margin: 0 0 4px;
}

.dcod-sec-catalog__check {
	margin-top: 16px;
	padding: 12px 14px;
	border: 1px solid #dcdcde;
	border-left: 4px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
}

.dcod-sec-catalog__check-head {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.dcod-sec-catalog__check-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	color: #52514e;
	background: #f0f1f2;
	padding: 2px 6px;
	border-radius: 3px;
}

.dcod-sec-catalog__badge {
	margin-left: auto;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
}

/* Quatre rubriques d'une fiche (pourquoi, fonctionnement, appréciation,
   correction) : même corps de texte, titres en gras dans le fil. */
.dcod-sec-catalog__why,
.dcod-sec-catalog__how,
.dcod-sec-catalog__fix,
.dcod-sec-catalog__levels {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.55;
}

.dcod-sec-catalog__doc {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
}

/* Controle de recherche (nom/domaine) : empile sous les boutons +/- de zoom,
   meme coin "topleft" - voir addSearchControl(), assets/js/map.js. Memes
   codes visuels que la legende (fond blanc, ombre, rayon 10px) pour rester
   coherent avec le reste des controles de cette carte. */
.dcod-sec-stxt-search {
	background: #ffffff;
	border-radius: 6px;
	box-shadow: 0 8px 24px -10px rgba(18, 18, 18, 0.28), 0 1px 5px rgba(0, 0, 0, 0.16);
	width: 190px;
	max-width: calc(100vw - 90px);
	overflow: hidden;
}

.dcod-sec-stxt-search__field {
	position: relative;
}

.dcod-sec-stxt-search__input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	border: none;
	outline: none;
	/* Marge de droite fixe pour le bouton "effacer" (22px + un peu d'air) :
	   jamais recouverte par le texte, meme un nom long tronque - voir
	   text-overflow ci-dessous. */
	padding: 7px 26px 7px 10px;
	font-size: 13px;
	font: inherit;
	background: transparent;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Bouton "effacer" MAISON plutot que le bouton natif de type=search : rendu
   incoherent d'un navigateur a l'autre et trop proche du texte pour un nom
   long/tronque (voir la demande utilisateur) - celui-ci garde toujours la
   meme marge fixe. Affiche/masque en JS (updateClearButton()), jamais par
   :placeholder-shown ou apparente : la valeur peut venir d'une selection,
   pas seulement d'une frappe. */
.dcod-sec-stxt-search__clear {
	display: none;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 50%;
	right: 4px;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: #787c82;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.dcod-sec-stxt-search__clear:hover,
.dcod-sec-stxt-search__clear:focus {
	background: #eceff1;
	color: #1e1e1e;
	outline: none;
}

.dcod-sec-stxt-search__results {
	display: none;
	max-height: 260px;
	overflow-y: auto;
	border-top: 1px solid #eceff1;
}

.dcod-sec-stxt-search__result {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
	width: 100%;
	box-sizing: border-box;
	padding: 6px 10px;
	border: none;
	background: transparent;
	cursor: pointer;
	font: inherit;
	text-align: left;
}

.dcod-sec-stxt-search__result:hover,
.dcod-sec-stxt-search__result:focus,
.dcod-sec-stxt-search__result--active {
	background: #eef3fb;
	outline: none;
}

.dcod-sec-stxt-search__result-name {
	font-size: 12.5px;
	color: #1e1e1e;
	line-height: 1.3;
}

.dcod-sec-stxt-search__result-domain {
	font-size: 11px;
	color: #787c82;
}

.dcod-sec-stxt-search__empty {
	padding: 8px 10px;
	font-size: 12px;
	color: #787c82;
}

/* Boutons d'accès : la feuille de Leaflet colore tout lien de la carte en
   bleu (.leaflet-container a), plus spécifique que la classe seule - le
   texte bleu sur fond vert n'atteignait pas le contraste requis (WCAG AA). */
.leaflet-container a.dcod-sec-stxt-popup__cta,
.leaflet-container a.dcod-sec-stxt-popup__cta:hover,
.leaflet-container a.dcod-sec-stxt-popup__cta:focus,
.leaflet-container a.dcod-sec-stxt-legend__action,
.leaflet-container a.dcod-sec-stxt-legend__action:hover,
.leaflet-container a.dcod-sec-stxt-legend__action:focus,
.dcod-sec-stxt-gate a.dcod-sec-stxt-gate__cta {
	color: #121212;
}

/* Carte réservée vue par un visiteur sans accès : message central, au lieu
   d'une carte grise qui semblait vide ou cassée. Refermable. */
.dcod-sec-stxt-gate {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 900;
	width: min(360px, calc(100% - 32px));
	transform: translate(-50%, -50%);
	padding: 18px 20px 16px;
	border: 1px solid #dcdcde;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
	font-family: 'Inter', sans-serif;
	text-align: center;
	animation: dcod-sec-gate-in .25s ease-out;
}

.dcod-sec-stxt-gate__title {
	margin: 0 0 6px;
	color: #14171a;
	font-size: 15px;
	font-weight: 700;
}

.dcod-sec-stxt-gate__text {
	margin: 0 0 12px;
	color: #50575e;
	font-size: 13px;
	line-height: 1.5;
}

.dcod-sec-stxt-gate__actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.dcod-sec-stxt-gate a.dcod-sec-stxt-gate__cta {
	display: block;
	padding: 9px 12px;
	border-radius: 6px;
	background: #88cc00;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.dcod-sec-stxt-gate a.dcod-sec-stxt-gate__link {
	color: #1d2327;
	font-size: 12.5px;
	text-decoration: underline;
}

.dcod-sec-stxt-gate__close {
	position: absolute;
	top: 6px;
	right: 8px;
	border: 0;
	background: none;
	color: #8c8f94;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

@keyframes dcod-sec-gate-in {
	from { opacity: 0; transform: translate(-50%, -46%); }
	to { opacity: 1; transform: translate(-50%, -50%); }
}

@media (prefers-reduced-motion: reduce) {
	.dcod-sec-stxt-gate { animation: none; }
}

/* Téléphone : encart de légende sous la carte, pleine largeur. */
.dcod-sec-stxt-legend--below .dcod-sec-stxt-legend__kpi-cap {
	max-width: none;
}

.dcod-sec-stxt-legend.dcod-sec-stxt-legend--below {
	width: auto;
	max-width: none;
	margin: 10px 0 2rem;
	border: 1px solid #e3e5df;
	box-shadow: none;
}

.dcod-sec-scan-page .dcod-sec-stxt-map:has(+ .dcod-sec-stxt-legend--below) {
	margin-bottom: 0;
}

/* Historique : mois sans mesure, signalé plutôt que sauté. */
.dcod-sec-stxt-history__col--missing .dcod-sec-stxt-history__bar {
	border: 1px dashed #c3c4c7;
	background: repeating-linear-gradient(135deg, transparent 0 5px, #f0f0f1 5px 7px);
}

.dcod-sec-stxt-history__row--missing td {
	color: #8c8f94;
	font-style: italic;
}

/* Fiche d'une entité réservée : confirmation d'inclusion. */
.dcod-sec-stxt-popup__inclusion {
	margin-top: 6px;
	color: #3c434a;
	font-size: 12.5px;
}

/* Titre de la fenêtre centrale : cadenas du libellé commun, centré. */
.dcod-sec-stxt-gate__title.dcod-sec-stxt-lock {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	color: #14171a;
}
.dcod-sec-stxt-gate__title.dcod-sec-stxt-lock::before {
	width: 15px;
	height: 15px;
}

/* Téléphone, fiche ouverte : recherche masquée (elle recouvrait la fiche). */
.dcod-sec-stxt-map--popup .dcod-sec-stxt-search {
	display: none;
}

/* Liste des entités sous la carte security.txt publique (repliée par
   défaut) : hauteur plafonnée et défilement propre, en-tête collant - une
   liste de 2 000 communes dépliée ne doit pas avaler la page. */
.dcod-sec-stxt-list {
	margin: 14px 0 6px;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
}

.dcod-sec-stxt-list > summary {
	cursor: pointer;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	list-style-position: inside;
}

.dcod-sec-stxt-list > summary:hover {
	background: #f6f7f7;
}

.dcod-sec-stxt-list > summary:focus-visible {
	outline: 2px solid #1d2327;
	outline-offset: -2px;
}

.dcod-sec-stxt-list__note {
	margin: 0 14px 8px;
	font-size: 12.5px;
	color: #646970;
}

.dcod-sec-stxt-list__wrap {
	max-height: 460px;
	overflow: auto;
	border-top: 1px solid #dcdcde;
}

.dcod-sec-stxt-list__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	margin: 0;
}

.dcod-sec-stxt-list__table th,
.dcod-sec-stxt-list__table td {
	padding: 6px 14px;
	text-align: left;
	border-bottom: 1px solid #f0f0f1;
	white-space: nowrap;
}

.dcod-sec-stxt-list__table thead th {
	position: sticky;
	top: 0;
	background: #f6f7f7;
	font-weight: 600;
	z-index: 1;
}

.dcod-sec-stxt-list__table td:first-child {
	white-space: normal;
}

.dcod-sec-stxt-list__dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	margin-right: 7px;
	vertical-align: 0;
}

/* Passerelle de la fiche publique security.txt vers le détail réservé :
   discrète, sous le contenu, jamais avant le résultat cherché. */
.dcod-sec-stxt-popup__bridge {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid #f0f0f1;
	font-size: 12.5px;
	color: #50575e;
}

/* Indicateurs informatifs (hors score), repliés sous les résultats notés :
   présentation sobre, sans couleur de verdict - ils ne notent rien. */
.dcod-sec-stxt-popup__ind {
	margin-top: 8px;
	border-top: 1px solid #e2e4e7;
	padding-top: 6px;
}

.dcod-sec-stxt-popup__ind > summary {
	cursor: pointer;
	font-weight: 600;
}

.dcod-sec-stxt-popup__ind-family {
	margin-top: 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #50575e;
}

.dcod-sec-stxt-popup__ind-list {
	margin: 2px 0 0;
}

.dcod-sec-stxt-popup__ind-list dt {
	margin-top: 3px;
	color: #50575e;
}

.dcod-sec-stxt-popup__ind-list dd {
	margin: 0;
	font-weight: 600;
}

.dcod-sec-stxt-popup__ind-note {
	margin-top: 6px;
	font-size: 11px;
}

/* Indicateurs complémentaires (hors score) de la page « Sécurité globale » :
   tableau neutre, sans couleur de verdict - des parts, pas des notes. */
.dcod-sec-ind {
	margin-top: 28px;
}

.dcod-sec-ind__title {
	margin: 0 0 6px;
	text-wrap: balance;
}

.dcod-sec-ind__note {
	max-width: 70ch;
	margin: 0 0 12px;
	font-size: 0.9em;
	color: #50575e;
}

.dcod-sec-ind__table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.dcod-sec-ind__table th,
.dcod-sec-ind__table td {
	padding: 6px 8px;
	border-bottom: 1px solid #e2e4e7;
	text-align: left;
	vertical-align: top;
}

.dcod-sec-ind__table th[scope="row"] {
	font-weight: 400;
	color: #3c434a;
}

.dcod-sec-ind__table td {
	font-weight: 600;
}

.dcod-sec-ind__family {
	padding-top: 14px !important;
	font-size: 0.8em;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #50575e;
}

@media (max-width: 600px) {
	.dcod-sec-ind__table th[scope="row"],
	.dcod-sec-ind__table td {
		display: block;
		border-bottom: 0;
		padding: 2px 0;
	}

	.dcod-sec-ind__table td {
		padding-bottom: 8px;
		border-bottom: 1px solid #e2e4e7;
	}
}

/* Catalogue des contrôles : rubriques « Comment ça fonctionne » et « Comment
   c'est apprécié ». Les trois niveaux reprennent les couleurs des verdicts. */
.dcod-sec-catalog__levels {
	padding: 8px 12px;
	background: #f6f7f7;
	border-radius: 4px;
}

.dcod-sec-catalog__levels-title {
	margin: 0 0 4px;
}

.dcod-sec-catalog__levels-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dcod-sec-catalog__level {
	position: relative;
	margin: 4px 0;
	padding-left: 18px;
}

.dcod-sec-catalog__level-dot {
	position: absolute;
	left: 0;
	top: 0.45em;
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.dcod-sec-catalog__levels-effect {
	margin: 6px 0 0;
	font-size: 0.9em;
	color: #50575e;
}
