/* ==========================================================
   Community Frontend — v0.2.0
   Utilise le design system --community-* (défini par le thème
   actif) avec repli --cc-*/valeurs neutres si le thème ne le
   fournit pas encore — jamais de couleur en dur sans repli.
   ========================================================== */

.cf-plans, .cf-payment-return, .cf-member-space {
	font-family: var(--community-font-sans, var(--cc-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
	max-width: 960px;
	margin: 0 auto;
	color: var(--community-text, var(--cc-color-text, #172033));
	font-size: 14.5px;
	line-height: 1.55;
}

.cf-plans__header { margin-bottom: 18px; }
.cf-plans__title { margin: 0; font-size: 20px; font-weight: 700; }
.cf-plans__empty { color: var(--community-text-muted, var(--cc-color-text-muted, #64748b)); }

/* --- Alertes --- */

.cf-notice {
	border-radius: var(--community-radius-md, var(--cc-radius-md, 10px));
	padding: 12px 14px;
	margin-bottom: 14px;
	font-size: 13.5px;
}
.cf-notice--info { background: #F0FDFA; border: 1px solid #99F6E4; color: #115E59; }
.cf-notice--error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.cf-notice--success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #15803D; }
.cf-notice p { margin: 0 0 6px; }
.cf-notice p:last-child { margin-bottom: 0; }

/* --- Estimation € / $ (diaspora) : bascule en CSS pur, même principe
   que .cf-plan-toggle / .cf-auth__radio — une case à cocher invisible,
   révélée par le sibling-combinator ci-dessous. Affichage indicatif
   uniquement : le paiement reste toujours en FCFA. --- */

.cf-plans__fx-checkbox { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.cf-plans__fx-label {
	display: inline-flex;
	align-items: center;
	margin: 0 0 14px;
	font-size: 13.5px;
	color: var(--community-text-muted, #64748b);
	cursor: pointer;
	user-select: none;
}
.cf-plans__fx-label::before {
	content: "";
	display: inline-block;
	width: 13px;
	height: 13px;
	margin-right: 7px;
	flex-shrink: 0;
	border: 1px solid var(--community-border, #cbd5e1);
	border-radius: 3px;
	background: var(--community-surface, #fff);
}
/* L'input est un frère direct de son label (voir le template) : "+" cible
   le label juste après pour dessiner la case cochée. */
.cf-plans__fx-checkbox:checked + .cf-plans__fx-label::before {
	background: var(--community-primary, #14b8a6);
	border-color: var(--community-primary, #14b8a6);
}
.cf-plans__fx-checkbox:focus-visible + .cf-plans__fx-label { outline: 2px solid var(--community-primary, #14b8a6); outline-offset: 2px; }

.cf-plan-card__estimate { display: none; font-size: 12.5px; color: var(--community-text-muted, #64748b); }
/* L'input est aussi un frère direct de .cf-plans__grid (même parent, même
   niveau) : "~" révèle les estimations partout dans la grille une fois
   la case cochée, sans aucun JavaScript. */
.cf-plans__fx-checkbox:checked ~ .cf-plans__grid .cf-plan-card__estimate { display: block; }

/* --- Grille de formules --- */

.cf-plans__grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .cf-plans__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cf-plans__grid { grid-template-columns: repeat(3, 1fr); } }

.cf-card, .cf-plan-card {
	background: var(--community-surface, var(--cc-color-surface, #fff));
	border: 1px solid var(--community-border, var(--cc-color-border, #e2e8f0));
	border-radius: var(--community-radius-md, var(--cc-radius-md, 10px));
	box-shadow: var(--community-shadow-sm, 0 1px 2px rgba(15, 23, 42, .06));
	padding: 18px;
}

.cf-plan-card { display: flex; flex-direction: column; gap: 8px; }
.cf-plan-card__name { margin: 0; font-size: 16px; font-weight: 700; }
.cf-plan-card__description { color: var(--community-text-muted, #64748b); font-size: 13px; margin: 0; }
.cf-plan-card__price { font-size: 22px; font-weight: 700; margin: 2px 0; }
.cf-plan-card__meta { list-style: none; padding: 0; margin: 0 0 4px; color: var(--community-text-muted, #64748b); font-size: 12.5px; }
/* margin-top: auto pousse déjà le bouton en bas de carte (hauteur égale sur
   toute la ligne de la grille) ; sur une formule avec peu de fonctionnalités
   (Découverte, Essential), ça laisse un grand vide qui paraît inachevé plutôt
   qu'aligné. Cette ligne transforme ce vide en un vrai "pied de carte" --
   un repère visuel, pas un oubli. */
.cf-plan-card__form { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--community-border, #e2e8f0); }
.cf-plan-card > .cf-button { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--community-border, #e2e8f0); }

/* ==========================================================
   Boutons — COMPACTS PAR DÉFAUT (correctif v0.2.0 : l'ancienne
   version forçait width:100% sur .cf-button, produisant les
   "gros blocs" — corrigé ici).
   ========================================================== */

.cf-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: auto;
	text-align: center;
	padding: 8px 16px;
	border-radius: var(--community-radius-sm, var(--cc-radius-sm, 6px));
	border: 1px solid var(--community-border, var(--cc-color-border, #e2e8f0));
	background: var(--community-surface, #fff);
	color: var(--community-text, #172033);
	text-decoration: none;
	font-weight: 600;
	cursor: pointer;
	font-size: 13.5px;
	line-height: 1.2;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.cf-button:hover { border-color: var(--community-primary, var(--cc-color-accent, #14b8a6)); }
.cf-button--primary { background: var(--community-primary, var(--cc-color-accent, #14b8a6)); border-color: var(--community-primary, var(--cc-color-accent, #14b8a6)); color: #fff; }
.cf-button--primary:hover { background: var(--community-primary-dark, var(--cc-color-accent-dark, #0f766e)); border-color: var(--community-primary-dark, #0f766e); }
.cf-button--sm { padding: 5px 11px; font-size: 12px; }
.cf-button--full { width: 100%; } /* opt-in explicite uniquement (ex. formulaire pleine largeur du formulaire "Choisir cette formule") */
.cf-button[disabled] { opacity: 0.6; cursor: wait; }

/* Formulaire de choix de formule : conserve le bouton pleine largeur (c'est un CTA principal isolé, pas une action secondaire). */
.cf-plan-card__form .cf-button { width: 100%; }

.cf-card { margin-bottom: 14px; }
.cf-card__title { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.cf-card__meta { color: var(--community-text-muted, #64748b); font-size: 13px; }

.cf-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: var(--community-radius-sm, 999px);
	font-size: 11px;
	font-weight: 700;
	margin-bottom: 6px;
}
.cf-badge--active { background: #DCFCE7; color: #15803D; }
.cf-badge--inactive { background: #F1F5F9; color: #64748B; }

/* ==========================================================
   Espace membre — vrai dashboard (v0.2.0)
   ========================================================== */

.cf-dashboard-greeting-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cf-dashboard-greeting-row img { border-radius: 50%; flex-shrink: 0; }
.cf-dashboard-greeting { font-size: 19px; font-weight: 700; margin: 0; }

.cf-summary-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 18px;
}
@media (min-width: 640px) { .cf-summary-grid { grid-template-columns: repeat(4, 1fr); } }

.cf-summary-stat {
	background: var(--community-surface, #fff);
	border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-md, 10px);
	padding: 12px 14px;
}
.cf-summary-stat__value { display: block; font-size: 19px; font-weight: 700; line-height: 1.1; }
.cf-summary-stat__label { display: block; font-size: 11.5px; color: var(--community-text-muted, #64748b); margin-top: 3px; }

.cf-section-title { font-size: 14px; font-weight: 700; margin: 22px 0 10px; color: var(--community-text-muted, #64748b); text-transform: none; }

.cf-member-space__courses { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cf-course-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	background: var(--community-surface, #fff);
	border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-sm, 6px);
	flex-wrap: wrap;
}
.cf-course-item__title { font-weight: 600; font-size: 13.5px; }
.cf-course-item__progress { color: var(--community-text-muted, #64748b); font-size: 12px; }

.cf-empty-state {
	text-align: center;
	padding: 28px 16px;
	background: var(--community-surface, #fff);
	border: 1px dashed var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-md, 10px);
	color: var(--community-text-muted, #64748b);
	font-size: 13.5px;
}
.cf-empty-state .cf-button { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
	.cf-plans *, .cf-payment-return *, .cf-member-space *, .cf-reader * { transition: none !important; animation: none !important; }
}

/* --- Lecteur de formation (Course_Reader) --- */

.cf-reader {
	font-family: var(--community-font-sans, var(--cc-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
	max-width: 780px;
	margin: 0 auto;
	color: var(--community-text, #172033);
	font-size: 14.5px;
}

.cf-reader__breadcrumb { margin-bottom: 14px; font-size: 13px; }
.cf-reader__breadcrumb a { color: var(--community-text-muted, #64748b); text-decoration: none; }

.cf-reader__header { margin-bottom: 20px; }
.cf-reader__title { margin: 0 0 10px; font-size: 21px; font-weight: 700; }
.cf-reader__completed { color: #15803D; font-weight: 600; font-size: 13.5px; }

.cf-progress__track { height: 8px; background: var(--community-border, #e2e8f0); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.cf-progress--sm .cf-progress__track { height: 5px; }
.cf-progress__bar { display: block; height: 100%; background: var(--community-primary, #14b8a6); border-radius: 999px; }
.cf-progress__label { display: block; font-size: 12px; color: var(--community-text-muted, #64748b); margin-bottom: 14px; }

.cf-reader__modules { display: grid; gap: 12px; }

.cf-module-block { background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0); border-radius: var(--community-radius-md, 10px); padding: 14px; }
.cf-module-block__title { margin: 0 0 8px; font-size: 14px; font-weight: 700; }

.cf-lesson-list { list-style: none; margin: 0; padding: 0; }
.cf-lesson-list__item { border-top: 1px solid var(--community-border, #e2e8f0); }
.cf-lesson-list__item:first-child { border-top: none; }
.cf-lesson-list__item a { display: flex; align-items: center; gap: 8px; padding: 9px 4px; text-decoration: none; color: inherit; font-size: 13.5px; }
.cf-lesson-list__item--done a { color: var(--community-text-muted, #64748b); }
.cf-lesson-list__icon { flex-shrink: 0; }

@media (min-width: 640px) { .cf-reader { padding: 0 16px; } }

/* --- Catalogue de formations --- */

.cf-courses-catalog { font-family: var(--community-font-sans, var(--cc-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif)); max-width: 1080px; margin: 0 auto; color: var(--community-text, #172033); }
.cf-courses-catalog__title { font-size: 24px; font-weight: 700; margin: 0 0 24px; }

.cf-catalog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.cf-catalog-filter { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0); color: var(--community-text-muted, #64748b); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.cf-catalog-filter:hover { border-color: var(--community-primary, #14b8a6); color: var(--community-text, #172033); }
.cf-catalog-filter.is-active { background: var(--community-primary, #14b8a6); border-color: var(--community-primary, #14b8a6); color: var(--community-on-primary, #062f2b); }

.cf-courses-catalog__grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .cf-courses-catalog__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cf-courses-catalog__grid { grid-template-columns: repeat(3, 1fr); } }

.cf-course-card {
	background: var(--community-surface, #fff);
	border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-md, 10px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--community-shadow-sm, 0 1px 2px rgba(15, 23, 42, .06));
	transition: box-shadow .18s ease, transform .18s ease;
}
.cf-course-card:hover { box-shadow: var(--community-shadow-md, 0 4px 12px rgba(15, 23, 42, .1)); transform: translateY(-2px); }

.cf-course-card__cover { height: 130px; position: relative; }
.cf-course-card__cover img { display: block; width: 100%; height: 130px; object-fit: cover; }
.cf-course-card__cover--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--community-primary, #14b8a6) 0%, var(--community-primary-dark, #0f766e) 100%);
}
.cf-course-card__cover-icon { font-size: 34px; filter: grayscale(1) brightness(3); opacity: .85; }
.cf-course-card__done {
	position: absolute;
	bottom: 8px;
	left: 8px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--community-primary, #14b8a6);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
}

.cf-course-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cf-course-card__title { font-size: 16px; font-weight: 700; margin: 4px 0 0; line-height: 1.35; }
.cf-course-card__excerpt { font-size: 13px; color: var(--community-text-muted, #64748b); margin: 0; line-height: 1.5; }
.cf-course-card__meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--community-text-muted, #64748b); margin: 4px 0 6px; flex-wrap: wrap; }
.cf-course-card .cf-button { margin-top: auto; align-self: flex-start; }

@media (prefers-reduced-motion: reduce) { .cf-course-card { transition: none !important; } .cf-course-card:hover { transform: none !important; } }

/* --- Page détail formation (accès requis) : présentation type page de vente --- */

.cf-course-detail { max-width: 720px; margin: 0 auto; }
.cf-course-detail__title { font-size: 26px; font-weight: 700; margin: 0 0 10px; line-height: 1.25; }
.cf-course-detail__intro { font-size: 15px; color: var(--community-text-muted, #64748b); line-height: 1.65; margin: 0 0 16px; }

.cf-course-detail__meta {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	padding: 0;
	margin: 0 0 24px;
	font-size: 13px;
	color: var(--community-text-muted, #64748b);
}
.cf-course-detail__meta li::before { content: "•"; margin-right: 6px; color: var(--community-border, #e2e8f0); }
.cf-course-detail__meta li:first-child::before { content: none; }

.cf-course-detail__block { margin-bottom: 24px; }
.cf-course-detail__block h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.cf-course-detail__objectives { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cf-course-detail__objectives li { padding-left: 26px; position: relative; font-size: 14px; line-height: 1.5; }
.cf-course-detail__objectives li::before { content: "✓"; position: absolute; left: 0; color: var(--community-primary, #14b8a6); font-weight: 700; }

.cf-course-detail__cta {
	background: var(--community-surface, #fff);
	border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-lg, 16px);
	padding: 22px;
	text-align: center;
}
.cf-course-detail__value { margin: 0 0 12px; }
.cf-course-detail__value-struck { text-decoration: line-through; color: var(--community-text-muted, #64748b); font-size: 14px; margin-right: 8px; }
.cf-course-detail__value-free { font-weight: 700; color: var(--community-primary-dark, #0f766e); font-size: 15px; }
.cf-course-detail__cta .cf-button { margin: 4px 4px 0; }

/* --- Formules : récapitulatif + bascule mensuel/annuel (CSS pur) --- */

.cf-plan-card__recap { list-style: none; padding: 0; margin: 12px 0 16px; border-top: 1px solid var(--community-border, #e2e8f0); }
.cf-plan-card__recap li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--community-border, #e2e8f0); font-size: 13px; }
.cf-plan-card__recap li span { color: var(--community-text-muted, #64748b); }
.cf-plan-card__recap li strong { font-weight: 700; }

.cf-plan-toggle { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cf-plan-toggle input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.cf-plan-toggle label {
	flex: 1;
	text-align: center;
	padding: 7px 10px;
	border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-sm, 6px);
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	color: var(--community-text-muted, #64748b);
}
.cf-plan-toggle input[type="radio"]:checked + label {
	background: var(--community-primary, #14b8a6);
	border-color: var(--community-primary, #14b8a6);
	color: #fff;
}
.cf-plan-toggle input[type="radio"]:focus-visible + label { outline: 2px solid var(--community-primary, #14b8a6); outline-offset: 2px; }

.cf-plan-toggle__panel { display: none; width: 100%; order: 3; }
.cf-plan-toggle input[id$="-monthly"]:checked ~ .cf-plan-toggle__panel--monthly,
.cf-plan-toggle input[id$="-yearly"]:checked ~ .cf-plan-toggle__panel--yearly {
	display: block;
}

/* --- Activité récente --- */

.cf-activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cf-activity-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	background: var(--community-surface, #fff);
	border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-sm, 6px);
	font-size: 13px;
}
.cf-activity-item__icon { flex-shrink: 0; font-size: 15px; }
.cf-activity-item__label { flex: 1; color: var(--community-text, #172033); }
.cf-activity-item__date { flex-shrink: 0; color: var(--community-text-muted, #64748b); font-size: 11.5px; white-space: nowrap; }

/* --- Bouton favori --- */

.cf-course-card__bookmark { position: absolute; top: 10px; right: 10px; }
.cf-course-card { position: relative; }
.cf-bookmark-btn {
	width: 30px; height: 30px; border-radius: 50%; border: none;
	background: rgba(255, 255, 255, .92); cursor: pointer; font-size: 16px;
	color: var(--community-text-muted, #64748b);
	display: flex; align-items: center; justify-content: center;
	box-shadow: var(--community-shadow-sm, 0 1px 2px rgba(15,23,42,.08));
}
.cf-bookmark-btn.is-active { color: var(--community-accent, #f59e0b); }

.cf-reader__title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cf-reader__title-row .cf-bookmark-btn { width: auto; height: auto; border-radius: var(--community-radius-sm, 6px); padding: 6px 12px; font-size: 13px; font-weight: 600; box-shadow: none; border: 1px solid var(--community-border, #e2e8f0); background: var(--community-surface, #fff); }
.course-denied .cf-bookmark-btn, .cf-course-detail .cf-bookmark-btn { width: auto; height: auto; border-radius: var(--community-radius-sm, 6px); padding: 8px 14px; font-size: 13px; font-weight: 600; box-shadow: none; border: 1px solid var(--community-border, #e2e8f0); background: var(--community-surface, #fff); }

/* --- Bandeau "Continuer l'apprentissage" --- */

.cf-continue-banner {
	background: linear-gradient(135deg, var(--community-primary, #14b8a6) 0%, var(--community-primary-dark, #0f766e) 100%);
	color: #fff;
	border-radius: var(--community-radius-lg, 16px);
	padding: 18px 20px;
	margin-bottom: 18px;
}
.cf-continue-banner__greeting { margin: 0 0 4px; font-size: 13px; font-weight: 600; opacity: .9; }
.cf-continue-banner__course { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.cf-continue-banner .cf-progress__track { background: rgba(255, 255, 255, .3); }
.cf-continue-banner .cf-progress__bar { background: #fff; }
.cf-continue-banner .cf-progress__label { color: rgba(255, 255, 255, .9); }
.cf-continue-banner .cf-button--primary { background: #fff; color: var(--community-primary-dark, #0f766e); margin-top: 10px; }
.cf-continue-banner .cf-button--primary:hover { background: #f0fdfa; }

/* --- Mes favoris --- */

.cf-favorites-group-label { font-size: 12px; font-weight: 700; color: var(--community-text-muted, #64748b); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .04em; }

/* --- Notifications --- */

.cf-notifications { margin-bottom: 18px; }
.cf-notifications__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.cf-notifications__badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
	background: var(--community-danger, #dc2626); color: #fff; font-size: 11px; font-weight: 700;
	vertical-align: middle; margin-left: 4px;
}
.cf-notification-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cf-notification-item {
	display: flex; align-items: flex-start; gap: 10px;
	padding: 10px 12px; border-radius: var(--community-radius-sm, 6px);
	background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0);
}
.cf-notification-item.is-unread { background: #F0FDFA; border-color: #99F6E4; }
.cf-notification-item__icon { font-size: 18px; flex-shrink: 0; }
.cf-notification-item__body { flex: 1; min-width: 0; }
.cf-notification-item__title { margin: 0; font-size: 13.5px; font-weight: 700; }
.cf-notification-item__message { margin: 2px 0 0; font-size: 12.5px; color: var(--community-text-muted, #64748b); }

/* =====================================================================
   Tableau de bord « Mon espace » (refonte 0.5.0)
   Couleurs et polices : variables du système de personnalisation.
   ===================================================================== */

.cf-member-space.cf-dash { max-width: 1180px; }
.cf-dash { --dash-r: 16px; color: var(--community-text, #172033); }
.cf-dash *, .cf-dash *::before, .cf-dash *::after { box-sizing: border-box; }
.cf-dash h1, .cf-dash h2, .cf-dash h4 { font-family: var(--community-font-heading, inherit); }

/* En-tête */
.cf-dash-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.cf-dash-edit-profile { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--community-primary-dark, #0f766e); text-decoration: none; white-space: nowrap; }
.cf-dash-edit-profile:hover { text-decoration: underline; }
.cf-dash-avatar { border-radius: 50%; flex: 0 0 auto; }
.cf-dash-hello { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 800; }
.cf-dash-chips { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cf-dash-chip { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.cf-dash-chip--plan { background: #ccfbf1; color: var(--community-primary-dark, #0f766e); }
.cf-dash-chip--off { background: #fee2e2; color: #991b1b; }
.cf-dash-chip--level { background: #fef3c7; color: #92400e; }

/* Notifications regroupées */
.cf-dash-notif { margin: 0 0 18px; }
.cf-dash-notif__banner { display: flex; align-items: flex-start; gap: 12px; background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0); border-left: 4px solid var(--community-primary, #14b8a6); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.cf-dash-notif__lines { flex: 1; min-width: 0; }
.cf-dash-notif__line { margin: 0 0 4px; display: flex; gap: 10px; align-items: baseline; }
.cf-dash-notif__line:last-child { margin-bottom: 0; }
.cf-dash-notif__ic { flex: 0 0 auto; }
.cf-dash-notif__more { margin: 4px 0 0; color: var(--community-text-muted, #64748b); font-size: 13px; }
.cf-dash-notif__all { margin: 0; flex: 0 0 auto; }
.cf-dash-link { color: var(--community-primary-dark, #0f766e); font-weight: 600; text-decoration: none; font-size: 13.5px; background: none; border: 0; padding: 0; cursor: pointer; margin-left: 6px; }
.cf-dash-link:hover { text-decoration: underline; }
.cf-dash-notif__history { margin-top: 8px; }
.cf-dash-notif__history > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--community-text-muted, #64748b); padding: 4px 2px; }
.cf-dash-notif__history .cf-notification-list { margin-top: 8px; }

/* Bloc « Reprendre » */
.cf-dash-resume { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin: 0 0 18px; padding: 26px 28px; border-radius: 20px; color: var(--community-hero-text, #fff); background: var(--community-hero-bg, #0b1220); background: linear-gradient(120deg, var(--community-hero-bg, #0b1220) 0%, var(--community-hero-bg, #0b1220) 45%, color-mix(in srgb, var(--community-hero-bg, #0b1220) 70%, var(--community-primary, #14b8a6) 30%) 130%); }
.cf-dash-resume::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(20, 184, 166, .16); background: color-mix(in srgb, var(--community-primary, #14b8a6) 10%, transparent); pointer-events: none; }
.cf-dash-resume { --dash-accent: var(--community-primary, #14b8a6); }
@supports (color: color-mix(in srgb, red, blue)) {
	/* Mélange couleur principale + texte du bandeau : reste visible sur un fond clair comme sombre. */
	.cf-dash-resume { --dash-accent: color-mix(in srgb, var(--community-primary, #14b8a6) 55%, var(--community-hero-text, #fff) 45%); }
}
.cf-dash-resume__eyebrow { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--dash-accent); }
.cf-dash-resume__title { margin: 6px 0 2px; font-size: 22px; line-height: 1.25; color: inherit; }
.cf-dash-resume__next { margin: 0 0 16px; opacity: .8; font-size: 14px; }
.cf-dash-resume__bar { display: none; height: 8px; background: rgba(127, 127, 127, .3); border-radius: 99px; overflow: hidden; max-width: 420px; }
.cf-dash-resume__bar i { display: block; height: 100%; background: var(--dash-accent); border-radius: 99px; }
.cf-dash-resume__pct { display: none; margin: 6px 0 16px; font-size: 12.5px; opacity: .75; }
.cf-dash-btn { position: relative; z-index: 1; display: inline-block; background: var(--community-primary, #14b8a6); color: var(--community-on-primary, #062f2b); font-weight: 700; border-radius: var(--community-button-radius, 10px); padding: 10px 20px; text-decoration: none; font-size: 14.5px; }
.cf-dash-btn:hover { filter: brightness(1.08); }
.cf-dash-ring { position: relative; z-index: 1; width: 112px; height: 112px; }
.cf-dash-ring svg { transform: rotate(-90deg); display: block; }
.cf-dash-ring__track { stroke: rgba(127, 127, 127, .3); }
.cf-dash-ring__value { stroke: var(--dash-accent); }
.cf-dash-ring__n { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 24px; }
.cf-dash-ring__n small { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; opacity: .7; }

/* Statistiques */
.cf-dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 0 0 22px; }
.cf-dash-stat { background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0); border-radius: var(--dash-r); padding: 16px 18px; display: flex; flex-direction: column; }
.cf-dash-stat__v { font-size: 26px; font-weight: 800; line-height: 1.1; }
.cf-dash-stat__l { color: var(--community-text-muted, #64748b); font-size: 13px; margin-top: 4px; }
.cf-dash-stat__bar { display: block; height: 6px; margin-top: 10px; background: var(--community-border, #e2e8f0); border-radius: 99px; overflow: hidden; }
.cf-dash-stat__bar i { display: block; height: 100%; background: var(--community-accent, #f59e0b); }

/* Mise en page */
.cf-dash-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.cf-dash-main, .cf-dash-aside { min-width: 0; }
.cf-dash-panel { background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0); border-radius: var(--dash-r); padding: 18px 18px 16px; margin: 0 0 16px; }
.cf-dash-panel__title { margin: 0 0 12px; font-size: 16px; font-weight: 700; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cf-dash-panel__title small { font-size: 12.5px; font-weight: 600; color: var(--community-text-muted, #64748b); }
.cf-dash-empty { margin: 0; color: var(--community-text-muted, #64748b); font-size: 13.5px; }

/* Onglets sans JavaScript */
.cf-dash-tabs > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.cf-dash-tabbar { display: flex; gap: 6px; background: var(--community-bg, #f1f5f9); border-radius: 12px; padding: 4px; margin: 0 0 16px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cf-dash-tabbar::-webkit-scrollbar { display: none; }
.cf-dash-tabbar label { padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--community-text-muted, #64748b); cursor: pointer; white-space: nowrap; }
.cf-dash-tabbar label b { margin-left: 5px; font-size: 12px; font-weight: 700; background: var(--community-border, #e2e8f0); border-radius: 99px; padding: 1px 7px; }
#cf-tab-all:checked ~ .cf-dash-tabbar label[for="cf-tab-all"],
#cf-tab-progress:checked ~ .cf-dash-tabbar label[for="cf-tab-progress"],
#cf-tab-new:checked ~ .cf-dash-tabbar label[for="cf-tab-new"],
#cf-tab-done:checked ~ .cf-dash-tabbar label[for="cf-tab-done"] { background: var(--community-surface, #fff); color: var(--community-text, #172033); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
#cf-tab-all:focus-visible ~ .cf-dash-tabbar label[for="cf-tab-all"],
#cf-tab-progress:focus-visible ~ .cf-dash-tabbar label[for="cf-tab-progress"],
#cf-tab-new:focus-visible ~ .cf-dash-tabbar label[for="cf-tab-new"],
#cf-tab-done:focus-visible ~ .cf-dash-tabbar label[for="cf-tab-done"] { outline: 3px solid var(--community-primary, #14b8a6); outline-offset: 2px; }
.cf-dash-pane { display: none; }
#cf-tab-all:checked ~ .cf-dash-panes .cf-dash-pane--all,
#cf-tab-progress:checked ~ .cf-dash-panes .cf-dash-pane--progress,
#cf-tab-new:checked ~ .cf-dash-panes .cf-dash-pane--new,
#cf-tab-done:checked ~ .cf-dash-panes .cf-dash-pane--done { display: block; }

/* Cartes de formation */
.cf-dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.cf-dash-card { border: 1px solid var(--community-border, #e2e8f0); border-radius: 14px; overflow: hidden; background: var(--community-surface, #fff); display: flex; flex-direction: column; }
.cf-dash-cover { position: relative; display: flex; align-items: flex-end; height: 84px; padding: 10px 12px; color: #fff; text-decoration: none; overflow: hidden; }
.cf-dash-cover.has-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-dash-cover__chip { position: relative; z-index: 1; background: rgba(0, 0, 0, .42); border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 700; }
.cf-dash-tone-0 { background: linear-gradient(135deg, var(--community-primary, #14b8a6), var(--community-primary-dark, #0f766e)); }
.cf-dash-tone-1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.cf-dash-tone-2 { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.cf-dash-tone-3 { background: linear-gradient(135deg, #16a34a, #166534); }
.cf-dash-tone-4 { background: linear-gradient(135deg, #f97316, #c2410c); }
.cf-dash-tone-5 { background: linear-gradient(135deg, #ef4444, #991b1b); }
.cf-dash-tone-6 { background: linear-gradient(135deg, #475569, #1e293b); }
.cf-dash-tone-7 { background: linear-gradient(135deg, #ec4899, #9d174d); }
.cf-dash-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cf-dash-card__title { margin: 0; font-size: 14.5px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.cf-dash-card__title a { color: inherit; text-decoration: none; }
.cf-dash-bar { height: 6px; background: var(--community-border, #e2e8f0); border-radius: 99px; overflow: hidden; }
.cf-dash-bar i { display: block; height: 100%; background: var(--community-primary, #14b8a6); }
.cf-dash-card__row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; font-size: 12.5px; color: var(--community-text-muted, #64748b); }
.cf-dash-card.is-completed .cf-dash-card__state { color: var(--community-primary-dark, #0f766e); font-weight: 700; }
.cf-dash-go { font-weight: 700; color: var(--community-primary-dark, #0f766e); text-decoration: none; font-size: 13px; }
.cf-dash-go:hover { text-decoration: underline; }
.cf-dash-more { margin-top: 14px; }
.cf-dash-more > summary { cursor: pointer; color: var(--community-primary-dark, #0f766e); font-weight: 600; font-size: 13.5px; }
.cf-dash-more .cf-dash-cards { margin-top: 12px; }

/* Colonne latérale */
.cf-dash-timeline, .cf-dash-favs, .cf-dash-badges { list-style: none; margin: 0; padding: 0; }
.cf-dash-timeline li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--community-bg, #f1f5f9); font-size: 13.5px; }
.cf-dash-timeline li:last-child { border-bottom: 0; }
.cf-dash-timeline__dot { flex: 0 0 28px; height: 28px; border-radius: 8px; background: var(--community-bg, #f1f5f9); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.cf-dash-timeline__t { flex: 1; min-width: 0; }
.cf-dash-timeline__t small, .cf-dash-favs small { display: block; color: var(--community-text-muted, #64748b); font-size: 12px; }
.cf-dash-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px; }
.cf-dash-duo div { border: 1px solid var(--community-border, #e2e8f0); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.cf-dash-duo b { font-size: 20px; font-weight: 800; }
.cf-dash-duo span { font-size: 12.5px; color: var(--community-text-muted, #64748b); }
.cf-dash-favs li { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding: 6px 0; font-size: 13.5px; }
.cf-dash-favs small { grid-column: 2; }
.cf-dash-favs a { color: inherit; text-decoration: none; font-weight: 600; }
.cf-dash-star { color: var(--community-accent, #f59e0b); }
.cf-dash-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-dash-badges li { background: var(--community-bg, #f1f5f9); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }

@media (max-width: 980px) {
	.cf-dash-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 561px) {
	.cf-dash-resume__bar, .cf-dash-resume__pct { display: none; }
}
@media (max-width: 560px) {
	.cf-dash-resume { grid-template-columns: 1fr; padding: 20px; }
	.cf-dash-resume__bar { display: block; }
	.cf-dash-resume__pct { display: block; }
	.cf-dash-ring { display: none; }
	.cf-dash-chips { margin-left: 0; }
	.cf-dash-notif__banner { flex-direction: column; align-items: stretch; gap: 8px; }
	.cf-dash-notif__all { align-self: flex-start; }
	.cf-dash-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.cf-dash-cover { height: 52px; padding: 8px; }
	.cf-dash-cover__chip { font-size: 10.5px; }
	.cf-dash-card__body { padding: 10px 11px 12px; }
	.cf-dash-card__title { font-size: 13px; min-height: 34px; }
	.cf-dash-go { font-size: 12px; }
	.cf-dash-card__row { font-size: 11.5px; flex-direction: column; align-items: flex-start; gap: 2px; }
	.cf-dash-go { white-space: nowrap; }
	.cf-dash-stat__v { font-size: 22px; }
}

/* --- Cartes de formules : prix en grand, économie, description --- */

.cf-plans__grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cf-plan-card__price { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 10px; }
.cf-plan-card__price strong { font-size: 28px; line-height: 1.1; font-weight: 800; color: var(--community-text, #172033); }
.cf-plan-card__price span { font-size: 13px; color: var(--community-text-muted, #64748b); }
.cf-plan-card__saving { margin: 0 0 10px; padding: 6px 10px; border-radius: 8px; background: #f0fdfa; color: var(--community-primary-dark, #0f766e); font-size: 13px; font-weight: 600; }
.cf-plan-card__description { margin: 0 0 14px; color: var(--community-text-muted, #64748b); font-size: 14px; line-height: 1.55; }
.cf-plan-card .cf-button { width: 100%; }

/* Boutons alignés en bas de chaque carte, quelle que soit la longueur du texte */
.cf-plan-card { display: flex; flex-direction: column; }
.cf-plan-card > .cf-plan-card__form, .cf-plan-card > .cf-button { margin-top: auto; }
.cf-plan-toggle { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; gap: 6px; flex: 1; margin-top: 10px; align-content: stretch; }
.cf-plan-toggle__panel { grid-column: 1 / -1; grid-row: 2; order: 0; }
.cf-plan-toggle input[id$="-monthly"]:checked ~ .cf-plan-toggle__panel--monthly,
.cf-plan-toggle input[id$="-yearly"]:checked ~ .cf-plan-toggle__panel--yearly { display: flex; flex-direction: column; }
.cf-plan-toggle__panel .cf-plan-card__form { margin-top: auto; }

/* --- Avantages inclus dans une formule (vraie liste, pas un paragraphe) --- */

.cf-plan-card__benefits { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; text-align: left; }
.cf-plan-card__benefits li { padding-left: 24px; position: relative; font-size: 13.5px; line-height: 1.4; color: var(--community-text, #172033); }
.cf-plan-card__benefits li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--community-primary, #14b8a6); font-weight: 700; }

/* --- Badge "Le plus populaire" --- */

.cf-plan-card { position: relative; }
.cf-plan-card--featured {
	border: 2px solid var(--community-primary, #14b8a6);
	box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--community-primary, #14b8a6) 35%, transparent);
	transform: translateY(-6px);
}
.cf-plan-card__ribbon {
	position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
	background: var(--community-primary, #14b8a6); color: var(--community-on-primary, #062f2b);
	font-size: 11.5px; font-weight: 700; padding: 4px 14px; border-radius: 999px;
	white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
@media (max-width: 560px) {
	.cf-plan-card--featured { transform: none; }
}

/* ==========================================================
   [community_auth] — connexion / inscription
   Bascule CSS pure entre les deux panneaux (cases radio +
   :checked), même esprit que la bascule mensuel/annuel des
   formules : aucun JavaScript nécessaire.
   ========================================================== */

.cf-auth { display: flex; justify-content: center; padding: 20px 0; }
.cf-auth__card {
	width: 100%; max-width: 420px; background: var(--community-surface, #fff);
	border: 1px solid var(--community-border, #e2e8f0); border-radius: var(--community-radius-md, 10px);
	box-shadow: var(--community-shadow-sm, 0 1px 2px rgba(15, 23, 42, .06)); padding: 28px 26px; position: relative;
}

.cf-auth__radio { position: absolute; opacity: 0; pointer-events: none; }

.cf-auth__tabs { display: flex; gap: 4px; background: var(--community-border, #e2e8f0); border-radius: 999px; padding: 3px; margin-bottom: 20px; }
.cf-auth__tab { flex: 1; text-align: center; padding: 8px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--community-text-muted, #64748b); cursor: pointer; }

.cf-auth__panel { display: none; }
.cf-auth__error { background: #FEE2E2; color: #B91C1C; border-radius: 8px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 16px; }

.cf-auth__field { margin: 0 0 14px; }
.cf-auth__field label { display: block; font-size: 13px; font-weight: 600; color: var(--community-text, #172033); margin-bottom: 5px; }
.cf-auth__field input {
	width: 100%; padding: 10px 12px; border: 1px solid var(--community-border, #e2e8f0); border-radius: 8px;
	font-size: 14px; font-family: inherit; box-sizing: border-box; background: var(--community-bg, #f8fafc); color: var(--community-text, #172033);
}
.cf-auth__field input:focus { outline: 2px solid var(--community-primary, #14b8a6); outline-offset: 1px; }

/* Piège à robots : hors champ de vision, mais pas display:none (certains
   robots ignorent justement les champs display:none). Un humain ne le
   voit, ne le sélectionne et ne le remplit jamais. */
.cf-auth__field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; margin: 0; }

.cf-auth__lost { text-align: right; margin: -6px 0 16px; font-size: 12.5px; }
.cf-auth__lost a { color: var(--community-text-muted, #64748b); }

.cf-auth__submit { width: 100%; justify-content: center; }
.cf-auth__switch { text-align: center; font-size: 13px; color: var(--community-text-muted, #64748b); margin: 16px 0 0; }
.cf-auth__switch label { color: var(--community-primary-dark, #0f766e); font-weight: 600; cursor: pointer; }

/* "Continuer avec Google" : commun aux deux panneaux (affiché une seule
   fois, au-dessus), donc en dehors de .cf-auth__panel — jamais masqué par
   la bascule CSS entre connexion et inscription. */
.cf-auth__google {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%; padding: 10px 14px; margin-bottom: 16px; box-sizing: border-box;
	border: 1px solid var(--community-border, #e2e8f0); border-radius: 8px;
	background: var(--community-surface, #fff); color: var(--community-text, #172033);
	font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s ease, border-color .15s ease;
}
.cf-auth__google:hover { background: var(--community-bg, #f8fafc); border-color: var(--community-text-muted, #64748b); }
.cf-auth__google:focus-visible { outline: 2px solid var(--community-primary, #14b8a6); outline-offset: 1px; }
.cf-auth__google svg { flex-shrink: 0; }

.cf-auth__divider { display: flex; align-items: center; text-align: center; margin: 0 0 16px; font-size: 12.5px; color: var(--community-text-muted, #64748b); }
.cf-auth__divider::before, .cf-auth__divider::after { content: ''; flex: 1; height: 1px; background: var(--community-border, #e2e8f0); }
.cf-auth__divider span { padding: 0 10px; }

#cf-auth-tab-login:checked ~ .cf-auth__tabs label[for="cf-auth-tab-login"],
#cf-auth-tab-register:checked ~ .cf-auth__tabs label[for="cf-auth-tab-register"] {
	background: var(--community-surface, #fff); color: var(--community-text, #172033); box-shadow: var(--community-shadow-sm, 0 1px 2px rgba(15, 23, 42, .06));
}
#cf-auth-tab-login:checked ~ .cf-auth__panel--login,
#cf-auth-tab-register:checked ~ .cf-auth__panel--register { display: block; }

/* ==========================================================
   [community_profile] — modification du profil
   Même système de jetons que [community_auth], deux cartes
   indépendantes (infos générales / mot de passe).
   ========================================================== */

.cf-profile { max-width: 480px; margin: 0 auto; padding: 20px 0; display: flex; flex-direction: column; gap: 20px; }
.cf-profile__card {
	background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-md, 10px); box-shadow: var(--community-shadow-sm, 0 1px 2px rgba(15, 23, 42, .06));
	padding: 26px;
}
.cf-profile__title { margin: 0 0 18px; font-size: 18px; font-weight: 700; color: var(--community-text, #172033); }

.cf-profile__success { background: #DCFCE7; color: #15803D; border-radius: 8px; padding: 10px 14px; font-size: 13.5px; margin: 0 0 16px; }
.cf-profile__error { background: #FEE2E2; color: #B91C1C; border-radius: 8px; padding: 10px 14px; font-size: 13.5px; margin: 0 0 16px; }

.cf-profile__avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.cf-profile__avatar-preview { border-radius: 50%; object-fit: cover; border: 1px solid var(--community-border, #e2e8f0); }
.cf-profile__field--file { margin: 0; flex: 1; }

.cf-profile__field { margin: 0 0 14px; }
.cf-profile__field label { display: block; font-size: 13px; font-weight: 600; color: var(--community-text, #172033); margin-bottom: 5px; }
.cf-profile__field input[type="text"],
.cf-profile__field input[type="email"],
.cf-profile__field input[type="password"],
.cf-profile__field textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--community-border, #e2e8f0); border-radius: 8px;
	font-size: 14px; font-family: inherit; box-sizing: border-box; background: var(--community-bg, #f8fafc); color: var(--community-text, #172033);
}
.cf-profile__field textarea { resize: vertical; min-height: 90px; }
.cf-profile__field input:focus, .cf-profile__field textarea:focus { outline: 2px solid var(--community-primary, #14b8a6); outline-offset: 1px; }
.cf-profile__field input[type="file"] { font-size: 13px; }

.cf-profile__submit { width: 100%; justify-content: center; }

/* ==========================================================
   Présentation publique d'une formation (avant l'accès)
   Programme, objectifs, niveau et durée visibles par tous ; seul
   le contenu des leçons reste protégé. Sur mobile, l'encadré
   d'action vient juste sous l'en-tête ; sur grand écran il reste
   visible à droite pendant le défilement.
   ========================================================== */

.cf-course-detail--preview { max-width: 980px; }
.cf-course-detail__hero { margin-bottom: 22px; }
.cf-course-detail__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.cf-course-detail__layout { display: grid; gap: 22px; grid-template-columns: 1fr; }
.cf-course-detail__cta { order: -1; }

.cf-course-detail--preview .cf-course-detail__cta {
	background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-md, 10px); box-shadow: var(--community-shadow-sm, 0 1px 2px rgba(15, 23, 42, .06));
	padding: 20px; text-align: left;
}
.cf-course-detail--preview .cf-course-detail__cta .cf-button { margin: 8px 0 0; display: flex; justify-content: center; box-sizing: border-box; width: 100%; }
.cf-course-detail__cta-text { margin: 0 0 4px; font-size: 14px; line-height: 1.55; color: var(--community-text, #172033); }
.cf-course-detail__cta-link { display: block; margin-top: 12px; text-align: center; font-size: 13px; font-weight: 600; color: var(--community-primary-dark, #0f766e); }
.cf-course-detail__bookmark { margin: 12px 0 0; }
.cf-course-detail__bookmark .cf-bookmark-btn { width: 100%; justify-content: center; }

.cf-course-detail__about { font-size: 14.5px; line-height: 1.7; color: var(--community-text, #172033); }
.cf-course-detail__about p { margin: 0 0 12px; }

.cf-module-block--locked { margin-bottom: 14px; }
.cf-module-block--locked .cf-module-block__title { font-size: 15px; margin: 0 0 8px; }
.cf-lesson-list__item--locked { color: var(--community-text-muted, #64748b); cursor: default; display: flex; gap: 8px; align-items: baseline; padding: 6px 0; font-size: 14px; }
.cf-lesson-list__item--locked .cf-lesson-list__icon { font-size: 12px; opacity: .7; }

@media (min-width: 900px) {
	.cf-course-detail__layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
	.cf-course-detail__cta { order: 0; grid-column: 2; grid-row: 1; position: sticky; top: 90px; }
	.cf-course-detail__main { grid-column: 1; grid-row: 1; }
}

/* Boutons-liens (<a class="cf-button">) : la règle du thème `.community-app a`
   (spécificité plus forte) écrasait leur couleur de texte, rendant le texte
   des boutons principaux peu lisible. On rétablit la couleur voulue, avec la
   couleur de texte calculée par le moteur (contraste WCAG) pour le bouton
   principal. */
.community-app a.cf-button { color: var(--community-text, #172033); }
.community-app a.cf-button--primary { color: var(--community-on-primary, #fff); }
.cf-badge-plan { background: var(--community-primary, #14b8a6); color: var(--community-on-primary, #fff); }

/* ==========================================================
   Étape unique « dernière étape avant le paiement » : le
   téléphone se saisit ici, sur la page des formules, puis le
   membre part directement payer (plus de détour par le profil).
   ========================================================== */
.cf-phone-step {
	max-width: 520px; margin: 24px auto; padding: 28px;
	background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-md, 10px); box-shadow: var(--community-shadow-sm, 0 1px 2px rgba(15, 23, 42, .06));
}
.cf-phone-step__plan { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--community-primary-dark, #0f766e); }
.cf-phone-step h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.2; }
.cf-phone-step__why { margin: 0 0 20px; font-size: 14.5px; line-height: 1.55; color: var(--community-text-muted, #64748b); }
.cf-phone-step__field { margin: 0 0 16px; display: grid; gap: 6px; }
.cf-phone-step__field label { font-weight: 600; font-size: 14px; }
.cf-phone-step__field select, .cf-phone-step__field input {
	width: 100%; min-height: 48px; padding: .6em .9em; box-sizing: border-box; font: inherit;
	border: 1px solid var(--community-border, #cbd5e1); border-radius: var(--community-radius-sm, 6px); background: var(--community-bg, #f8fafc);
}
.cf-phone-step__back { margin: 16px 0 0; text-align: center; font-size: 14px; }

/* ==========================================================
   Écrans « mot de passe oublié » et « nouveau mot de passe »
   ========================================================== */
.cf-auth__title { margin: 0 0 12px; font-size: 24px; line-height: 1.25; }
.cf-auth__intro { margin: 0 0 20px; font-size: 15px; line-height: 1.55; color: var(--community-text-muted, #64748b); }
.cf-auth__notice { margin: 0 0 20px; padding: 14px 16px; font-size: 15px; line-height: 1.55; border-radius: var(--community-radius-sm, 6px);
	background: var(--community-bg, #f0fdfa); border: 1px solid var(--community-border, #99f6e4); }
.cf-auth__hint { display: block; margin-top: 6px; font-size: 13px; color: var(--community-text-muted, #64748b); }

/* Confort au doigt : champs et boutons d'au moins 46 px de haut, police de 16 px
   (en dessous, l'iPhone zoome sur la page quand on touche un champ). Concerne la
   connexion, l'inscription et le mot de passe oublié. */
.cf-auth__field input { min-height: 46px; font-size: 16px; }
.cf-auth__submit { min-height: 48px; width: 100%; }
.cf-auth__google { min-height: 48px; }

/* ==========================================================
   Pages légales, acceptation à l'inscription, rappel sous les formules
   ========================================================== */
.cf-legal { max-width: 820px; margin: 0 auto; padding: 8px 0 48px; line-height: 1.65; color: var(--community-text, #172033); }
.cf-legal__title { margin: 0 0 6px; font-size: 32px; line-height: 1.2; }
.cf-legal__updated { margin: 0 0 28px; font-size: 14px; color: var(--community-text-muted, #64748b); }
.cf-legal h2 { margin: 32px 0 10px; font-size: 22px; line-height: 1.3; }
.cf-legal p, .cf-legal li { font-size: 16px; }
.cf-legal ul, .cf-legal ol { padding-left: 22px; }
.cf-legal li { margin: 6px 0; }
.cf-legal a { color: var(--community-primary-dark, #0f766e); text-decoration: underline; }
/* Repère d'un champ à compléter : volontairement criard, pour qu'on ne publie jamais un texte à trous. */
.cf-legal__todo { padding: 1px 6px; border-radius: 4px; background: #fff3bf; color: #7a4b00; font-weight: 600; }
.cf-legal__table-wrap { margin: 12px 0 20px; overflow-x: auto; }
.cf-legal__table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.cf-legal__table th, .cf-legal__table td { padding: 10px 12px; border: 1px solid var(--community-border, #e2e8f0); text-align: left; vertical-align: top; }
.cf-legal__table th { background: var(--community-bg, #f8fafc); }

.cf-auth__consent { margin: 4px 0 16px; font-size: 14px; line-height: 1.5; }
.cf-auth__consent input { width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; }
.cf-auth__consent a { color: var(--community-primary-dark, #0f766e); text-decoration: underline; }

.cf-plans__legal { margin: 24px 0 0; text-align: center; font-size: 14px; color: var(--community-text-muted, #64748b); }
.cf-plans__legal a { color: var(--community-primary-dark, #0f766e); text-decoration: underline; }

/* Rappel de garantie remonté juste sous les boutons d'achat -- même couleur
   que ".cf-plan-card__saving" (déjà utilisée pour "vous économisez...") afin
   que ce ton signifie "bonne nouvelle" partout sur la page, de façon cohérente. */
.cf-plans__guarantee {
	margin: 18px auto 0;
	max-width: 560px;
	padding: 10px 16px;
	border-radius: 8px;
	background: #f0fdfa;
	color: var(--community-primary-dark, #0f766e);
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}
.cf-plans__guarantee a { color: var(--community-primary-dark, #0f766e); text-decoration: underline; font-weight: 700; }

/* ==========================================================
   Section « Mes données et mon compte » (profil)
   ========================================================== */
.cf-profile__subtitle { margin: 22px 0 6px; font-size: 17px; line-height: 1.3; }
.cf-profile__hint { margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--community-text-muted, #64748b); }
.cf-profile__danger { margin: 8px 0 0; border: 1px solid #fecaca; border-radius: var(--community-radius-sm, 6px); background: #fef2f2; }
.cf-profile__danger > summary { padding: 12px 16px; cursor: pointer; font-weight: 600; color: #991b1b; }
.cf-profile__danger[open] > summary { border-bottom: 1px solid #fecaca; }
.cf-profile__danger > :not(summary) { margin-left: 16px; margin-right: 16px; }
.cf-profile__danger > form { margin-bottom: 16px; }
.cf-profile__warning { margin: 14px 16px; font-size: 14.5px; line-height: 1.55; color: #7f1d1d; }
.cf-profile__field--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; line-height: 1.45; }
.cf-profile__field--check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; }
.cf-profile__submit--danger { min-height: 48px; border: 0; border-radius: var(--community-radius-sm, 6px); background: #b91c1c; color: #fff; font-weight: 700; cursor: pointer; }
.cf-profile__submit--danger:hover { background: #991b1b; }

/* ==========================================================
   Mes paiements (Mon espace)
   ========================================================== */
.cf-pay { margin-top: 24px; }
.cf-pay__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.cf-pay__item { padding: 14px 16px; border: 1px solid var(--community-border, #e2e8f0); border-radius: var(--community-radius-sm, 8px); background: var(--community-surface, #fff); }
.cf-pay__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cf-pay__plan { font-size: 16px; }
.cf-pay__badge { padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.cf-pay__badge--success { background: #dcfce7; color: #14532d; }
.cf-pay__badge--pending { background: #fef3c7; color: #78350f; }
.cf-pay__badge--refunded { background: #e0e7ff; color: #312e81; }
.cf-pay__badge--failed { background: #f1f5f9; color: #475569; }
.cf-pay__meta { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 10px 0 0; }
.cf-pay__meta > div { min-width: 120px; }
.cf-pay__meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--community-text-muted, #64748b); }
.cf-pay__meta dd { margin: 0; font-size: 15px; word-break: break-word; }
.cf-pay__meta code { font-size: 13px; }
.cf-pay__actions { margin: 10px 0 0; }
.cf-pay__receipt { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--community-primary-dark, #0f766e); text-decoration: underline; }
.cf-pay__note { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--community-text-muted, #475569); }
.cf-pay__note a { color: var(--community-primary-dark, #0f766e); text-decoration: underline; }
.cf-pay__note--consume-blocked { padding: 6px 10px; background: #fef3c7; color: #92400e; border-radius: 6px; }
.cf-pay__note--consume-blocked a { color: #92400e; }
.cf-pay__more { margin-top: 14px; }
.cf-pay__more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--community-text-muted, #475569); }
.cf-pay__list--compact { margin-top: 8px; }
.cf-pay__list--compact .cf-pay__item { background: var(--community-bg, #f8fafc); }

/* Zones repliables : le thème retire la flèche native, on remet un indice visible (sinon rien n'indique qu'on peut déplier). */
.cf-pay__more > summary, .cf-profile__danger > summary { list-style: none; }
.cf-pay__more > summary::-webkit-details-marker, .cf-profile__danger > summary::-webkit-details-marker { display: none; }
.cf-pay__more > summary::before, .cf-profile__danger > summary::before { content: "\25B8"; display: inline-block; width: 1.1em; transition: transform .15s ease; }
.cf-pay__more[open] > summary::before, .cf-profile__danger[open] > summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .cf-pay__more > summary::before, .cf-profile__danger > summary::before { transition: none; } }

/* ==========================================================
   Page des formules — gabarit compact et centré (v0.13.4)
   Le conteneur reste dans la largeur de l'écran quel que soit
   le réglage de mise en page d'Astra (pleine largeur, étiré…).
   ========================================================== */
.cf-plans.community-app {
	box-sizing: border-box;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 24px 16px 40px;
}
.cf-plans *, .cf-plans *::before, .cf-plans *::after { box-sizing: border-box; }
.cf-plans .cf-plans__title { font-size: 22px; margin: 0 0 4px; }
.cf-plans .cf-plans__grid {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	align-items: stretch;
	margin-top: 22px;
}
.cf-plans .cf-plan-card { padding: 16px; gap: 6px; min-width: 0; }
.cf-plans .cf-plan-card__name { font-size: 16px; }
.cf-plans .cf-plan-card__price { margin: 8px 0 6px; }
.cf-plans .cf-plan-card__price strong { font-size: 22px; }
.cf-plans .cf-plan-card__description { font-size: 13px; margin: 0 0 10px; line-height: 1.45; }
.cf-plans .cf-plan-card__benefits { gap: 6px; margin: 0 0 12px; }
.cf-plans .cf-plan-card__benefits li { font-size: 13px; padding-left: 20px; }
.cf-plans .cf-plan-card--featured { transform: none; }
.cf-plans .cf-plan-toggle label { padding: 6px 8px; font-size: 12.5px; }
.cf-plans .cf-button { padding: 9px 14px; font-size: 14px; }
@media (max-width: 560px) {
	.cf-plans.community-app { padding: 16px 14px 32px; }
	.cf-plans .cf-plans__grid { grid-template-columns: 1fr; gap: 12px; }
	.cf-plans .cf-plan-card__price strong { font-size: 20px; }
}

/* ==========================================================
   Robustesse face aux réglages d'Astra (v0.13.5)
   Sur un site neuf, Astra souligne les liens et peut étirer le
   contenu sur toute la largeur de l'écran, collé au bord gauche.
   ========================================================== */
.cf-member-space, .cf-courses-catalog, .cf-payment-return, .cf-profile, .cf-legal, .cf-course-detail, .cf-reader {
	box-sizing: border-box;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: 16px;
	padding-right: 16px;
}
body .community-app a { text-decoration: none; }
body .community-app a:hover { text-decoration: underline; }
body .community-app a.cf-button, body .community-app a.cf-dash-btn, body .community-app a.cf-dash-cover, body .community-app .cf-catalog-filter { text-decoration: none; }
body .community-app a.cf-dash-cover { color: #fff; }
body .community-app a.cf-dash-btn { color: var(--community-on-primary, #062f2b); }
body .community-app .cf-dash-card__title a, body .community-app .cf-dash-favs a, body .community-app .cf-lesson-list__item a { color: inherit; }
body .community-app .cf-legal a, body .community-app .cf-auth__consent a, body .community-app .cf-plans__legal a, body .community-app .cf-pay__note a, body .community-app a.cf-pay__receipt { text-decoration: underline; }
body .community-app a.cf-dash-go, body .community-app a.cf-dash-link, body .community-app a.cf-dash-edit-profile, body .community-app a.cf-pay__receipt { color: var(--community-primary-dark, #0f766e); }

/* ==========================================================
   Mon profil — deux colonnes sur grand écran (v0.13.5)
   ========================================================== */
.cf-profile { max-width: 920px; }
.cf-profile__form--grid .cf-profile__avatar-row,
.cf-profile__form--grid .cf-profile__field--wide,
.cf-profile__form--grid .cf-profile__submit--wide { grid-column: 1 / -1; }
@media (min-width: 640px) {
	.cf-profile__form--grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
	.cf-profile__form--grid .cf-profile__submit--wide { justify-self: start; width: auto; min-width: 200px; }
}
@media (min-width: 860px) {
	.cf-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
	.cf-profile > .cf-profile__card:first-child { grid-column: 1 / -1; }
}
.cf-profile__card { padding: 22px; }
.cf-profile__title { margin-bottom: 14px; }

/* ==========================================================
   Pages légales — lecture confortable (v0.13.8)
   ========================================================== */
.cf-legal.community-app { max-width: 820px; padding: 16px 16px 56px; }
.cf-legal__title { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.cf-legal__updated { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--community-bg, #f1f5f9); font-size: 13px; margin-bottom: 8px; }
.cf-legal h2 { font-size: 19px; font-weight: 700; margin: 30px 0 8px; padding-top: 22px; border-top: 1px solid var(--community-border, #e2e8f0); }
.cf-legal h2:first-of-type { border-top: 0; padding-top: 0; }
.cf-legal p, .cf-legal li { font-size: 15.5px; line-height: 1.7; }
.cf-legal p { margin: 0 0 12px; }
@media (max-width: 560px) {
	.cf-legal__title { font-size: 23px; }
	.cf-legal h2 { font-size: 17.5px; }
	.cf-legal p, .cf-legal li { font-size: 15px; }
}

/* Code promo (page Formules) */
.cf-plan-card__refund-accept { display: flex; align-items: flex-start; gap: 7px; margin: 10px 0 0; font-size: 12.5px; color: var(--community-text-muted, #64748b); }
.cf-plan-card__refund-accept input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.cf-plan-card__refund-accept label { cursor: pointer; }
.cf-plan-card__refund-accept a { color: var(--cf-accent, #0f7b6c); }
.cf-promo { margin: 0 0 10px; font-size: 14px; }
.cf-promo > summary { cursor: pointer; color: var(--cf-accent, #0f7b6c); padding: 4px 0; }
.cf-promo__input { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d5d9d7; border-radius: 8px; font: inherit; text-transform: uppercase; letter-spacing: .06em; box-sizing: border-box; }

/* --- FAQ (/formules/) : accordéon en <details>/<summary>, sans JavaScript,
   même principe que .cf-promo ci-dessus. --- */
.cf-plans-faq { margin: 28px 0; max-width: 760px; }
.cf-plans-faq__title { margin: 0 0 14px; font-size: 20px; font-weight: 700; }
.cf-plans-faq__item {
	background: var(--community-surface, #fff);
	border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-md, 10px);
	margin-bottom: 8px;
	overflow: hidden;
}
.cf-plans-faq__question {
	list-style: none;
	cursor: pointer;
	padding: 14px 40px 14px 16px;
	font-weight: 600;
	font-size: 14.5px;
	position: relative;
}
.cf-plans-faq__question::-webkit-details-marker { display: none; }
.cf-plans-faq__question::after {
	content: "+";
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 20px;
	line-height: 1;
	color: var(--community-primary, #14b8a6);
}
.cf-plans-faq__item[open] > .cf-plans-faq__question::after { content: "−"; }
.cf-plans-faq__answer { padding: 0 16px 16px; color: var(--community-text-muted, #64748b); font-size: 13.5px; line-height: 1.6; }
.cf-plans-faq__answer p { margin: 0 0 8px; }
.cf-plans-faq__answer p:last-child { margin-bottom: 0; }

/* Actions du compte (espace membre) : communauté, profil, sécurité, déconnexion. */
.cf-dash-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cf-dash-actions .cf-dash-edit-profile { margin-left: 0; }
.cf-dash-community { display: inline-block; padding: 8px 14px; border-radius: 8px; background: var(--community-primary, #0d9488); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cf-dash-community:hover { filter: brightness(1.08); }
body .community-app a.cf-dash-community { color: #fff; }
.cf-dash-logout { color: #b42318; }
body .community-app a.cf-dash-logout { color: #b42318; }
@media (max-width: 640px) { .cf-dash-actions { margin-left: 0; width: 100%; } }

/* Double authentification */
.cf-2fa-steps { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 14px; }
.cf-2fa-qr { margin: 10px 0; width: 200px; max-width: 100%; background: #fff; padding: 6px; border: 1px solid #ddd; border-radius: 8px; line-height: 0; }
.cf-2fa-qr svg { width: 100%; height: auto; display: block; }
.cf-2fa-key { display: inline-block; padding: 2px 8px; background: #f3f4f6; border-radius: 4px; letter-spacing: .06em; word-break: break-all; }
.cf-2fa-codes { margin: 0 0 16px; padding: 14px; border: 1px solid #f0c36d; background: #fff8e6; border-radius: 8px; }
.cf-2fa-codes__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.cf-2fa-codes__list code { display: block; padding: 6px 8px; background: #fff; border: 1px solid #e5d5a8; border-radius: 4px; text-align: center; font-size: 15px; letter-spacing: .08em; }
.cf-2fa-on { color: #067647; font-weight: 700; }

/* --- Page d'une formation : présentation et félicitations de fin --- */
.cf-reader--overview { max-width: 820px; }
.cf-course-head__cover { margin: 0 0 16px; border-radius: var(--community-radius-lg, 14px); overflow: hidden; background: var(--community-bg, #f1f5f9); line-height: 0; }
.cf-course-head__cover img { width: 100%; height: auto; max-height: 340px; object-fit: cover; display: block; }
.cf-reader--overview .cf-reader__title { font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.cf-reader__title-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.cf-course-head__chips { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cf-course-head__chips li { padding: 4px 11px; border-radius: 999px; background: var(--community-bg, #f1f5f9); border: 1px solid var(--community-border, #e2e8f0); font-size: 12.5px; color: var(--community-text-muted, #64748b); }
.cf-course-about { margin: 0 0 18px; padding: 18px; background: var(--community-surface, #fff); border: 1px solid var(--community-border, #e2e8f0); border-radius: var(--community-radius-md, 10px); }
.cf-course-about__text { line-height: 1.6; }
.cf-course-about__text > :first-child { margin-top: 0; }
.cf-course-about__title { margin: 14px 0 8px; font-size: 15px; }
.cf-course-about__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cf-course-about__list li { position: relative; padding-left: 24px; }
.cf-course-about__list li::before { content: "\2713"; position: absolute; left: 0; color: var(--community-success, #15803d); font-weight: 700; }
.cf-module-block__title { display: flex; align-items: center; gap: 10px; }
.cf-module-block__n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--community-primary, #14b8a6); color: #fff; font-size: 13px; font-weight: 700; }
.cf-lesson-list__item a { padding: 11px 6px; }
.cf-lesson-list__title { flex: 1; min-width: 0; }
.cf-lesson-list__state { flex: none; font-size: 12px; color: var(--community-text-muted, #64748b); }
.cf-lesson-list__item--done .cf-lesson-list__icon { color: var(--community-success, #15803d); font-weight: 700; }
.cf-lesson-list__item a:hover { background: var(--community-bg, #f8fafc); }

.cf-done { position: relative; overflow: hidden; margin: 0 0 22px; padding: 34px 22px 26px; text-align: center; color: #fff; border-radius: var(--community-radius-lg, 14px); background: linear-gradient(135deg, var(--community-primary-dark, #0f766e), var(--community-primary, #14b8a6)); box-shadow: var(--community-shadow-md, 0 10px 30px rgba(15, 23, 42, .15)); }
.cf-done > *:not(.cf-done__confetti) { position: relative; z-index: 1; }
.cf-done__badge { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--community-primary-dark, #0f766e); font-size: 34px; font-weight: 800; box-shadow: 0 0 0 8px rgba(255, 255, 255, .22); animation: cf-pop .5s ease-out both; }
.cf-done__eyebrow { margin: 0 0 4px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.cf-done__title { margin: 0 0 8px; font-size: 28px; line-height: 1.15; color: #fff; }
.cf-done__text { margin: 0 auto 14px; max-width: 520px; font-size: 15.5px; line-height: 1.5; opacity: .96; }
.cf-done__stats { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 13px; opacity: .95; }
.cf-done__stats b { font-size: 18px; margin-right: 3px; }
.cf-done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cf-done__btn { display: inline-block; padding: 11px 18px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .85); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.cf-done__btn:hover { background: rgba(255, 255, 255, .16); }
.cf-done__btn--primary { background: #fff; color: var(--community-primary-dark, #0f766e); border-color: #fff; }
body .community-app a.cf-done__btn { color: #fff; }
body .community-app a.cf-done__btn--primary { color: var(--community-primary-dark, #0f766e); }
.cf-done__btn--primary:hover { background: #f0fdfa; }
.cf-done__hint { margin: 14px 0 0; font-size: 12.5px; opacity: .9; }
.cf-done__confetti { position: absolute; inset: 0; pointer-events: none; }
.cf-done__confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: cf-fall 3.2s ease-in 1 both; }
.cf-done__confetti i:nth-child(3n) { background: #fde047; }
.cf-done__confetti i:nth-child(3n+1) { background: #fff; }
.cf-done__confetti i:nth-child(3n+2) { background: #fb923c; }
.cf-done__confetti i:nth-child(1) { left: 6%; animation-delay: .1s; } .cf-done__confetti i:nth-child(2) { left: 14%; animation-delay: .5s; } .cf-done__confetti i:nth-child(3) { left: 22%; animation-delay: .25s; }
.cf-done__confetti i:nth-child(4) { left: 30%; animation-delay: .8s; } .cf-done__confetti i:nth-child(5) { left: 38%; animation-delay: .35s; } .cf-done__confetti i:nth-child(6) { left: 46%; animation-delay: 1s; }
.cf-done__confetti i:nth-child(7) { left: 54%; animation-delay: .15s; } .cf-done__confetti i:nth-child(8) { left: 62%; animation-delay: .65s; } .cf-done__confetti i:nth-child(9) { left: 70%; animation-delay: .4s; }
.cf-done__confetti i:nth-child(10) { left: 78%; animation-delay: .9s; } .cf-done__confetti i:nth-child(11) { left: 86%; animation-delay: .3s; } .cf-done__confetti i:nth-child(12) { left: 92%; animation-delay: .7s; }
.cf-done__confetti i:nth-child(13) { left: 10%; animation-delay: 1.2s; } .cf-done__confetti i:nth-child(14) { left: 66%; animation-delay: 1.1s; }
@keyframes cf-fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(330px) rotate(540deg); opacity: 0; } }
@keyframes cf-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cf-done__confetti { display: none; } .cf-done__badge { animation: none; } }
@media (max-width: 520px) { .cf-done { padding: 28px 16px 22px; } .cf-done__title { font-size: 23px; } .cf-done__btn { width: 100%; text-align: center; } .cf-reader--overview .cf-reader__title { font-size: 22px; } }
body .community-app .cf-done h2.cf-done__title, .entry-content .community-app .cf-done h2.cf-done__title { color: #fff !important; }
body .community-app .cf-done .cf-done__text, body .community-app .cf-done .cf-done__eyebrow { color: #fff; }

/* ---- Avis et notes ---- */
.cf-stars { --p: 0%; display: inline-block; font-size: 16px; letter-spacing: 1px; line-height: 1; background: linear-gradient(90deg, #f5a623 var(--p), rgba(128,128,128,.35) var(--p)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.cf-rating { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.cf-rating__n { opacity: .65; }
.cf-course-card .cf-rating { margin: 2px 0 6px; }
.cf-course-head__rating { margin: 0 0 10px; }
.cf-reviews { margin-top: 36px; padding: 24px; border-radius: 16px; border: 1px solid var(--community-border, rgba(128,128,128,.25)); }
.cf-reviews__title { margin: 0 0 6px; font-size: 22px; }
.cf-reviews__summary { margin: 0 0 16px; }
.cf-reviews__notice { padding: 10px 14px; border-radius: 10px; background: rgba(34,160,90,.12); margin: 0 0 16px; }
.cf-reviews__notice.is-error { background: rgba(220,50,50,.12); }
.cf-reviews__hint { font-size: 13px; opacity: .75; margin: 0 0 8px; }
.cf-reviews__form { display: grid; gap: 12px; margin: 0 0 24px; padding: 18px; border-radius: 14px; background: rgba(128,128,128,.08); }
.cf-reviews__form h3 { margin: 0; font-size: 17px; }
.cf-reviews__form textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(128,128,128,.4); font: inherit; background: transparent; color: inherit; }
.cf-reviews__form .cf-button { justify-self: start; }
.cf-starinput { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; border: 0; padding: 0; margin: 0; }
.cf-starinput input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cf-starinput label { font-size: 34px; line-height: 1; cursor: pointer; color: rgba(128,128,128,.4); padding: 0 2px; }
.cf-starinput input:checked ~ label, .cf-starinput label:hover, .cf-starinput label:hover ~ label { color: #f5a623; }
.cf-starinput input:focus-visible + label { outline: 2px solid currentColor; border-radius: 4px; }
.cf-reviews__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cf-review { padding: 14px 16px; border-radius: 12px; background: rgba(128,128,128,.07); }
.cf-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.cf-review__head time { margin-left: auto; font-size: 12px; opacity: .6; }
.cf-review p { margin: 8px 0 0; }
.cf-review__reply { padding: 8px 12px; border-left: 3px solid #f5a623; font-size: 14px; background: rgba(245,166,35,.08); border-radius: 0 8px 8px 0; }
.cf-starinput .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Logiciel de caisse (Community Software) ---- */
.cs-card h2 { margin: 0 0 6px; font-size: 20px; }
.cs-card h3 { font-size: 15px; margin: 18px 0 8px; }
.cs-card__desc, .cs-card__help { opacity: .8; margin: 0 0 14px; }
.cs-card__lock { font-weight: 600; margin: 0 0 12px; }
.cs-card__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.cs-card__label { font-size: 13px; opacity: .7; width: 100%; }
.cs-card__key { padding: 8px 12px; border-radius: 8px; background: rgba(128,128,128,.14); font-size: 15px; letter-spacing: 1px; word-break: break-all; }
.cs-card__dl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.cs-card__devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cs-card__devices li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(128,128,128,.08); }
.cs-card__more { margin-top: 16px; font-size: 14px; }

/* ---- Aperçu de l'espace membre (page des formules) ---- */
.cf-plans-preview { margin: 56px auto 8px; max-width: 980px; text-align: center; }
.cf-plans-preview__title { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); }
.cf-plans-preview__text { margin: 0 auto 24px; max-width: 620px; opacity: .8; }
.cf-plans-preview__frame { margin: 0 auto; max-width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--community-border, rgba(128,128,128,.25)); box-shadow: 0 18px 50px rgba(15, 23, 42, .14); line-height: 0; }
.cf-plans-preview__frame img { width: 100%; height: auto; display: block; }
@media (max-width: 700px) { .cf-plans-preview__frame { max-width: 340px; border-radius: 20px; } }

/* ======================================================================
   Page publique d'une formation (course-denied.php) — présentation avant
   inscription. Nouvelle mise en page : bandeau d'en-tête en dégradé
   (mêmes variables --community-hero-* que .cf-dash-resume, pour rester
   cohérent avec le reste du site et suivre les couleurs choisies dans le
   personnaliseur), carte flottante avec aperçu média (vidéo, captures
   d'écran ou image), programme et "à propos" en dessous.
   ====================================================================== */

/* .cf-reader limite normalement tout son contenu à 780px (lecture d'une
   leçon, aperçu après connexion) — cette page a besoin de plus de largeur
   pour la carte flottante + le programme côte à côte ; .cf-reader--wide
   l'élargit UNIQUEMENT pour cette page (même principe que
   .cf-reader--overview, qui le restreint à 820px pour un autre cas). */
.cf-reader.cf-reader--wide { max-width: 1060px; }

.cf-cd { max-width: 100%; margin: 0 auto; }

.cf-cd__hero {
	position: relative;
	overflow: hidden;
	border-radius: var(--community-radius-lg, 20px);
	color: var(--community-hero-text, #fff);
	background: var(--community-hero-bg, #0b1220);
	background: radial-gradient( 900px 420px at 85% -10%, color-mix(in srgb, var(--community-primary, #14b8a6) 35%, transparent), transparent ),
	            linear-gradient(135deg, var(--community-hero-bg, #0b1220) 0%, color-mix(in srgb, var(--community-hero-bg, #0b1220) 60%, var(--community-primary-dark, #0f766e) 40%) 100%);
	padding: 34px 24px 30px;
}
.cf-cd__hero-inner { position: relative; z-index: 1; }
.cf-cd__crumb { margin-bottom: 18px; font-size: 13px; }
.cf-cd__crumb a { color: var(--community-hero-text, #fff); opacity: .72; text-decoration: none; }
.cf-cd__crumb a:hover { opacity: 1; }

.cf-cd__badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.cf-cd__badge {
	display: inline-flex; align-items: center;
	padding: 5px 12px; border-radius: 999px;
	font-size: 12px; font-weight: 600; letter-spacing: .2px;
	background: rgba(255,255,255,.14);
	border: 1px solid rgba(255,255,255,.22);
	color: var(--community-hero-text, #fff);
	backdrop-filter: blur(6px);
}
.cf-cd__badge--accent { background: var(--community-primary, #14b8a6); border-color: var(--community-primary, #14b8a6); color: var(--community-on-primary, #fff); }

.cf-cd__title { color: var(--community-hero-text, #fff); font-size: clamp(24px, 4vw, 34px); font-weight: 800; line-height: 1.2; margin: 0 0 12px; max-width: 760px; text-wrap: balance; }
/* Le thème force la couleur de tous les h1-h4 de .community-app avec
   !important (sécurité de lisibilité sur fond clair ailleurs sur le
   site) — ça gagne contre la règle ci-dessus sur ce hero à fond sombre.
   On ne touche pas au thème (la règle protège le reste du site) : on
   la bat uniquement ici, avec un !important plus spécifique, limité au
   hero de cette page. */
.cf-cd__hero .cf-cd__title { color: var(--community-hero-text, #fff) !important; }
.cf-cd__intro { color: var(--community-hero-text, #fff); font-size: 16px; line-height: 1.6; margin: 0 0 14px; max-width: 640px; opacity: .88; }
.cf-cd__rating { margin: 0 0 10px; }
.cf-cd__byline { color: var(--community-hero-text, #fff); font-size: 13.5px; opacity: .78; margin: 0 0 16px; }

.cf-cd__meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cf-cd__meta li { color: var(--community-hero-text, #fff); padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 12.5px; }

.cf-cd__body { padding-top: 26px; }
.cf-cd__layout { display: grid; gap: 22px; grid-template-columns: 1fr; }

.cf-cd__card {
	order: -1;
	background: var(--community-surface, #fff);
	border: 1px solid var(--community-border, #e2e8f0);
	border-radius: var(--community-radius-lg, 16px);
	box-shadow: var(--community-shadow-md, 0 18px 44px rgba(15,23,42,.12));
	overflow: hidden;
}
.cf-cd__media { position: relative; aspect-ratio: 16 / 9; background: #0b1220; }
.cf-cd__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cf-cd__media--thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-cd__media-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 46px; background: linear-gradient(135deg, var(--community-hero-bg, #0b1220), var(--community-primary-dark, #0f766e)); }

.cf-cd__gallery { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.cf-cd__gallery img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.cf-cd__gallery-hint { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; pointer-events: none; }

.cf-cd__card-body { padding: 18px 20px 20px; }
.cf-cd__value { margin: 0 0 12px; }
.cf-cd__value-struck { text-decoration: line-through; color: var(--community-text-muted, #64748b); font-size: 14px; margin-right: 8px; }
.cf-cd__value-free { font-weight: 700; color: var(--community-primary-dark, #0f766e); font-size: 15px; }
.cf-cd__cta-text { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--community-text, #172033); }
.cf-cd__card-body .cf-button { margin: 8px 0 0; display: flex; justify-content: center; box-sizing: border-box; width: 100%; }
.cf-cd__cta-link { display: block; margin-top: 12px; text-align: center; font-size: 13px; font-weight: 600; color: var(--community-primary-dark, #0f766e); }
.cf-cd__bookmark { margin: 12px 0 0; }
.cf-cd__bookmark .cf-bookmark-btn { width: 100%; justify-content: center; }

.cf-cd__main { min-width: 0; }
.cf-cd__block { margin-bottom: 26px; }
.cf-cd__block h2 { font-size: 19px; font-weight: 700; margin: 0 0 14px; }
.cf-cd__objectives { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
@media (min-width: 560px) { .cf-cd__objectives { grid-template-columns: 1fr 1fr; column-gap: 20px; } }
.cf-cd__objectives li { padding-left: 26px; position: relative; font-size: 14px; line-height: 1.5; }
.cf-cd__objectives li::before { content: "✓"; position: absolute; left: 0; color: var(--community-primary, #14b8a6); font-weight: 700; }

.cf-cd__about { font-size: 14.5px; line-height: 1.7; color: var(--community-text, #172033); }
.cf-cd__about p { margin: 0 0 12px; }

.cf-cd__program { display: grid; gap: 10px; }
.cf-cd__module { border: 1px solid var(--community-border, #e2e8f0); border-radius: var(--community-radius-md, 10px); padding: 14px 16px; }
.cf-cd__module h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.cf-cd__module-n { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--community-bg, #f1f5f9); font-size: 12px; font-weight: 700; flex: none; }
.cf-cd__lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cf-cd__lessons li { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; color: var(--community-text-muted, #64748b); }
.cf-cd__lesson-lock { font-size: 11px; opacity: .7; }

@media (min-width: 900px) {
	.cf-cd__hero { padding: 48px 40px 42px; }
	.cf-cd__layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
	.cf-cd__card { order: 0; grid-column: 2; grid-row: 1; position: sticky; top: 90px; }
	.cf-cd__main { grid-column: 1; grid-row: 1; }
}

body .community-app a.cf-cd__crumb, body .community-app .cf-cd__crumb a { color: var(--community-hero-text, #fff); }

/* --- Bannière promo (Mon espace) --- */
.cf-promo-banner {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin: 0 0 20px;
	padding: 18px 48px 18px 22px;
	border-radius: 14px;
	color: #fff;
	background: linear-gradient(120deg, var(--community-hero-bg, #0b1220) 0%, color-mix(in srgb, var(--community-hero-bg, #0b1220) 70%, var(--community-primary, #14b8a6) 30%) 130%);
}
.cf-promo-banner__body { flex: 1 1 260px; min-width: 0; }
.cf-promo-banner__title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; }
.cf-promo-banner__text { margin: 4px 0 0; font-size: 13.5px; opacity: .85; line-height: 1.45; }
.cf-promo-banner__cta {
	flex: 0 0 auto;
	display: inline-block;
	padding: 10px 20px;
	border-radius: 999px;
	background: #fff;
	color: var(--community-hero-bg, #0b1220);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.cf-promo-banner__cta:hover { opacity: .9; }
.cf-promo-banner__close {
	position: absolute;
	top: 10px;
	right: 14px;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 999px;
	background: rgba(255,255,255,.14);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.cf-promo-banner__close:hover { background: rgba(255,255,255,.24); }
@media (max-width: 560px) {
	.cf-promo-banner { padding: 16px 40px 16px 16px; }
	.cf-promo-banner__cta { flex-basis: 100%; text-align: center; }
}
