/* cmonpsy.com — the hygiene the original never had.
 *
 * Everything above this file is the site's own CSS, fetched from the live WordPress.com CDN and
 * self-hosted (wp-content/themes/pub/toujours/style.css and the block libraries it was served
 * with). This file adds only what the client's finish checklist demands and the original lacked:
 * readable body copy on a phone, tap targets a finger can hit, no sideways scroll, and a footer,
 * because the one the site had said "Propulsé par WordPress.com" and nothing else.
 *
 * Section A — the footer we authored to replace the WordPress.com credit.
 * Section B — notes that stand in for widgets a static copy cannot run (payment, comment form).
 * Section C — legibility: minimum sizes, contrast and overflow, at 1440 and at 390.
 */

/* ---------- A. footer ---------------------------------------------------------------- */

#colophon .restore-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	justify-content: space-between;
	text-align: left;
}

#colophon .restore-footer__col {
	flex: 1 1 240px;
	min-width: 240px;
}

#colophon .restore-footer p {
	color: #f2f2f2;
	font-size: 16px;
	line-height: 1.6;
	margin: 0 0 8px;
}

#colophon .restore-footer__name {
	font-family: "Merriweather", Georgia, serif;
	font-size: 19px;
	font-weight: 700;
}

#colophon .restore-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

#colophon .restore-footer__links li {
	margin: 0 0 4px;
}

#colophon .restore-footer a,
#colophon .restore-footer__links a {
	color: #8fd8ee;
	display: inline-block;
	font-size: 16px;
	line-height: 1.5;
	min-height: 24px;
	padding: 4px 0;
	text-decoration: underline;
}

#colophon .restore-footer a:hover,
#colophon .restore-footer a:focus {
	color: #fff;
}

/* ---------- B. honest stand-ins for widgets that cannot work on a static copy --------- */

.restore-note {
	background: #f4f1ec;
	border-left: 4px solid #007a99;
	margin: 32px 0;
	padding: 16px 20px;
}

.restore-note p {
	color: #2b2b2b;
	font-size: 17px;
	line-height: 1.6;
	margin: 0;
}

.restore-note a {
	color: #006684;
	font-weight: 700;
}

/* The two commercial partner sites keep their mention and lose their href, per the outbound
   policy. Without this they would render as undifferentiated prose. */
.restore-delinked {
	font-style: italic;
}

/* ---------- C. legibility --------------------------------------------------------------
 * Measured with `node _scripts/qa_legibility.js cmonpsy.com` at 1440 and 390, not guessed.
 * The theme's own accent (#009FC6 on the #e0d9d1 page ground) measures 3.1:1 and the customizer
 * blue (#2590ec) 3.34:1 — both below 4.5:1, and both are used for the phone number and the
 * headings a patient most needs to read. Darkening the two accents keeps the site's colour
 * identity and clears the threshold. */

:root {
	--cmp-accent: #00647d;      /* was #009FC6 — same hue, 4.5:1 on the page ground */
	--cmp-accent-dark: #005f7a;
}

body {
	font-size: 18px;
}

.entry-content,
.entry-content p,
.entry-content li {
	font-size: 18px;
	line-height: 1.65;
}

.entry-content .has-small-font-size,
.has-small-font-size,
small,
.entry-meta,
.comment-metadata,
.comment-metadata a,
.wp-block-latest-posts__post-date {
	font-size: 15px !important;
}

/* Anything the page painted in the two low-contrast accents. The site set these inline, so the
   override has to be specific enough to win without repainting text that was already legible.
   A BUTTON is not a link for this purpose: the first version of this rule repainted
   .wp-block-button__link too and turned the homepage's "Conventionnée Mon soutien psy avec la CPAM"
   button into dark teal on its own blue fill — 1.78:1, a contrast failure the fix itself created. */
.entry-content a:not(.wp-block-button__link),
.comment-content a,
.entry-title a,
.o5-legal a,
figcaption a {
	color: var(--cmp-accent);
}

/* A figure caption is body copy, not fine print. Toujours paints captions and post meta #999,
   which measures 2.85:1 on white — and on this site the captions carry the cabinet address and the
   ADELI number. The selectors that set it are `[class^="wp-block-"]:not(.wp-block-gallery)
   figcaption` and `.entry-meta`, both more specific than a bare element rule, which is why the
   first attempt at this changed nothing: !important is the honest way to win here rather than
   guessing at a longer selector chain. */
