/* ------------------------------------------------------------------
   Page « Documentation JSM clients »
   Emplacement : tebicom-wp/assets/css/doc-jsm.css

   Les variables ci-dessous sont à remapper sur celles de la charte
   tebicom (avril 2026) déjà définies dans le style principal du thème.
   ------------------------------------------------------------------ */

.docjsm {
	--djs-text:        #1c1c1a;
	--djs-text-soft:   #57575233;
	--djs-muted:       #6b6b66;
	--djs-line:        #e2e0da;
	--djs-surface:     #f7f6f2;
	--djs-accent:      #185fa5;
	--djs-accent-bg:   #e6f1fb;
	--djs-radius:      10px;

	padding: 3rem 0 4.5rem;
	color: var(--djs-text);
}

.docjsm__inner {
	max-width: 880px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.docjsm__inner--narrow {
	max-width: 520px;
}

/* ---------- En-tête ---------- */

.docjsm__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 1rem;
	padding: 5px 12px;
	border-radius: var(--djs-radius);
	background: var(--djs-accent-bg);
	color: var(--djs-accent);
	font-size: 0.8125rem;
	line-height: 1.2;
}

.docjsm__badge-icon {
	display: inline-flex;
}

.docjsm__title {
	margin: 0 0 0.5rem;
	font-size: 1.875rem;
	font-weight: 600;
	line-height: 1.25;
}

.docjsm__chapo {
	margin: 0;
	max-width: 34rem;
	color: var(--djs-muted);
	font-size: 1rem;
	line-height: 1.65;
}

/* ---------- Sections ---------- */

.docjsm__section {
	margin-top: 3rem;
}

.docjsm__section-title {
	margin: 0 0 0.25rem;
	font-size: 1.25rem;
	font-weight: 600;
}

.docjsm__section-sub {
	margin: 0 0 1.25rem;
	color: var(--djs-muted);
	font-size: 0.875rem;
}

.docjsm__section-title + .docjsm__videos,
.docjsm__section-title + .docjsm__docs {
	margin-top: 1.25rem;
}

/* ---------- Vidéos ---------- */

.docjsm__videos {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.docjsm__video {
	border: 1px solid var(--djs-line);
	border-radius: var(--djs-radius);
	overflow: hidden;
	background: #fff;
}

.docjsm__player {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #14140f;
	object-fit: cover;
}

.docjsm__video-meta {
	padding: 0.875rem 1rem 1rem;
}

.docjsm__video-title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
}

.docjsm__video-duration {
	margin: 0.25rem 0 0;
	color: var(--djs-muted);
	font-size: 0.8125rem;
}

.docjsm__video-desc {
	margin: 0.5rem 0 0;
	color: var(--djs-muted);
	font-size: 0.8125rem;
	line-height: 1.55;
}

/* ---------- Documents — lecteur PDF intégré ---------- */

.docjsm__pdf {
	margin: 1.25rem 0 0;
	border: 1px solid var(--djs-line);
	border-radius: var(--djs-radius);
	overflow: hidden;
	background: #fff;
}

.docjsm__pdf-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.875rem 1rem;
	border-bottom: 1px solid var(--djs-line);
	background: var(--djs-surface);
}

.docjsm__pdf-title {
	font-size: 0.9375rem;
	font-weight: 600;
}

.docjsm__pdf-meta {
	color: var(--djs-muted);
	font-size: 0.8125rem;
}

.docjsm__pdf-frame {
	position: relative;
	height: 78vh;
	min-height: 460px;
	max-height: 920px;
	background: #f1efe9;
}

.docjsm__pdf-frame > object {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.docjsm__pdf-fallback {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	height: 100%;
	padding: 2rem 1.5rem;
	text-align: center;
}

.docjsm__pdf-fallback p {
	margin: 0;
	color: var(--djs-muted);
	font-size: 0.9375rem;
}

.docjsm__pdf-fallback a {
	color: var(--djs-accent);
	font-size: 0.9375rem;
}

/* ---------- Documents ---------- */

.docjsm__docs {
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--djs-line);
	border-radius: var(--djs-radius);
	overflow: hidden;
}

