/* =========================================================
   Espace de travail de l'étude (/espace/)
   ========================================================= */

/* Polices intégrées (licence SIL OFL, voir assets/fonts) */
@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/public-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/public-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/public-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/public-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/libre-caslon-text-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/libre-caslon-text-latin-700-normal.woff2) format("woff2"); }

body.cj-espace {
	margin: 0; background: var(--cj-fond, #f3f5f9); color: #1d2433;
	font-family: "Public Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 15px; line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
body.cj-espace *, body.cj-espace *::before, body.cj-espace *::after { box-sizing: border-box; }
:where(.cj-espace) a { color: #23417a; }
.cj-espace .screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.cj-espace :focus-visible { outline: 3px solid #b8892b; outline-offset: 2px; }
.cj-sauter { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 6px; }
.cj-sauter:focus { left: 8px; }

.cj-espace-cadre { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }

/* ---------- Menu latéral ---------- */
.cj-espace-menu {
	background: #14284b; color: #dfe6f2; display: flex; flex-direction: column;
	position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 3px solid #b8892b;
}
.cj-espace-marque { display: flex; align-items: center; gap: 12px; padding: 22px 18px 18px; text-decoration: none; color: #fff !important; border-bottom: 1px solid rgba(255,255,255,.08); }
.cj-espace-marque strong { display: block; font-family: "Libre Caslon Text", Georgia, serif; font-size: 15.5px; line-height: 1.25; font-weight: 700; }
.cj-espace-marque small { display: block; color: #d9be84; font-size: 12.5px; margin-top: 2px; }
.cj-espace-logo { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; flex: none; }
.cj-espace-monogramme {
	width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center;
	border: 2px solid #b8892b; border-radius: 50%; color: #d9be84; font-family: "Libre Caslon Text", Georgia, serif; font-size: 22px; font-weight: 700;
}
.cj-espace-groupe { margin: 22px 20px 6px; font-size: 12.5px; color: #8fa0bd; font-weight: 600; }
.cj-espace-menu ul { list-style: none; margin: 0; padding: 0 10px; }
.cj-espace-menu nav a {
	display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; margin-bottom: 2px;
	color: #dfe6f2; text-decoration: none; font-weight: 500; font-size: 14.5px;
}
.cj-espace-menu nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.cj-espace-menu nav a[aria-current="page"] { background: #fff; color: #14284b; font-weight: 700; }
.cj-espace-menu nav a[aria-current="page"] .dashicons { color: #b8892b; }
.cj-espace-menu .dashicons { font-size: 19px; width: 19px; height: 19px; color: #8fa0bd; }
.cj-espace-menu-pied { margin-top: auto; padding: 14px 10px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.cj-espace-menu-pied a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: #b6c2d6; text-decoration: none; font-size: 13.5px; border-radius: 8px; }
.cj-espace-menu-pied a:hover { color: #fff; background: rgba(255,255,255,.07); }

/* ---------- Barre supérieure ---------- */
.cj-espace-principal { min-width: 0; display: flex; flex-direction: column; }
.cj-espace-haut {
	position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
	background: #fff; border-bottom: 1px solid #dde3ec; padding: 10px 28px; min-height: 64px;
}
.cj-espace-burger { display: none; border: 1px solid #dde3ec; background: #fff; border-radius: 8px; width: 42px; height: 42px; cursor: pointer; color: #14284b; }
.cj-espace-recherche { position: relative; flex: 1; max-width: 560px; }
.cj-espace-recherche .dashicons { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8a94a6; }
.cj-espace-recherche input {
	width: 100%; min-height: 44px; border: 1px solid #c9d1de; border-radius: 22px; padding: 8px 16px 8px 40px;
	font: inherit; background: #f6f8fb;
}
.cj-espace-recherche input:focus { background: #fff; border-color: #23417a; outline: none; box-shadow: 0 0 0 3px rgba(35,65,122,.15); }
.cj-espace-utilisateur { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.cj-espace-date { color: #5a6270; }
.cj-espace-nom { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.cj-espace-avatar { width: 32px; height: 32px; border-radius: 50%; background: #14284b; color: #d9be84; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* ---------- Contenu ---------- */
.cj-espace-contenu { padding: 26px 28px 40px; }
.cj-espace .cj-wrap { padding: 0; margin: 0 auto; max-width: 1180px; }
.cj-espace .cj-titre { font-family: "Libre Caslon Text", Georgia, serif; font-weight: 700 !important; font-size: 27px !important; margin: 4px 0 4px !important; }
.cj-espace .cj-titre .dashicons { display: none; }
.cj-espace .wp-header-end { display: none; }
.cj-espace h1, .cj-espace h2, .cj-espace h3 { line-height: 1.25; }
.cj-espace .cj-carte h2 { font-family: "Public Sans", sans-serif; }
.cj-espace input[type=checkbox] { width: 18px; height: 18px; accent-color: #14284b; }
.cj-espace code { background: #eef1f5; padding: 1px 5px; border-radius: 4px; }
.cj-espace .cj-bouton { font-family: inherit; }
.cj-plein { width: 100%; justify-content: center; min-height: 46px; font-size: 15px; }

.cj-espace-voile { position: fixed; inset: 0; background: rgba(10,20,40,.45); z-index: 40; }

/* ---------- Connexion ---------- */
.cj-connexion { background: #14284b; }
.cj-connexion-cadre {
	min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
	background:
		radial-gradient(circle at 50% -20%, rgba(184,137,43,.22), transparent 55%),
		#14284b;
}
.cj-connexion-carte { width: 100%; max-width: 420px; background: #fff; border-radius: 14px; padding: 34px 32px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.28); border-top: 4px solid #b8892b; }
.cj-connexion-marque { text-align: center; margin-bottom: 22px; }
.cj-connexion-marque .cj-espace-monogramme { width: 64px; height: 64px; font-size: 30px; color: #14284b; }
.cj-connexion-logo { max-width: 120px; max-height: 90px; width: auto; height: auto; }
.cj-connexion-nom { font-family: "Libre Caslon Text", Georgia, serif; font-size: 21px; font-weight: 700; color: #14284b; margin: 12px 0 2px; }
.cj-connexion-sous { margin: 0; color: #5a6270; }
.cj-connexion .cj-champ { margin-bottom: 14px; }
.cj-connexion .cj-champ label { font-weight: 600; font-size: 14px; }
.cj-mdp { display: flex; gap: 6px; align-items: center; }
.cj-mdp input { flex: 1; }
.cj-connexion-liens { display: flex; justify-content: space-between; margin: 18px 0 0; font-size: 14px; }

/* ---------- Téléphone et tablette ---------- */
@media (max-width: 1024px) {
	.cj-espace-cadre { grid-template-columns: 1fr; }
	.cj-espace-menu { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
	.cj-espace-menu.ouvert { transform: none; }
	.cj-espace-burger { display: inline-flex; align-items: center; justify-content: center; flex: none; }
	.cj-espace-date { display: none; }
}
@media (max-width: 640px) {
	.cj-espace-haut { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
	.cj-espace-recherche { order: 3; flex-basis: 100%; max-width: none; }
	.cj-espace-nom { font-size: 13px; }
	.cj-espace-contenu { padding: 18px 14px 32px; }
	.cj-espace .cj-titre { font-size: 23px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.cj-espace-menu { transition: none; }
}