figcaption,
.wp-element-caption,
.wp-block-image figcaption,
[class^="wp-block-"] figcaption {
	color: #595959 !important;
	font-size: 15px;
	line-height: 1.5;
	/* The block library gives captions `display: table-caption`, which only shrink-wraps sanely
	   while the <figure> is a table box. Un-floating the figure for the phone made it a block, the
	   caption became an anonymous table 11px wide, and "N° ADELI 839301041" printed one character
	   per line. A block caption is the same picture on both viewports and cannot do that.
	   The rule that sets it is `.wp-block-image .alignleft>figcaption` and friends, so the
	   override has to name the same shape or it loses on specificity. */
	display: block;
}

.wp-block-image .alignleft > figcaption,
.wp-block-image .alignright > figcaption,
.wp-block-image .aligncenter > figcaption,
.wp-block-image.alignleft > figcaption,
.wp-block-image.alignright > figcaption,
.wp-block-image.aligncenter > figcaption,
.entry-content figure > figcaption {
	display: block;
}

/* Toujours sets `blockquote { color: #888 }` — 3.54:1 — and the tarifs page puts its four patient
   testimonials in blockquotes. Quoted praise is content, not a decorative aside. */
.entry-content blockquote,
.entry-content blockquote p,
.entry-content blockquote cite {
	color: #4a4a4a;
}

.entry-meta,
.entry-footer,
.comment-metadata,
.nav-links .nav-subtitle,
.post-navigation .nav-subtitle {
	color: #595959 !important;
}

/* The post date is a link inside .entry-meta, so it takes the theme accent (#009FC6, 3.1:1) and
   the meta font size (15px, a 19px box). Both floors, one selector. */
.entry-meta a,
.comment-metadata a,
.nav-links a,
.post-navigation a,
.posts-navigation a {
	color: var(--cmp-accent) !important;
	padding-bottom: 4px;
	padding-top: 4px;
}

.entry-content .has-inline-color,
.entry-content mark.has-inline-color,
.entry-content [style*="color:#2590ec"],
.entry-content [style*="color: #2590ec"],
.entry-content [style*="color:#0070a3"],
.entry-content [style*="color: #0070a3"] {
	color: var(--cmp-accent-dark) !important;
}

.has-blue-color,
.has-primary-color {
	color: var(--cmp-accent-dark) !important;
}

.has-medium-gray-color {
	color: #4a4a4a !important;
}

/* The site's "primary" fill is #2590ec, and white on it measures 3.34:1 — every call-to-action
   button on the site fails the text threshold. Same hue, enough ink behind the label. */
.wp-block-button__link.has-primary-background-color,
.wp-block-button__link.has-background.has-primary-background-color {
	background-color: #005f7a !important;
	color: #fff !important;
}

/* Tap targets. The gate blocks on any control whose shorter side is under 24px; the theme's nav
   links, the burger button and the post-navigation links were all under it. */
.main-navigation a {
	font-size: 17px;
	min-height: 24px;
	padding: 12px 20px;
}

.menu-toggle {
	min-height: 44px;
	min-width: 44px;
	padding: 10px 16px !important;
}

.nav-links a,
.post-navigation a,
.posts-navigation a,
.entry-title a,
.page-links a,
.site-title a {
	display: inline-block;
	min-height: 24px;
	padding: 4px 0;
}

/* The site-logo <a> the theme leaves empty is a 1158x22 invisible link the gate counts as a
   control. It links home, which the title beside it already does, so take it out of the tab order
   rather than pad an empty box. */
.site-logo-link:empty {
	display: none;
}

/* The header image sits inside its own <a href="/">, and an inline anchor around a block image
   measures 1158x23 — a full-width control 1px under the threshold, and a poor target for a thumb.
   Make the anchor the size of the picture it wraps. */
.site-branding > a {
	display: block;
	line-height: 0;
}

/* An inline link's box is its FONT box, not its line box, so 18px body copy gives a 23px anchor:
   one pixel under the gate's floor and genuinely fiddly on a phone. Vertical padding on an inline
   element grows the hit box without moving the lines around it. */
.entry-content a,
.comment-content a,
.comment-metadata a,
.entry-meta a,
.o5-legal a,
.restore-note a,
figcaption a,
.entry-summary a {
	padding-bottom: 4px;
	padding-top: 4px;
}

/* A cover block whose photograph did not survive: keep the panel, lose the black. The colour is
   the site's own page ground darkened one step, so the block still reads as a banner. */
.wp-block-cover.restore-cover-plain {
	background-color: #eae4dc;
	min-height: 0;
	padding: 8px;
}

.wp-block-cover.restore-cover-plain .wp-block-cover__inner-container {
	background: transparent;
	color: #2b2b2b;
}

/* A cover block's caption sits on a photograph, and the block library's own dim is 10% — the
   address line on /blog-2/ lands on dark pine trees in near-black type. A scrim under the text
   keeps the picture, the layout and the type colour and makes the words readable. */
