/*
Theme Name:        Thème UDS
Theme URI:         https://snazzy.fr
Description:       Thème sur mesure d’U.D.S — Union du Sanitaire. Il laisse Snazzy UDS Page dessiner le site, pose l’en-tête et le pied de page une seule fois, habille les pages de texte et les articles dans la même direction artistique, et permet de quitter Elementor sans rien perdre. Requiert l’extension Snazzy UDS Page.
Version:           1.2.0
Requires at least: 6.0
Tested up to:      6.8
Requires PHP:      8.0
Author:            Snazzy Digital Agency
Author URI:        https://snazzy.fr
License:           Propriétaire — usage réservé à U.D.S
Text Domain:       snazzy-uds-theme
*/

/* =========================================================================
   SOCLE — le reste du dessin vient de Snazzy UDS Page
   ========================================================================= */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body.udst-mode-suds { background: var(--suds-bg, #fff); }
*, *::before, *::after { box-sizing: border-box; }
img, video { max-width: 100%; height: auto; }

.udst-skip { position: absolute; left: 12px; top: -60px; z-index: 100000; padding: 12px 18px; background: #0c0c0c; color: #fff;
	font: 600 12px/1 "Montserrat", "Helvetica Neue", Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.udst-skip:focus { top: 12px; }

.udst-main { display: block; }

/* =========================================================================
   PAGES DE TEXTE, ARTICLES, LISTES
   L'en-tête du site est fixe (84 px, 64 sur mobile) : le texte le dégage.
   ========================================================================= */

.suds.udst-prose-page {
	min-height: 70vh;
	padding: calc(84px + clamp(56px, 9vw, 128px)) var(--suds-pad, clamp(24px, 6vw, 96px)) clamp(80px, 11vw, 160px);
	background: var(--suds-bg, #fff);
	color: var(--suds-fg, #0c0c0c);
	font-family: var(--suds-font-sans, "Montserrat", "Helvetica Neue", Arial, sans-serif);
}
body.admin-bar .suds.udst-prose-page { padding-top: calc(116px + clamp(56px, 9vw, 128px)); }

.udst-article, .udst-list { max-width: 760px; margin: 0 auto; }
.udst-prose-page--list .udst-list { max-width: 1100px; }

.udst-article-head { margin-bottom: clamp(32px, 5vw, 56px); padding-bottom: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--suds-line, rgba(12, 12, 12, .16)); }

.suds .udst-eyebrow { margin: 0 0 18px; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--suds-fg-dim, rgba(12, 12, 12, .56)); }
.udst-eyebrow a { color: inherit; text-decoration: none; }
.udst-eyebrow a:hover { color: var(--suds-fg, #0c0c0c); }

.suds .udst-title { margin: 0; font-family: var(--suds-font-display, "Manrope", "Helvetica Neue", Arial, sans-serif); font-weight: 600;
	font-size: clamp(36px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -.035em; color: var(--suds-fg, #0c0c0c); text-wrap: balance; }
.suds .udst-lead { margin: 22px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; font-weight: 300; color: var(--suds-fg, #0c0c0c); max-width: 54ch; }

.udst-cover { margin: 0 0 clamp(32px, 5vw, 56px); overflow: hidden; background: var(--suds-bg-2, #f4f4f2); }
.udst-cover img { display: block; width: 100%; height: auto; }

/* --- Le texte ------------------------------------------------------------- */
.suds .udst-prose { font-size: 17px; line-height: 1.8; font-weight: 400; color: var(--suds-fg, #0c0c0c); }
.suds .udst-prose > * + * { margin-top: 1.15em; }
.suds .udst-prose p { margin: 0; }
.suds .udst-prose h2, .suds .udst-prose h3, .suds .udst-prose h4 { font-family: var(--suds-font-display, "Manrope", sans-serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 2em 0 .6em; color: var(--suds-fg, #0c0c0c); }
.suds .udst-prose h2 { font-size: clamp(24px, 2.6vw, 32px); }
.suds .udst-prose h3 { font-size: clamp(19px, 2vw, 23px); }
.suds .udst-prose h4 { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.suds .udst-prose a { color: var(--suds-fg, #0c0c0c); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--suds-line, rgba(12, 12, 12, .3)); transition: text-decoration-color .25s; }
.suds .udst-prose a:hover { text-decoration-color: currentColor; }
.suds .udst-prose strong { font-weight: 600; }
.suds .udst-prose ul, .suds .udst-prose ol { padding-left: 1.2em; }
.suds .udst-prose li + li { margin-top: .4em; }
.suds .udst-prose blockquote { margin: 1.6em 0; padding: 0 0 0 24px; border-left: 1px solid var(--suds-fg, #0c0c0c); font-family: var(--suds-font-display, "Manrope", sans-serif); font-size: 21px; line-height: 1.5; font-weight: 400; }
.suds .udst-prose hr { border: 0; border-top: 1px solid var(--suds-line, rgba(12, 12, 12, .16)); margin: 2.4em 0; }
.suds .udst-prose figure { margin: 2em 0; }
.suds .udst-prose figure img, .suds .udst-prose > img { display: block; width: 100%; height: auto; }
.suds .udst-prose figcaption, .suds .udst-prose .wp-caption-text { margin-top: 10px; font-size: 12.5px; color: var(--suds-fg-dim, rgba(12, 12, 12, .56)); }
.suds .udst-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.suds .udst-prose th, .suds .udst-prose td { padding: 12px 14px; border-bottom: 1px solid var(--suds-line-2, rgba(12, 12, 12, .07)); text-align: left; vertical-align: top; }
.suds .udst-prose th { font-weight: 600; }
.suds .udst-prose iframe { max-width: 100%; }
.suds .udst-prose .alignwide { margin-left: -8vw; margin-right: -8vw; max-width: calc(100% + 16vw); }
.suds .udst-prose .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.suds .udst-prose input[type="password"] { padding: 12px 14px; border: 1px solid var(--suds-line, rgba(12, 12, 12, .16)); font: inherit; }
.suds .udst-prose input[type="submit"] { padding: 12px 22px; border: 1px solid var(--suds-fg, #0c0c0c); background: var(--suds-fg, #0c0c0c); color: var(--suds-bg, #fff); font: 600 12px/1 inherit; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }

/* --- Liens et boutons : du texte, rien d'autre --------------------------- */
.suds .udst-link { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--suds-fg, #0c0c0c);
	text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px; transition: opacity .25s; }
.suds .udst-link:hover { opacity: .6; }
.suds a.udst-button { display: inline-block; padding: 17px 26px; background: var(--suds-fg, #0c0c0c); color: var(--suds-bg, #fff); text-decoration: none;
	font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; border: 1px solid var(--suds-fg, #0c0c0c); transition: background .25s, color .25s; }
.suds a.udst-button:hover, .suds a.udst-button:focus { background: transparent; color: var(--suds-fg, #0c0c0c); }
.suds .udst-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin: 40px 0 0; }

/* --- Navigation entre articles et pages ---------------------------------- */
.udst-postnav, .udst-pagination { display: flex; justify-content: space-between; gap: 24px; margin-top: clamp(48px, 7vw, 88px); padding-top: 28px; border-top: 1px solid var(--suds-line, rgba(12, 12, 12, .16)); }
.udst-postnav a, .udst-pagination a { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--suds-fg, #0c0c0c); text-decoration: none; }
.udst-postnav a:hover, .udst-pagination a:hover { opacity: .6; }
.udst-postnav-next, .udst-pagination span + span { text-align: right; margin-left: auto; }
.udst-pages { margin-top: 2em; font-size: 13px; letter-spacing: .1em; }

/* --- Liste d'articles ----------------------------------------------------- */
.udst-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 40px); }
.udst-card { display: flex; flex-direction: column; gap: 18px; }
.udst-card-media { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--suds-bg-2, #f4f4f2); }
.udst-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s cubic-bezier(.22, 1, .36, 1); }
.udst-card:hover .udst-card-media img { transform: scale(1.04); }
.udst-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.suds .udst-card .udst-eyebrow { margin: 0; }
.suds .udst-card-title { margin: 0; font-family: var(--suds-font-display, "Manrope", sans-serif); font-size: clamp(21px, 2vw, 26px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.suds .udst-card-title a { color: var(--suds-fg, #0c0c0c); text-decoration: none; }
.suds .udst-card-text { margin: 0; font-size: 15px; line-height: 1.7; color: var(--suds-fg-dim, rgba(12, 12, 12, .56)); }
.suds .udst-empty { margin: 0; font-size: 17px; color: var(--suds-fg-dim, rgba(12, 12, 12, .56)); }

/* --- Page introuvable ----------------------------------------------------- */
.udst-notfound { padding-top: clamp(20px, 4vw, 48px); }

/* =========================================================================
   REPLI — si Snazzy UDS Page est désactivé, le site reste lisible
   ========================================================================= */

.udst-fallback-header, .udst-fallback-footer { padding: 24px clamp(24px, 6vw, 96px); font: 600 13px/1 "Helvetica Neue", Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.udst-fallback-header { border-bottom: 1px solid rgba(12, 12, 12, .12); }
.udst-fallback-header a { color: #0c0c0c; text-decoration: none; }
.udst-fallback-footer { border-top: 1px solid rgba(12, 12, 12, .12); color: rgba(12, 12, 12, .56); }
body:not(:has(.suds-header)) .suds.udst-prose-page { padding-top: clamp(56px, 9vw, 128px); }

/* =========================================================================
   MOBILE
   ========================================================================= */

/* Le texte ne déborde jamais : mots longs, adresses web, tableaux, code, vidéos. */
.suds .udst-prose { overflow-wrap: break-word; }
.suds .udst-prose pre { max-width: 100%; overflow-x: auto; padding: 18px 20px; background: var(--suds-bg-2, #f4f4f2); font-size: 13.5px; line-height: 1.6; }
.suds .udst-prose :is(img, video, iframe, embed, object) { max-width: 100%; }
.suds .udst-prose video { height: auto; }

/* --- Tablette ------------------------------------------------------------- */
@media (min-width: 761px) and (max-width: 1080px) {
	.suds.udst-prose-page { padding-top: calc(84px + 64px); padding-inline: clamp(28px, 6vw, 64px); }
	.suds .udst-prose .alignwide { margin-left: -4vw; margin-right: -4vw; max-width: calc(100% + 8vw); }
	.udst-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
	body.admin-bar .suds.udst-prose-page { padding-top: calc(110px + clamp(48px, 9vw, 96px)); }
}

/* --- Mobile --------------------------------------------------------------- */
@media (max-width: 760px) {
	.suds.udst-prose-page { min-height: 56svh; padding: calc(64px + 44px) 22px 72px; }
	.udst-article-head { margin-bottom: 30px; padding-bottom: 22px; }
	.suds .udst-eyebrow { margin-bottom: 14px; font-size: 10.5px; letter-spacing: .2em; }
	.suds .udst-title { font-size: clamp(30px, 8.6vw, 40px); line-height: 1.06; letter-spacing: -.03em; }
	.suds .udst-lead { font-size: 16.5px; margin-top: 16px; }
	.udst-cover { margin-inline: -22px; margin-bottom: 30px; }
	.suds .udst-prose { font-size: 16px; line-height: 1.75; }
	.suds .udst-prose h2 { font-size: 23px; }
	.suds .udst-prose h3 { font-size: 19px; }
	.suds .udst-prose blockquote { padding-left: 18px; font-size: 18px; }
	.suds .udst-prose .alignwide { margin-left: 0; margin-right: 0; max-width: 100%; }
	.suds .udst-prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 14px; }
	.suds .udst-prose th, .suds .udst-prose td { padding: 10px 12px; min-width: 120px; }
	.suds .udst-prose input[type="password"], .suds .udst-prose input[type="text"], .suds .udst-prose input[type="email"] { font-size: 16px; max-width: 100%; }
	.suds .udst-actions { flex-direction: column; align-items: stretch; gap: 18px; margin-top: 30px; }
	.suds .udst-actions a.udst-button { text-align: center; }
	.suds .udst-actions .udst-link { align-self: flex-start; }
	.udst-cards { gap: 40px; }
	.suds .udst-card-title { font-size: 21px; }
	.udst-postnav, .udst-pagination { flex-direction: column; gap: 16px; }
	.udst-postnav-next, .udst-pagination span + span { text-align: left; margin-left: 0; }
	.udst-postnav a, .udst-pagination a { display: inline-block; padding: 6px 0; }
}
