/*
Theme Name:   Céline Bailleul (TT5)
Theme URI:    https://celinebailleul.com
Description:  Thème enfant FSE de Twenty Twenty-Five pour celinebailleul.com — direction « Encre & papier ».
Author:       Ludovic Arnal
Author URI:   https://webdesign.ludovicarnal.com
Template:     twentytwentyfive
Version:      0.2.1
Requires at least: 6.7
Requires PHP: 8.0
Text Domain:  celinebailleul-tt5
*/

/* Règle version : Bug → +0.0.1 / Fonctionnalité → +0.1.0 / Changement cassant → +1.0.0 */

/* Les réglages visuels vivent dans theme.json ; ici seulement ce que theme.json ne sait pas faire. */

/* ── Général ──────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

/* Les ancres de l'accueil ne passent pas sous l'en-tête collant */
[id] { scroll-margin-top: 5.5rem; }

/* TT5 ajoute un espace (blockGap) entre en-tête, contenu et pied de page :
   on le supprime, chaque section gère ses propres marges */
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block-start: 0; }

::selection { background: var(--wp--preset--color--accent-5, #E6EEF1); color: var(--wp--preset--color--accent-2, #073246); }

/* Coup de plume sanguine (logo, titres de section) */
:root {
	--cbt5-trait: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 10'%3E%3Cpath d='M2 7c18-5 40-6 62-3 10 1.5 20 1.5 30-1' fill='none' stroke='%23B4583A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ── Focus propre : anneau uniquement au clavier ─────────────── */

a, button, summary, input, textarea, select,
.wp-block-button__link {
	outline: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-3, #B4583A);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Sur fond encre (contact, pied de page) : anneau ivoire */
.cbt5-encre :focus-visible,
.cbt5-pied :focus-visible { outline-color: var(--wp--preset--color--accent-4, #F9F5EF) !important; }

/* Le formulaire reste blanc : on garde l'anneau sanguine dedans */
.cbt5-encre .cbt5-formulaire :focus-visible { outline-color: var(--wp--preset--color--accent-3, #B4583A) !important; }

/* ── Boutons ──────────────────────────────────────────────── */

/* Contour : même bordure 1px et même padding que le bouton plein
   → même hauteur au repos et au survol */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--accent-1);
	border: 1px solid var(--wp--preset--color--accent-1);
	padding: 0.85em 1.5em;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-5);
	color: var(--wp--preset--color--accent-2);
	border-color: var(--wp--preset--color--accent-1);
}

.wp-block-button__link { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }

/* ── Éléments communs ─────────────────────────────────────── */

/* Petite étiquette en capitales au-dessus d'un titre */
.cbt5-etiquette {
	margin: 0;
	font-size: .8125rem;
	font-weight: 500;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-6);
}

/* Titre de section centré + coup de plume */
.cbt5-titre {
	text-align: center;
}

.cbt5-titre::after {
	content: "";
	display: block;
	width: 96px;
	height: 10px;
	margin: .55rem auto 0;
	background: var(--cbt5-trait) no-repeat center / contain;
}

/* Phrase d'accroche en serif */
.cbt5-chapo {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.45;
	color: var(--wp--preset--color--accent-1);
	text-align: center;
	max-width: 32ch;
	margin-left: auto !important;
	margin-right: auto !important;
}

.cbt5-chapo em { color: var(--wp--preset--color--accent-3); }

.cbt5-gris { color: var(--wp--preset--color--accent-6); }

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

/* Collant en haut de la fenêtre ; se réduit au défilement (classe posée par assets/js/front.js) */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}

.cbt5-entete {
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: saturate(1.3) blur(10px);
	backdrop-filter: saturate(1.3) blur(10px);
	border-bottom: 1px solid transparent;
	transition: padding .3s ease, border-color .3s ease, box-shadow .3s ease;
}

/* Le flou (backdrop-filter) crée un repère pour les éléments « position: fixed » :
   le menu mobile plein écran restait enfermé dans la hauteur de l'en-tête.
   → pas de flou sur mobile (fond blanc plein), et jamais quand le menu est ouvert. */
@media (max-width: 599px) {
	.cbt5-entete {
		background: var(--wp--preset--color--base);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}

.cbt5-entete:has(.wp-block-navigation__responsive-container.is-menu-open) {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.cbt5-colle .cbt5-entete {
	padding-top: .6rem !important;
	padding-bottom: .6rem !important;
	border-bottom-color: var(--wp--preset--color--accent-7);
	box-shadow: 0 10px 24px -20px rgba(7, 50, 70, .5);
}

@media (prefers-reduced-motion: reduce) {
	.cbt5-entete,
	.cbt5-logo a,
	.cbt5-logo__metier { transition: none !important; }
}

/* Mobile : marges latérales réduites (10 % de largeur, c'est trop sur un téléphone) */
@media (max-width: 600px) {
	html body {
		--wp--style--root--padding-left: 1.25rem;
		--wp--style--root--padding-right: 1.25rem;
	}
}

/* Barre d'admin WordPress non fixe sur petit écran : l'en-tête colle au bord */
@media (max-width: 600px) {
	.wp-site-blocks > header.wp-block-template-part { top: 0; }
}

/* Logo : « Céline Bailleul » + coup de plume + métier */
.cbt5-marque { gap: 0 !important; }

.cbt5-logo {
	margin: 0;
	line-height: 1;
}

.cbt5-logo a {
	display: inline-block;
	padding-bottom: 12px;
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 1.65rem;
	font-weight: 500;
	letter-spacing: -.01em;
	color: var(--wp--preset--color--accent-1);
	text-decoration: none;
	background: var(--cbt5-trait) no-repeat left 52px bottom 0 / 96px 10px;
	transition: font-size .3s ease, background-position .3s ease;
}

.cbt5-logo em { font-weight: 400; }

.cbt5-logo__metier {
	margin: 4px 0 0;
	font-size: .6875rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-6);
	max-height: 2em;
	overflow: hidden;
	transition: max-height .3s ease, opacity .3s ease, margin .3s ease;
}

/* En-tête réduit : logo un peu plus petit, métier masqué */
.cbt5-colle .cbt5-logo a {
	font-size: 1.35rem;
	background-position: left 43px bottom 0;
}

.cbt5-colle .cbt5-logo__metier {
	max-height: 0;
	opacity: 0;
	margin-top: 0;
}

/* Menu : soulignement sanguine au survol et sur la rubrique courante */
.cbt5-entete .wp-block-navigation-item__content {
	padding: 4px 0 !important;
	text-decoration: none !important;
	border-bottom: 2px solid transparent;
}

.cbt5-entete .wp-block-navigation-item__content:hover,
.cbt5-entete .wp-block-navigation-item__content.cbt5-actif {
	color: var(--wp--preset--color--accent-1);
	border-bottom-color: var(--wp--preset--color--accent-3);
}

/* Menu mobile (plein écran) : grands liens en serif */
.cbt5-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 1.75rem;
	color: var(--wp--preset--color--accent-1);
}

/* ── Accueil : héro ───────────────────────────────────────── */

.cbt5-hero__titre {
	font-size: var(--wp--preset--font-size--xxx-large);
	letter-spacing: -.015em;
	line-height: 1.05;
}

.cbt5-hero__sous {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.4;
	max-width: 30ch;
}

/* Portrait rond, liseré blanc + ombre douce */
.cbt5-portrait {
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 380px;
}

.cbt5-portrait img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	border: 8px solid var(--wp--preset--color--base);
	box-shadow: 0 24px 48px -28px rgba(7, 50, 70, .45);
}

/* Mobile : le portrait passe au-dessus du texte, en plus petit */
@media (max-width: 781px) {
	.cbt5-hero .wp-block-columns { flex-direction: column-reverse; }
	.cbt5-portrait { max-width: 240px; }
}

/* ── Accueil : recrutement (étapes) ───────────────────────── */

.cbt5-etape {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent-7);
	border-radius: 12px;
}

.cbt5-etape { text-align: center; }

.cbt5-etape > *:first-child { margin-top: 0; }

.cbt5-num {
	margin: 0;
	font-family: var(--wp--preset--font-family--newsreader);
	font-style: italic;
	font-size: 2.75rem;
	line-height: 1;
	color: var(--wp--preset--color--accent-3);
}

/* ── Accueil : accompagnement (pastilles, encarts) ────────── */

.cbt5-formules > p {
	margin: 0;
	padding: .45rem 1rem;
	font-size: .95rem;
	font-weight: 500;
	line-height: 1.3;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent-7);
	border-radius: 999px;
}

