/* ==========================================================
   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; }

/* --- 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; }
.cf-plan-card__form { margin-top: auto; }

/* ==========================================================
   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; }
.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__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; }

#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%; }

/* ==========================================================
   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; }

/* ==========================================================
   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__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; } }
