/* CFA Connexion — header buttons and login / sign-up pages */

:root {
	--cfa-vert: #00693c;
	--cfa-vert-fonce: #004d2c;
	--cfa-vert-pale: #e6f0ea;
	--cfa-rouge: #b3463c;
	--cfa-rouge-texte: #a63d33;
	--cfa-creme: #f5f4ed;
	--cfa-creme-fonce: #efede3;
	--cfa-ligne: #e3e0d4;
	--cfa-champ: #bdb8a6;
	--cfa-onglets: #f2f0e8;
	--cfa-texte: #212529;
	--cfa-gris: #4a5057;
	--cfa-rayon: 10px;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                            */
/* ------------------------------------------------------------------ */

.cfa-bouton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 20px;
	border-radius: var(--cfa-rayon);
	border: 1.5px solid var(--cfa-vert);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s;
}
.cfa-bouton--plein { background: var(--cfa-vert); color: #fff; }
.cfa-bouton--plein:hover, .cfa-bouton--plein:focus-visible { background: var(--cfa-vert-fonce); border-color: var(--cfa-vert-fonce); color: #fff; }
.cfa-bouton--contour { background: #fff; color: var(--cfa-vert); }
.cfa-bouton--contour:hover, .cfa-bouton--contour:focus-visible { background: var(--cfa-vert-pale); color: var(--cfa-vert-fonce); }
.cfa-bouton--large { width: 100%; min-height: 50px; font-size: 16px; }

.cfa-bouton:focus-visible,
.cfa-entete a:focus-visible,
.cfa-entete button:focus-visible,
.cfa-entete-icone:focus-visible,
.cfa-onglet:focus-visible,
.cfa-mdp__voir:focus-visible,
.cfa-auth a:focus-visible {
	outline: 3px solid #f0b429;
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Header                                                             */
/* ------------------------------------------------------------------ */

#header_main_nav #logo-tagline-wrap { flex-shrink: 0; }

/* Long first names stay on one short line */
.cfa-entete__nom { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Between 1200 and 1399 px: a little less space around the menu links */
@media (min-width: 1200px) and (max-width: 1399.98px) {
	#header_main_nav .main-link { padding-left: .7rem !important; padding-right: .7rem !important; }
}

/* Between 992 and 1199 px the menu and the buttons share less room */
@media (min-width: 992px) and (max-width: 1199.98px) {
	#header_main_nav .main-link { padding-left: .55rem !important; padding-right: .55rem !important; }
	.cfa-entete { margin-left: 10px; padding-left: 10px; }
	.cfa-entete__communaute span,
	.cfa-entete__nom { display: none; }
	.cfa-entete__communaute { padding: 0 11px; }
}

.cfa-entete {
	align-items: center;
	gap: 8px;
	margin-left: 16px;
	padding-left: 16px;
	border-left: 1px solid #d6d2c4;
}
.cfa-entete__rejoindre {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 14px;
	border-radius: var(--cfa-rayon);
	border: 1.5px solid var(--cfa-vert);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.cfa-entete__rejoindre { color: #fff; background: var(--cfa-vert); padding: 0 16px; }
.cfa-entete__rejoindre:hover { color: #fff; background: var(--cfa-vert-fonce); border-color: var(--cfa-vert-fonce); }

.cfa-entete__moi {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 10px 0 4px;
	border-radius: 999px;
	border: 1.5px solid #d6d2c4;
	background: #fff;
	color: var(--cfa-texte);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
}
.cfa-entete__moi:hover { border-color: var(--cfa-vert); }

.cfa-avatar {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	background: var(--cfa-rouge);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}

.cfa-menu-compte {
	min-width: 270px;
	padding: 8px;
	border: 1px solid var(--cfa-ligne);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
	margin-top: 8px !important;
}
.cfa-menu-compte__qui {
	display: flex;
	flex-direction: column;
	padding: 8px 12px 12px;
	margin-bottom: 6px;
	border-bottom: 1px solid var(--cfa-creme-fonce);
	font-size: 15px;
}
.cfa-menu-compte__qui span { font-size: 13px; color: var(--cfa-gris); word-break: break-all; }
.cfa-menu-compte .dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 8px;
	font-size: 15px;
	color: var(--cfa-texte);
}
.cfa-menu-compte .dropdown-item svg { color: var(--cfa-vert); }
.cfa-menu-compte .dropdown-item:hover,
.cfa-menu-compte .dropdown-item:focus { background: var(--cfa-vert-pale); color: var(--cfa-vert-fonce); }

/* Phone: icon next to the menu button */
.cfa-entete-icone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-right: 8px;
	border-radius: var(--cfa-rayon);
	border: 1.5px solid var(--cfa-vert);
	color: var(--cfa-vert);
	box-sizing: border-box;
}
.cfa-entete-icone--membre { border: 0; }

/* Phone: buttons at the bottom of the open menu */
.cfa-menu-mobile {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 16px -12px 4px;
	padding: 18px 16px 20px;
	background: var(--cfa-creme-fonce);
	border-top: 1px solid var(--cfa-ligne);
	border-radius: 0 0 12px 12px;
}
.cfa-menu-mobile__titre {
	margin: 0 0 4px;
	font-family: Bungee, sans-serif;
	font-size: 18px;
	color: var(--cfa-rouge);
}

/* Home page: welcome bar for members */
.cfa-bienvenue { background: var(--cfa-vert-pale); border-bottom: 1px solid #cfe2d6; }
.cfa-bienvenue .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-top: 14px;
	padding-bottom: 14px;
}
.cfa-bienvenue p { margin: 0; font-size: 15px; color: #1f3a2c; }
.cfa-bienvenue a { font-weight: 700; color: var(--cfa-vert); }

/* "Rejoignez la communauté" bar on the home page: visitors only */
body.logged-in .cfa-visiteurs-seulement { display: none !important; }

/* ------------------------------------------------------------------ */
/* Login / sign-up pages                                              */
/* ------------------------------------------------------------------ */

.cfa-auth {
	max-width: 1000px;
	margin: 0 auto;
	padding: 48px 16px 56px;
	color: var(--cfa-texte);
	font-size: 16px;
}

.cfa-carte {
	background: #fff;
	border: 1px solid var(--cfa-ligne);
	border-radius: 18px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .06);
	overflow: hidden;
}
.cfa-carte--double { display: flex; flex-wrap: wrap; }
.cfa-carte--simple {
	max-width: 560px;
	margin: 0 auto;
	padding: 44px 40px 36px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}
.cfa-carte--formulaire { align-items: stretch; text-align: left; }
.cfa-carte--formulaire .cfa-titre { text-align: center; }
.cfa-carte--formulaire .cfa-doux { text-align: center; }

/* Green side panel */
.cfa-cote {
	flex: 1 1 340px;
	position: relative;
	overflow: hidden;
	background: var(--cfa-vert);
	color: #fff;
	padding: 44px 40px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.cfa-cote::after {
	content: "";
	position: absolute;
	right: -110px;
	bottom: -110px;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	border: 22px dashed rgba(255, 255, 255, .18);
	pointer-events: none;
}
.cfa-cote__titre {
	margin: 0;
	font-family: Bungee, sans-serif;
	font-weight: 400;
	font-size: 32px;
	line-height: 1.15;
	color: #fff;
}
.cfa-cote__texte { margin: 0; font-size: 16px; line-height: 1.6; color: #e3f0e8; }
.cfa-cote__liste,
.cfa-cote__etapes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; font-size: 15px; }
.cfa-cote__liste li { display: flex; gap: 12px; align-items: flex-start; }
.cfa-cote__liste svg { flex-shrink: 0; }
.cfa-cote__etapes li { display: flex; gap: 14px; align-items: center; line-height: 1.5; color: #d3e8db; }
.cfa-cote__etapes strong { color: #fff; }
.cfa-num {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 999px;
	border: 2px solid #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	color: #fff;
	box-sizing: border-box;
}
.cfa-num--actif { background: #fff; color: var(--cfa-vert); }

/* Form side */
.cfa-principal {
	flex: 1 1 420px;
	min-width: 0;
	padding: 36px 44px 40px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cfa-onglets { display: flex; gap: 4px; padding: 4px; background: var(--cfa-onglets); border-radius: 12px; }
.cfa-onglet {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	border-radius: 9px;
	font-size: 15px;
	font-weight: 600;
	color: var(--cfa-gris);
	text-decoration: none;
	text-align: center;
}
.cfa-onglet:hover { color: var(--cfa-texte); }
.cfa-onglet.est-actif { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); font-weight: 700; color: var(--cfa-texte); }

.cfa-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.cfa-champ { display: flex; flex-direction: column; gap: 8px; }
.cfa-champ label,
.cfa-champ__entete label { font-size: 14px; font-weight: 700; margin: 0; }
.cfa-champ__entete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cfa-champ__entete a { font-size: 14px; font-weight: 600; color: var(--cfa-vert); }

.cfa-auth input[type="text"],
.cfa-auth input[type="email"],
.cfa-auth input[type="password"] {
	width: 100%;
	height: 48px;
	box-sizing: border-box;
	border: 1.5px solid var(--cfa-champ);
	border-radius: var(--cfa-rayon);
	padding: 0 14px;
	font-family: inherit;
	font-size: 16px;
	background: #fff;
	color: var(--cfa-texte);
}
.cfa-auth input::placeholder { color: #767b80; }
.cfa-auth input:focus {
	outline: none;
	border-color: var(--cfa-vert);
	box-shadow: 0 0 0 3px rgba(0, 105, 60, .2);
}

.cfa-mdp { position: relative; display: flex; }
.cfa-mdp input { padding-right: 112px !important; }
.cfa-mdp__voir {
	position: absolute;
	right: 4px;
	top: 4px;
	height: 40px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 0;
	border-radius: 8px;
	background: var(--cfa-onglets);
	color: var(--cfa-vert);
	font-family: inherit;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}

.cfa-jauge { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cfa-jauge span { height: 5px; border-radius: 3px; background: var(--cfa-ligne); transition: background-color .2s; }
.cfa-jauge[data-niveau="1"] span:nth-child(-n+1) { background: var(--cfa-rouge); }
.cfa-jauge[data-niveau="2"] span:nth-child(-n+2) { background: #c98a1b; }
.cfa-jauge[data-niveau="3"] span:nth-child(-n+3) { background: var(--cfa-vert); }
.cfa-jauge[data-niveau="4"] span { background: var(--cfa-vert); }

.cfa-aide { margin: 0; font-size: 13px; color: var(--cfa-gris); }

.cfa-case { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-top: 10px; font-size: 15px; cursor: pointer; margin: 0; }
.cfa-case input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--cfa-vert); }
.cfa-case small { color: var(--cfa-gris); font-size: 13px; }

.cfa-petit { margin: -8px 0 0; font-size: 13px; color: var(--cfa-gris); }
.cfa-centre { text-align: center; }
.cfa-bas { margin: 0; text-align: center; font-size: 15px; }
.cfa-bas a, .cfa-aide-bas a, .cfa-lien-texte { font-weight: 700; color: var(--cfa-vert); }
.cfa-aide-bas { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--cfa-gris); }

/* Messages (TML errors and notices) */
.cfa-alertes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cfa-alertes li { padding: 12px 14px; border-radius: var(--cfa-rayon); font-size: 14px; line-height: 1.5; }
.cfa-alertes .tml-error { background: #fbeee9; border: 1px solid #ecc7bd; color: #7c2a21; }
.cfa-alertes .tml-message { background: var(--cfa-vert-pale); border: 1px solid #cfe2d6; color: #1f3a2c; }
.cfa-alertes a { color: inherit; font-weight: 700; text-decoration: underline; }

/* Single-card screens (check email, confirm link, lost password) */
.cfa-pastille {
	width: 76px;
	height: 76px;
	border-radius: 999px;
	background: var(--cfa-vert-pale);
	color: var(--cfa-vert);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.cfa-etape { margin: 0; font-size: 13px; font-weight: 700; color: var(--cfa-vert); letter-spacing: .5px; text-transform: uppercase; }
.cfa-titre {
	margin: 0;
	font-family: Bungee, sans-serif;
	font-weight: 400;
	font-size: 28px;
	line-height: 1.2;
	color: var(--cfa-texte);
}
.cfa-titre--rouge { color: var(--cfa-rouge); }
.cfa-carte--simple p { margin: 0; }
.cfa-grand { font-size: 16px; line-height: 1.6; }
.cfa-grand strong { word-break: break-all; }
.cfa-doux { font-size: 15px; line-height: 1.6; color: var(--cfa-gris); }
.cfa-astuces {
	margin: 6px 0 0;
	padding: 16px 18px;
	list-style: none;
	width: 100%;
	box-sizing: border-box;
	background: #f7f6f0;
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: left;
	font-size: 14px;
}
.cfa-astuces li { display: flex; gap: 10px; align-items: flex-start; }
.cfa-astuces svg { color: var(--cfa-vert); flex-shrink: 0; }
.cfa-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 6px; }

/* Honeypot: off-screen, still in the form */
.cfa-pot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* reCAPTCHA or other plugins' fields */
.cfa-form .g-recaptcha { margin: 0 auto; }

/* The theme hides the page title area on these pages; keep the cream background */
body.cfa-page-connexion { background-color: var(--cfa-creme); }

@media (max-width: 575.98px) {
	.cfa-auth { padding: 20px 12px 40px; }
	.cfa-cote { padding: 28px 24px; gap: 16px; }
	.cfa-cote__titre { font-size: 26px; }
	.cfa-cote::after { display: none; }
	.cfa-principal { padding: 24px 18px 28px; }
	.cfa-carte--simple { padding: 32px 20px 28px; }
	.cfa-titre { font-size: 24px; }
}

/* Phones: no card, no green panel — a short title, then the form (as in the mockup) */
@media (max-width: 767.98px) {
	.cfa-carte--double { background: transparent; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
	.cfa-cote { background: transparent; color: var(--cfa-texte); padding: 4px 4px 0; gap: 6px; }
	.cfa-cote::after { display: none; }
	.cfa-cote__titre { color: var(--cfa-rouge); font-size: 26px; }
	.cfa-cote__texte { color: var(--cfa-gris); font-size: 14px; }
	.cfa-cote__liste,
	.cfa-cote__etapes { display: none; }
	.cfa-principal { padding: 18px 4px 8px; }
}

/* Password confirmation hint */
.cfa-correspond:empty { display: none; }
.cfa-correspond[data-etat="ok"] { color: var(--cfa-vert); font-weight: 700; }
.cfa-correspond[data-etat="non"] { color: #a63d33; font-weight: 700; }
