/* ==========================================================
   Conviés — charte « Nuit bleue »
   Bleu nuit · crème · terracotta
   Chargée par le mu-plugin conv-charte.php (jamais dans le thème)
   ========================================================== */

@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Jetons de la charte ---------- */
:root:root {
	--conv-nuit: #121833;
	--conv-nuit-2: #1a2144;
	--conv-nuit-3: #232b52;
	--conv-nuit-4: #2d3662;
	--conv-trait: #2f3964;
	--conv-trait-2: #414c7c;
	--conv-creme: #f3ebdd;
	--conv-creme-2: #cfc6b6;
	--conv-creme-3: #a39c8f;
	--conv-terra: #b8653b;
	--conv-terra-hover: #a3552e;
	--conv-terra-clair: #e39a6e;
	--conv-terra-fond: #3a2b36;
	--conv-titre: "Cormorant Garamond", Georgia, serif;
	--conv-texte: "DM Sans", system-ui, sans-serif;
}

/* ---------- BuddyBoss ReadyLaunch : mêmes couleurs en mode clair et sombre ---------- */
:root:root,
.bb-rl-dark-mode.bb-rl-dark-mode,
body.bb-rl-dark-mode {
	--bb-rl-primary-color: var(--conv-terra);
	--bb-rl-font-family-base: var(--conv-texte);

	--bb-rl-background-color: var(--conv-nuit-2);
	--bb-rl-background-hover-color: var(--conv-nuit-3);
	--bb-rl-background-secondary-color: var(--conv-nuit);
	--bb-rl-background-secondary-hover-color: var(--conv-nuit-3);
	--bb-rl-background-tertiary-color: var(--conv-nuit-4);
	--bb-rl-background-tertiary-hover-color: var(--conv-trait-2);
	--bb-rl-background-black-color: #0b0f22;
	--bb-rl-background-disabled-color: var(--conv-nuit-4);
	--bb-rl-background-brand-primary-color: var(--conv-terra);
	--bb-rl-background-brand-primary-hover-color: var(--conv-terra-hover);
	--bb-rl-background-brand-secondary-color: var(--conv-terra-fond);
	--bb-rl-background-brand-secondary-hover-color: #4a3440;
	--bb-rl-background-brand-disabled-color: #7a5a4a;
	--bb-rl-background-info-primary-color: var(--conv-terra);
	--bb-rl-background-info-primary-hover-color: var(--conv-terra-hover);
	--bb-rl-background-info-secondary-color: var(--conv-terra-fond);

	--bb-rl-border-color: var(--conv-trait);
	--bb-rl-border-secondary-color: var(--conv-trait);
	--bb-rl-border-tertiary-color: var(--conv-trait-2);
	--bb-rl-border-quaternary-color: var(--conv-creme-3);
	--bb-rl-border-quinery-color: var(--conv-creme-2);
	--bb-rl-border-brand-primary-color: var(--conv-terra-clair);
	--bb-rl-border-brand-secondary-color: var(--conv-terra);
	--bb-rl-border-info-primary-color: var(--conv-terra-clair);

	--bb-rl-text-color: var(--conv-creme);
	--bb-rl-text-white-color: #fffaf2;
	--bb-rl-text-secondary-color: var(--conv-creme-2);
	--bb-rl-text-tertiary-color: var(--conv-creme-3);
	--bb-rl-text-disabled-color: #7d7a86;
	--bb-rl-text-brand-primary-color: var(--conv-terra-clair);
	--bb-rl-text-brand-secondary-color: var(--conv-terra-clair);

	--bb-rl-icon-color: var(--conv-creme);
	--bb-rl-icon-primary-color: var(--conv-creme-2);
	--bb-rl-icon-secondary-color: var(--conv-creme-2);
	--bb-rl-icon-tertiary-color: var(--conv-creme-3);
	--bb-rl-icon-disabled-color: #6b6f86;
	--bb-rl-icon-brand-primary-color: var(--conv-terra-clair);
	--bb-rl-icon-brand-secondary-color: var(--conv-terra);
	--bb-rl-icon-info-primary-color: var(--conv-terra-clair);
}