.docjsm__doc + .docjsm__doc {
	border-top: 1px solid var(--djs-line);
}

.docjsm__doc-link {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 0.9375rem 1rem;
	text-decoration: none;
	color: inherit;
	background: #fff;
	transition: background 0.15s ease;
}

.docjsm__doc-link:hover,
.docjsm__doc-link:focus-visible {
	background: var(--djs-surface);
}

.docjsm__doc-icon,
.docjsm__doc-action {
	display: inline-flex;
	flex: 0 0 auto;
	color: var(--djs-muted);
}

.docjsm__doc-body {
	flex: 1 1 auto;
	min-width: 0;
}

.docjsm__doc-title {
	display: block;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
}

.docjsm__doc-meta {
	display: block;
	margin-top: 2px;
	color: var(--djs-muted);
	font-size: 0.8125rem;
}

/* ---------- Canaux de contact ---------- */

.docjsm__contact {
	margin-top: 3.5rem;
}

.docjsm__contact-title {
	text-align: center;
}

.docjsm__contact-sub {
	margin: 0.375rem 0 0;
	text-align: center;
}

.docjsm__channels {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
	margin: 1.75rem 0 0;
	padding: 0;
	list-style: none;
}

.docjsm__channel {
	display: flex;
}

.docjsm__channel-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 1.5rem 1.25rem 1.375rem;
	border: 1px solid var(--djs-line);
	border-radius: 14px;
	background: #fff;
	text-align: center;
	text-decoration: none;
	color: inherit;
}

a.docjsm__channel-inner {
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

a.docjsm__channel-inner:hover,
a.docjsm__channel-inner:focus-visible {
	border-color: var(--djs-accent);
	box-shadow: 0 6px 18px -12px rgba(24, 95, 165, 0.55);
	transform: translateY(-2px);
}

.docjsm__channel-title {
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--djs-accent);
	letter-spacing: 0.01em;
}

.docjsm__channel-mention {
	margin-top: 0.5rem;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--djs-accent-bg);
	color: var(--djs-accent);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.docjsm__channel-text {
	margin-top: 0.875rem;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--djs-text);
}

.docjsm__channel-url {
	margin-top: auto;
	padding-top: 1rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--djs-muted);
	word-break: break-word;
}

a.docjsm__channel-inner:hover .docjsm__channel-url,
a.docjsm__channel-inner:focus-visible .docjsm__channel-url {
	color: var(--djs-accent);
}

@media (prefers-reduced-motion: reduce) {
	a.docjsm__channel-inner {
		transition: none;
	}
	a.docjsm__channel-inner:hover,
	a.docjsm__channel-inner:focus-visible {
		transform: none;
	}
}

/* ---------- Écran de saisie du mot de passe ---------- */

.docjsm--locked {
	padding: 4.5rem 0 6rem;
}

.docjsm__lock-intro {
	margin: 0.75rem 0 1.5rem;
	color: var(--djs-muted);
	line-height: 1.65;
}

.docjsm--locked .post-password-form {
	margin: 0;
}

.docjsm--locked .post-password-form p:first-child {
	display: none;
}

.docjsm--locked .post-password-form label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 0.375rem;
}

.docjsm--locked .post-password-form input[type="password"] {
	width: 100%;
	max-width: 320px;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--djs-line);
	border-radius: var(--djs-radius);
	font-size: 1rem;
}

.docjsm--locked .post-password-form input[type="submit"] {
	margin-top: 0.75rem;
	padding: 0.5rem 1.25rem;
	border: 0;
	border-radius: var(--djs-radius);
	background: var(--djs-accent);
	color: #fff;
	font-size: 0.9375rem;
	cursor: pointer;
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
	.docjsm {
		padding-top: 2rem;
	}

	.docjsm__title {
		font-size: 1.5rem;
	}

	.docjsm__videos {
		grid-template-columns: 1fr;
	}

	.docjsm__channels {
		grid-template-columns: 1fr;
	}

	.docjsm__pdf-frame {
		height: 70vh;
		min-height: 380px;
	}
}