/* Pages modèles — avocat-montreal.ca (mu-plugin am-modeles), présentation inspirée de lumenjuris.com */
.custom-article-template {
	--am-bleu: #0a6bb5; --am-vif: #3e89f7; --am-nuit: #0a2540; --am-marine: #0f1f3a; --am-texte: #2f3a4b;
	--am-gris: #6b7280; --am-pale: #eef5fc; --am-bord: #e5e7eb;
	background: #fff; padding: 0 0 72px;
}
.custom-article-template .container { max-width: 808px !important; padding-left: 24px; padding-right: 24px; }

/* ---------- En-tête ---------- */
.am-me { padding: 40px 0 6px; }
.custom-article-template h1.am-me__titre { color: var(--am-marine); font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; margin: 0 0 12px; text-align: left; }
.am-me__maj { font-size: 13px; color: var(--am-gris); margin: 0 0 4px; }
.am-fil { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: #838181; margin: 0 0 18px; }
.am-fil a { color: var(--am-bleu); text-decoration: none; }
.am-fil a:hover { text-decoration: underline; }
.am-me__chapo { color: var(--am-texte); font-size: 17px; line-height: 1.65; margin: 0 0 26px; }

/* ---------- Encadré du modèle ---------- */
.am-boite {
	border: 1px solid #c9d7ee; border-radius: 20px; overflow: hidden; background: #fff; margin: 0 0 40px;
	box-shadow: 0 1px 2px rgba(10, 37, 64, .05), 0 18px 45px rgba(10, 37, 64, .12);
}
.am-boite__tete {
	padding: 22px 24px 24px; color: #cfdcf5;
	background: radial-gradient(circle at 92% 0, #2c5bb8 0, transparent 55%), linear-gradient(135deg, var(--am-nuit), #17336e);
}
.am-boite__info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 16px; font-size: 13px; line-height: 1.3; }
.am-pastille { background: #5fd3a0; color: #063b27; font-weight: 700; font-size: 11px; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.am-boite__nom { color: #fff; font-weight: 700; font-size: 16px; }
.am-boite__pied { border-top: 1px solid var(--am-bord); padding: 18px 24px 22px; background: #f6f8fc; }
.am-boite__pied p { margin: 0 0 14px; font-size: 13px; color: #4b5563; }

.am-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.am-btns--seul { grid-template-columns: minmax(0, 380px); justify-content: center; }
.am-btn {
	display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 60px; box-sizing: border-box;
	padding: 10px 18px; border: 0; border-radius: 14px; cursor: pointer; list-style: none;
	font-size: 17px; font-weight: 700; color: #fff !important; text-decoration: none !important;
	background: linear-gradient(135deg, var(--am-vif), #354f99);
	box-shadow: 0 10px 24px rgba(62, 137, 247, .38), inset 0 1px 0 rgba(255, 255, 255, .25);
	transition: transform .15s, box-shadow .15s, filter .15s;
}
.am-btn:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 14px 30px rgba(62, 137, 247, .5), inset 0 1px 0 rgba(255, 255, 255, .25); }
.am-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.am-btn svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.am-btn svg.am-chev { width: 16px; height: 16px; flex-basis: 16px; stroke-width: 2.5; margin-left: 4px; transition: transform .2s; }
.am-btn__txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.am-btn__txt small { font-weight: 500; font-size: 12.5px; opacity: .85; margin-top: 3px; }
.am-dl { position: relative; }
.am-dl[open] .am-chev { transform: rotate(180deg); }
.am-dl summary::-webkit-details-marker { display: none; }
.am-dl__menu {
	position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20; padding: 6px; background: #fff;
	border: 1px solid var(--am-bord); border-radius: 12px; box-shadow: 0 16px 40px rgba(10, 37, 64, .2);
}
.am-boite__pied .am-dl__menu { top: auto; bottom: calc(100% + 8px); }
.am-dl__menu button {
	display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 8px;
	background: none; cursor: pointer; color: var(--am-nuit); font: inherit; font-size: 15px; font-weight: 600; text-align: left;
}
.am-dl__menu button:hover { background: var(--am-pale); }
.am-dl__menu small { color: var(--am-gris); font-weight: 400; }
.am-btn--ok { background: linear-gradient(135deg, #1fa36c, #13865a) !important; }

/* La lettre, dans l'encadré, avec défilement */
.custom-article-template .document-juridique {
	margin: 0 !important; max-width: none !important; max-height: 620px; overflow: auto;
	background: #fff !important; border: 0 !important; border-left: 5px solid #dce7fb !important; border-radius: 0 !important; box-shadow: none !important;
	padding: 30px 36px !important; text-align: left !important;
}
.custom-article-template .custom-content { color: #26303f; font-size: 15px; line-height: 1.7; }
.custom-article-template .document-juridique p,
.custom-article-template .document-juridique li { text-align: left !important; }
.custom-article-template .document-juridique p { margin: 0 0 12px !important; line-height: 1.7 !important; font-size: 15px !important; }
.custom-article-template .custom-content hr { border: 0; border-top: 1px solid var(--am-bord); margin: 22px 0; }
.custom-article-template .custom-content h2 {
	color: var(--am-nuit) !important; font-size: 15px !important; font-weight: 700 !important; text-transform: uppercase; letter-spacing: .04em !important;
	margin: 26px 0 10px !important; padding: 0 0 8px !important; border-bottom: 2px solid #e6f0fa !important; line-height: 1.4;
}
.custom-article-template .custom-content h2:first-of-type { margin-top: 4px !important; }
.custom-article-template .custom-content ul { margin: 0 0 14px; padding-left: 0; list-style: none; }
.custom-article-template .custom-content ul li { position: relative; padding-left: 22px; margin-bottom: 7px; }
.custom-article-template .custom-content ul li::before { content: ""; position: absolute; left: 4px; top: .65em; width: 7px; height: 7px; border-radius: 50%; background: var(--am-bleu); }
.custom-article-template .custom-content sup { color: var(--am-bleu); }

/* ---------- Après l'encadré ---------- */
.custom-article-template h2.am-titre { color: var(--am-marine); font-size: 24px; font-weight: 750; letter-spacing: -.02em; margin: 0 0 16px; }
.am-etapes { counter-reset: etape; list-style: none; margin: 0 0 36px; padding: 0; }
.am-etapes li { counter-increment: etape; position: relative; padding: 0 0 16px 52px; color: var(--am-texte); font-size: 16px; line-height: 1.6; }
.am-etapes li::before {
	content: counter(etape); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
	background: var(--am-bleu); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.am-etapes strong { color: var(--am-marine); }
.am-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 0 0 8px; }
.am-carte {
	display: flex; flex-direction: column; gap: 8px; padding: 20px; background: #fff; border: 1px solid var(--am-bord); border-radius: 16px;
	color: var(--am-texte); font-size: 14px; line-height: 1.55; text-decoration: none !important; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.am-carte:hover { transform: translateY(-3px); border-color: #a4bfdf; box-shadow: 0 12px 28px rgba(10, 37, 64, .09); color: var(--am-texte); }
.am-carte__gros { color: var(--am-marine); font-size: 17px; font-weight: 700; line-height: 1.25; }
.am-carte__lien { margin-top: auto; color: var(--am-bleu); font-weight: 700; }
.am-carte__badge { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: #5fd3a0; color: #063b27; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.am-carte--gen { border: 0; color: #d6e6f5; background: radial-gradient(circle at 90% 10%, #1c86d6 0%, transparent 55%), linear-gradient(135deg, #0a3a6b, #0a6bb5); }
.am-carte--gen:hover { color: #d6e6f5; }
.am-carte--gen .am-carte__gros, .am-carte--gen .am-carte__lien { color: #fff; }
.am-carte--avocat { background: #fff8e6; border-color: #f6e2b3; }

/* ---------- Partage, auteur, similaires, commentaires ---------- */
.custom-article-template .share-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 32px 0 0 !important; padding-top: 22px; border-top: 1px solid var(--am-bord); font-size: 0; }
.am-partage__label { font-size: 15px; color: var(--am-gris); font-weight: 600; margin-right: 4px; }
.custom-article-template .share-buttons a { font-size: 14px; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--am-bord); color: var(--am-marine) !important; font-weight: 600; text-decoration: none; }
.custom-article-template .share-buttons a:hover { border-color: var(--am-bleu); color: var(--am-bleu) !important; }
.custom-article-template .post-author {
	display: flex; gap: 20px; align-items: center; margin: 28px 0 0 !important; padding: 24px !important;
	background: #f7f9fc !important; border: 1px solid var(--am-bord) !important; border-radius: 16px !important; box-shadow: none !important;
}
.custom-article-template .post-author img { border-radius: 50%; }
.custom-article-template .post-author .author-name { color: var(--am-marine); font-size: 18px; margin: 0 0 6px; }
.custom-article-template .post-author .author-bio { color: var(--am-texte); font-size: 15px; line-height: 1.6; margin: 0; }
.custom-article-template .related-post { margin-top: 40px !important; border: 0 !important; padding: 0 !important; }
.custom-article-template .related-post--title { text-align: left !important; }
.custom-article-template .related-post--title h3 { color: var(--am-marine); font-size: 24px; font-weight: 750; margin: 0 0 16px; text-transform: none; }
.custom-article-template .related-post .theme-blog-each {
	position: relative; height: 100%; margin-bottom: 18px; padding: 22px; background: #fff; border: 1px solid var(--am-bord);
	border-radius: 14px; box-shadow: none; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.custom-article-template .related-post .theme-blog-each:hover { transform: translateY(-3px); border-color: #a4bfdf; box-shadow: 0 12px 28px rgba(10, 37, 64, .09); }
.custom-article-template .related-post .theme-blog-content-area,
.custom-article-template .related-post .theme-blog-content,
.custom-article-template .related-post .theme-blog-meta { padding: 0 !important; border: 0 !important; background: none !important; }
.custom-article-template .related-post .theme-blog-title { font-size: 17px; line-height: 1.4; margin: 0 0 10px; }
.custom-article-template .related-post .theme-blog-title a { color: var(--am-marine); text-decoration: none; }
.custom-article-template .related-post .theme-blog-title a::after { content: ""; position: absolute; inset: 0; }
.custom-article-template .related-post .theme-blog-meta ul { margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--am-gris); }
.custom-article-template .comments-wrapper { margin-top: 24px; }
.custom-article-template .comments-area:not(:has(*)) { display: none; }
.custom-article-template .comments-area,
.custom-article-template .comment-respond { background: #fff !important; border: 1px solid var(--am-bord) !important; border-radius: 16px !important; padding: 28px !important; box-shadow: none !important; }
.custom-article-template .comment-reply-title, .custom-article-template .comment-respond h3 { color: var(--am-marine); font-size: 21px; font-weight: 700; }
.custom-article-template .comment-form .form-control { border: 1px solid #d5dce6 !important; border-radius: 10px !important; padding: 12px 14px !important; height: auto; font-size: 15px; background: #fbfcfe !important; }
.custom-article-template .comment-form .form-control:focus { border-color: var(--am-bleu) !important; box-shadow: 0 0 0 4px rgba(10, 107, 181, .15) !important; background: #fff !important; }
.custom-article-template .comment-form input[type="submit"] { border-radius: 10px !important; padding: 13px 26px !important; background: var(--am-bleu) !important; border: 0 !important; font-weight: 700; font-size: 15px; }

/* ---------- Guide sous l'encadré (contenu entre <!--am-guide--> et <!--/am-guide-->) ---------- */
.am-guide { margin: 0 0 40px; color: var(--am-texte); font-size: 16.5px; line-height: 1.7; }
.custom-article-template .am-guide h2 { color: var(--am-marine); font-size: 24px; font-weight: 750; letter-spacing: -.02em; line-height: 1.25; margin: 36px 0 12px; }
.custom-article-template .am-guide h3 { color: var(--am-marine); font-size: 18px; font-weight: 700; line-height: 1.35; margin: 22px 0 6px; }
.am-guide p { margin: 0 0 14px; }
.am-guide ul, .am-guide ol { margin: 0 0 16px; padding-left: 22px; }
.am-guide li { margin-bottom: 6px; }
.am-guide strong { color: var(--am-marine); }
.am-guide a { color: var(--am-bleu); text-decoration: underline; text-underline-offset: 2px; }
.am-guide table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; }
.am-guide th, .am-guide td { padding: 10px 12px; border: 1px solid var(--am-bord); text-align: left; vertical-align: top; }
.am-guide th { background: var(--am-pale); color: var(--am-marine); }
.am-guide .am-guide__note { padding: 14px 18px; border-radius: 12px; background: var(--am-pale); font-size: 15px; }
@media print { .am-guide { display: none !important; } }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.am-me { padding-top: 26px; }
	.custom-article-template h1.am-me__titre { font-size: 28px; }
	.am-me__chapo { font-size: 16px; }
	.am-btns { grid-template-columns: 1fr; }
	.am-boite__tete, .am-boite__pied { padding: 18px; }
	.custom-article-template .document-juridique { padding: 22px 18px !important; max-height: 480px; }
	.custom-article-template .post-author { flex-direction: column; text-align: center; }
}

/* ---------- Impression (bouton PDF) : seulement la lettre ---------- */
@media print {
	body * { visibility: hidden !important; }
	.document-juridique, .document-juridique * { visibility: visible !important; }
	.document-juridique { position: absolute !important; left: 0; top: 0; width: 100%; max-height: none !important; overflow: visible !important; border: 0 !important; padding: 0 !important; }
	ins, iframe, .adsbygoogle { display: none !important; }
}