body.bb-readylaunch-template,
body[class*="bb-rl-"] {
	background: var(--conv-nuit);
	color: var(--conv-creme);
	font-family: var(--conv-texte);
}

/* Titres en serif, comme le logo */
body[class*="bb-rl-"] h1,
body[class*="bb-rl-"] h2,
body[class*="bb-rl-"] h3,
body[class*="bb-rl-"] .bb-rl-entry-heading,
body[class*="bb-rl-"] .bb-rl-widget-title,
body[class*="bb-rl-"] .widget-title,
body[class*="bb-rl-"] .item-title {
	font-family: var(--conv-titre);
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* Logo dans l'en-tête */
.bb-rl-site-logo img,
.site-branding img,
.custom-logo {
	max-height: 44px;
	width: auto;
}

/* Liens et focus */
body[class*="bb-rl-"] a:not([class*="button"]):hover { color: var(--conv-terra-clair); }
:focus-visible { outline: 2px solid var(--conv-terra-clair); outline-offset: 2px; }

/* ---------- Thème WordPress (Twenty Twenty-Five) : pages hors communauté ---------- */
:root:root {
	--wp--preset--color--base: var(--conv-nuit);
	--wp--preset--color--contrast: var(--conv-creme);
	--wp--preset--color--accent-1: var(--conv-terra);
	--wp--preset--color--accent-2: var(--conv-terra-clair);
	--wp--preset--color--accent-3: var(--conv-nuit-3);
	--wp--preset--color--accent-4: var(--conv-creme-2);
	--wp--preset--color--accent-5: var(--conv-nuit-2);
	--wp--preset--color--accent-6: var(--conv-trait);
}
body:not([class*="bb-rl-"]) {
	background: var(--conv-nuit);
	color: var(--conv-creme);
	font-family: var(--conv-texte);
}
body:not([class*="bb-rl-"]) :where(h1, h2, h3, h4, .wp-block-site-title, .wp-block-post-title) {
	font-family: var(--conv-titre);
	font-weight: 600;
	color: var(--conv-creme);
}
body:not([class*="bb-rl-"]) a { color: var(--conv-terra-clair); }
body:not([class*="bb-rl-"]) .wp-element-button,
body:not([class*="bb-rl-"]) .wp-block-button__link {
	background: var(--conv-terra);
	color: #fffaf2;
	border-radius: 999px;
}
body:not([class*="bb-rl-"]) .wp-element-button:hover,
body:not([class*="bb-rl-"]) .wp-block-button__link:hover { background: var(--conv-terra-hover); }

/* ---------- Champs de formulaire (connexion, inscription, profil) ---------- */
body[class*="bb-rl-"] input[type="text"],
body[class*="bb-rl-"] input[type="email"],
body[class*="bb-rl-"] input[type="password"],
body[class*="bb-rl-"] input[type="number"],
body[class*="bb-rl-"] input[type="url"],
body[class*="bb-rl-"] input[type="search"],
body[class*="bb-rl-"] select,
body[class*="bb-rl-"] textarea,
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
	background-color: var(--conv-nuit) !important;
	color: var(--conv-creme) !important;
	border: 1px solid var(--conv-trait-2) !important;
	border-radius: 10px;
	color-scheme: dark;
}
body[class*="bb-rl-"] input:focus,
body[class*="bb-rl-"] select:focus,
body[class*="bb-rl-"] textarea:focus {
	border-color: var(--conv-terra-clair) !important;
	box-shadow: 0 0 0 3px rgba(227, 154, 110, .18) !important;
	outline: none;
}
body[class*="bb-rl-"] input::placeholder,
body[class*="bb-rl-"] textarea::placeholder { color: var(--conv-creme-3); }
body[class*="bb-rl-"] input:-webkit-autofill {
	-webkit-box-shadow: 0 0 0 40px var(--conv-nuit) inset !important;
	-webkit-text-fill-color: var(--conv-creme) !important;
}