.wp-block-cover .wp-block-cover__inner-container {
	background: rgba(255, 255, 255, 0.82);
	border-radius: 2px;
	color: #2b2b2b;
	padding: 20px 24px;
}

.wp-block-cover .wp-block-cover__inner-container p {
	color: #2b2b2b;
	text-shadow: none;
}

/* Sideways scroll. /blog-2/ prints its own address as a bare URL inside a paragraph, which is
   501px wide unbroken and pushed the phone layout to 501px in a 390px viewport. */
.entry-content,
.comment-content,
.entry-summary,
.site-content {
	overflow-wrap: anywhere;
	word-break: normal;
}

.entry-content table,
.entry-content pre,
.entry-content .wp-block-table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.entry-content img,
.comment-content img,
.wp-block-image img {
	height: auto;
	max-width: 100%;
}

/* The tiled gallery is a flex grid; at phone width its rows have to become a column or the five
   photographs each keep their desktop share of 1158px. */
@media screen and (max-width: 640px) {
	.tiled-gallery__row {
		display: block !important;
	}

	.tiled-gallery__col {
		width: 100% !important;
	}

	.tiled-gallery__item {
		margin-bottom: 8px;
	}

	body,
	.entry-content,
	.entry-content p,
	.entry-content li {
		font-size: 17px;
	}

	.entry-content h1,
	.entry-title {
		font-size: 28px;
		line-height: 1.25;
	}

	.entry-content h2 {
		font-size: 23px;
		line-height: 1.3;
	}

	/* A floated image is a desktop idea. On the homepage the 163px rose is `alignleft` and the
	   "MES DERNIERS POSTS" list runs down the ~180px strip beside it, which is why that page is
	   9000px tall on a phone. Stacking them gives the text the full width back. */
	.entry-content .alignleft,
	.entry-content .alignright,
	.entry-content figure.alignleft,
	.entry-content figure.alignright {
		display: block;
		float: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		/* width MATTERS. Un-floating alone let `.is-resized`'s shrink-to-fit collapse the figure to
		   the caption's minimum, and "N° ADELI 839301041" came out one character per line. Caught
		   by re-screenshotting the same page after the fix, which is the only reason it is not
		   still there. */
		max-width: 100% !important;
		width: 100% !important;
	}

	.entry-content figure.alignleft img,
	.entry-content figure.alignright img {
		max-width: 100%;
	}
}

/* Comments are content here — five real testimonials — but with the gravatars and the like/reply
   plumbing gone the list needs its own indent back. */
.comment-list {
	list-style: none;
	padding-left: 0;
}

.comment-list .children {
	list-style: none;
	margin-left: 24px;
	padding-left: 16px;
	border-left: 3px solid #d8d0c6;
}

.comment-body {
	border-bottom: 1px solid #d8d0c6;
	padding: 16px 0;
}

.comment-author .fn {
	font-size: 18px;
}

/* ---------- E. [removed 2026-08-30] a photograph the author put INSIDE a heading ------
   /accueil/blog-2/ used to end its <h2> with a 150px img00269-20120518-1603 rendition, floated by
   .restore-heading-motif so "adapté!" would not print alone beside the picture. That image is the
   same rose photograph reused on / and on /2020/05/07/deconfinement/ (qa_client_bar
   images_are_not_recycled). The archive holds no other unused photograph for this slot (every
   downloaded image in _raw/cmonpsy.com is already wired into the build), so the decorative copy was
   removed from the heading here and from the homepage, leaving the photo on the one page where it
   is the post's own illustration (/2020/05/07/deconfinement/). The heading now reads as plain text
   with no float, so .restore-heading-motif is unused and was deleted with it. */

/* ---------- F. o7 visual review, 2026-10-14 ------------------------------------------------
   1. The site title is <p class="site-title"><a>. restore-legibility.css underlines every
      `p > a:not([class])` so prose links stay visible, and that selector also catches the title
      link, which the theme (toujours/style.css `.site-title a { text-decoration: none }`) never
      underlined. The 404, which does not load restore-legibility.css, shows the title as the
      theme drew it. The id raises specificity above the legibility rule. */
#masthead .site-title a {
	text-decoration: none;
}

/* 2. The comment avatars (Gravatar, off-site) are not part of the static copy, but the theme still
      reserves their 110px column (90px for replies): comment text sat in an empty indent. Under
      540px the theme already zeroes these margins; this does the same at every width. */
.comment-list .comment-author,
.comment-list .comment-metadata,
.comment-list .comment-content,
.comment-list .reply {
	margin-left: 0;
}

/* 3. `#colophon .restore-footer p` (1,1,1) outranked `#colophon .restore-footer__name` (1,1,0),
      so the name line never got the size section A gives it. */
#colophon .restore-footer p.restore-footer__name {
	font-size: 19px;
}