.cbt5-encart {
	background: var(--wp--preset--color--base);
	border-top: 3px solid var(--wp--preset--color--accent-1);
	border-radius: 12px;
}

.cbt5-encart > *:first-child { margin-top: 0; }

.cbt5-encart ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cbt5-encart li {
	position: relative;
	padding: .65rem 0 .65rem 1.6rem;
	border-bottom: 1px solid #EEEBE5;
}

.cbt5-encart li:last-child { border-bottom: 0; }

.cbt5-encart li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1.35rem;
	width: 12px;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--accent-3);
}

.cbt5-encart li strong {
	display: block;
	color: var(--wp--preset--color--accent-1);
	font-weight: 600;
}

/* ── Contact (fond encre) ─────────────────────────────────── */

.cbt5-encre a:not(.wp-block-button__link) { color: var(--wp--preset--color--base); }
.cbt5-encre a:not(.wp-block-button__link):hover { color: var(--wp--preset--color--accent-4); text-decoration-color: var(--wp--preset--color--accent-3); }

.cbt5-encre .cbt5-gris { color: #B9CDD6; }

.cbt5-coord a {
	font-family: var(--wp--preset--font-family--newsreader);
	text-decoration: none;
}

.cbt5-linkedin a {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-weight: 500;
	text-decoration: none;
}

.cbt5-linkedin a::before {
	content: "in";
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 50%;
	font-size: .85rem;
	font-weight: 700;
}

/* Formulaire (plugin Arsenal Contact) dans sa carte blanche */
.cbt5-formulaire {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-radius: 14px;
}

.cbt5-formulaire a { color: var(--wp--preset--color--accent-1) !important; }

.cbt5-formulaire label { font-size: .9rem; font-weight: 500; }

.cbt5-formulaire input:not([type="checkbox"]):not([type="radio"]),
.cbt5-formulaire textarea {
	width: 100%;
	border: 1px solid var(--wp--preset--color--accent-7);
	border-radius: 8px;
	background: #FCFBF9;
	padding: .75rem .9rem;
	font: inherit;
	color: inherit;
}

.cbt5-formulaire input:not([type="checkbox"]):not([type="radio"]):focus,
.cbt5-formulaire textarea:focus { border-color: var(--wp--preset--color--accent-1); }

/* ── Pied de page ─────────────────────────────────────────── */

.cbt5-pied {
	font-size: .875rem;
	color: #9DB6C1;
}

.cbt5-pied p { margin: 0; }
.cbt5-pied a { color: #C9DAE1; }
.cbt5-pied a:hover { color: var(--wp--preset--color--base); }

/* ── Pages simples (mentions légales…) ────────────────────── */

.cbt5-page h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: 2.5rem; }

/* ── 404 ──────────────────────────────────────────────────── */

.cbt5-404__code {
	margin: 0;
	font-family: var(--wp--preset--font-family--newsreader);
	font-style: italic;
	font-size: clamp(4.5rem, 14vw, 9rem);
	line-height: 1;
	color: var(--wp--preset--color--accent-3);
}
