/* Déo-Gratias MESSE Academy — styles front-end
   Palette : bleu marine (#1B2A4A) et doré (#B8893E), cohérente avec
   l'identité visuelle Déo-Gratias MESSE déjà utilisée sur les documents
   de l'agence. */

.ena-btn {
	display: inline-block;
	background: #1B2A4A;
	color: #fff !important;
	padding: 10px 22px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	border: none;
	cursor: pointer;
	font-size: 15px;
}
.ena-btn:hover { background: #243a63; color: #fff !important; }
.ena-btn-gold { background: #B8893E; }
.ena-btn-gold:hover { background: #a07636; }

/* Catalogue */
.ena-catalog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 20px 0;
}
.ena-course-card {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 16px;
	background: #fff;
}
.ena-course-card h3 { margin: 10px 0 6px; color: #1B2A4A; }
.ena-course-thumb img { width: 100%; border-radius: 6px; }
.ena-course-excerpt { color: #555; font-size: 14px; }
.ena-course-meta { color: #888; font-size: 13px; }
.ena-course-price { font-weight: bold; color: #1B2A4A; }

/* Mes cours */
.ena-my-course-row {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 16px;
	background: #fff;
}
.ena-my-course-row h3 a { color: #1B2A4A; text-decoration: none; }
.ena-progress-bar {
	background: #eee;
	border-radius: 6px;
	height: 10px;
	overflow: hidden;
	margin: 8px 0 4px;
}
.ena-progress-fill { background: #B8893E; height: 100%; }
.ena-progress-text { font-size: 13px; color: #777; margin-bottom: 10px; }

/* Lecteur de cours */
.ena-course-player {
	display: flex;
	gap: 28px;
	margin-top: 24px;
	flex-wrap: wrap;
}
.ena-course-sidebar {
	flex: 0 0 280px;
	background: #F4F4F4;
	border-radius: 8px;
	padding: 16px;
}
.ena-course-sidebar h4 { margin-top: 0; color: #1B2A4A; }
.ena-lesson-list { list-style: none; margin: 0; padding: 0; }
.ena-lesson-item { margin-bottom: 6px; border-radius: 6px; }
.ena-lesson-item a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	text-decoration: none;
	color: #333;
	border-radius: 6px;
}
.ena-lesson-item a:hover { background: #e8e8e8; }
.ena-lesson-item.ena-lesson-active a { background: #1B2A4A; color: #fff; }
.ena-lesson-item.ena-lesson-locked { color: #999; padding: 8px 10px; display: flex; gap: 10px; align-items: center; }
.ena-lesson-item.ena-lesson-completed a { color: #2e7d32; }
.ena-lesson-icon { font-size: 14px; width: 20px; text-align: center; }
.ena-quiz-item { margin-top: 12px; border-top: 1px solid #ddd; padding-top: 12px; }

/* Le thème actif du site peut définir des couleurs de texte globales
   (parfois du texte clair, pensé pour un fond sombre). On fixe donc
   explicitement une couleur de fond ET de texte sur toute la zone du
   cours/quiz, pour ne jamais dépendre de ce que fait le thème — sans
   ça, le texte peut devenir invisible (ex. texte blanc sur fond clair). */
.ena-course-player,
.ena-course-main,
.ena-course-main p,
.ena-course-main li,
.ena-course-main h2,
.ena-course-main h3 {
	background: #fff;
	color: #222;
}
.ena-course-main { flex: 1; min-width: 280px; }
.ena-course-main h2, .ena-course-main h3 { color: #1B2A4A; }

.ena-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; margin: 16px 0; }
.ena-video-wrap iframe {
	position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 8px;
}
.ena-lesson-text { line-height: 1.7; margin: 16px 0; color: #222; }
.ena-lesson-pdf { margin: 16px 0; }
.ena-pdf-download {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fff3e0;
	border: 1px solid #B8893E;
	color: #1B2A4A;
	padding: 10px 16px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
}
.ena-pdf-download:hover { background: #ffe9c7; }
.ena-pdf-icon { font-size: 16px; }
.ena-lesson-actions { margin-top: 24px; }
.ena-completed-tag { color: #2e7d32; font-weight: 600; }

/* Verrouillage / accès */
.ena-locked-notice {
	background: #EAF0F7;
	border-left: 4px solid #1B2A4A;
	padding: 20px;
	border-radius: 6px;
	margin-top: 20px;
	color: #1B2A4A;
}
.ena-locked-notice p { color: #1B2A4A; }

/* Quiz */
.ena-quiz-question {
	background: #fafafa;
	border: 1px solid #eaeaea;
	border-radius: 6px;
	padding: 14px 16px;
	margin-bottom: 14px;
	color: #222;
}
.ena-quiz-question p, .ena-quiz-question strong { color: #222; }
.ena-quiz-choice { display: block; margin: 6px 0; cursor: pointer; color: #222; }
#ena-quiz-result { color: #222; }
.ena-quiz-success { background: #e8f5e9; border-left: 4px solid #2e7d32; padding: 16px; border-radius: 6px; margin-top: 16px; color: #1b3a1e; }
.ena-quiz-success p, .ena-quiz-success strong { color: #1b3a1e; }
.ena-quiz-fail { background: #fdecea; border-left: 4px solid #c62828; padding: 16px; border-radius: 6px; margin-top: 16px; color: #5c1a1a; }
.ena-quiz-fail p { color: #5c1a1a; }
.ena-quiz-error { color: #c62828; }

/* Vérification certificat */
.ena-verify-form { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.ena-verify-form input[type="text"] {
	flex: 1; min-width: 220px; padding: 10px; border: 1px solid #ccc; border-radius: 4px;
}
.ena-verify-success { background: #e8f5e9; border-left: 4px solid #2e7d32; padding: 14px; border-radius: 6px; }
.ena-verify-error { background: #fdecea; border-left: 4px solid #c62828; padding: 14px; border-radius: 6px; }

@media (max-width: 720px) {
	.ena-course-sidebar { flex: 1 1 100%; }
}

/* ===================== Tableau de bord apprenant (sidebar à onglets) ===================== */

.ena-dashboard-tabbed {
	display: flex;
	gap: 0;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	align-items: stretch;
	min-height: 480px;
}

.ena-dash-sidebar {
	flex: 0 0 240px;
	background: #1B2A4A;
	color: #fff;
	padding: 28px 18px;
	text-align: center;
}
.ena-dash-username { font-weight: 700; margin-top: 10px; font-size: 15px; }
.ena-dash-sidebar .ena-avatar-wrap { display: inline-block; margin: 0 auto; }
.ena-dash-sidebar .ena-avatar-img { box-shadow: 0 0 0 3px rgba(255,255,255,0.2); }
.ena-dash-sidebar .ena-avatar-message { color: #cfd7e6; }
.ena-dash-sidebar .ena-avatar-message.ena-auth-success { color: #9ddba3; }
.ena-dash-sidebar .ena-avatar-message.ena-auth-error { color: #ffb3ab; }

.ena-dash-nav { margin-top: 26px; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.ena-dash-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: none;
	color: #cfd7e6;
	padding: 11px 14px;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
	text-align: left;
	width: 100%;
}
.ena-dash-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ena-dash-nav-item.active { background: #B8893E; color: #fff; font-weight: 600; }
.ena-dash-nav-item span { font-size: 16px; }

.ena-dash-content { flex: 1; padding: 30px 32px; min-width: 0; }
.ena-dash-pane { display: none; }
.ena-dash-pane.active { display: block; }
.ena-dash-pane h2 { color: #1B2A4A; margin-top: 0; }
.ena-dash-intro { color: #777; margin-bottom: 24px; }
.ena-dash-pane h3 {
	color: #1B2A4A;
	font-size: 17px;
	margin: 28px 0 12px;
	border-bottom: 2px solid #EAF0F7;
	padding-bottom: 8px;
}
.ena-dash-pane h3:first-of-type { margin-top: 0; }

.ena-cta-banner {
	display: flex;
	align-items: center;
	gap: 18px;
	background: #EAF0F7;
	border-radius: 10px;
	padding: 20px 24px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}
.ena-cta-banner-empty { background: linear-gradient(135deg, #1B2A4A, #2c3f66); color: #fff; }
.ena-cta-icon { font-size: 34px; flex-shrink: 0; }
.ena-cta-text { flex: 1; min-width: 200px; }
.ena-cta-text h3 { margin: 0 0 4px; border: none; padding: 0; font-size: 16px; color: inherit; }
.ena-cta-banner:not(.ena-cta-banner-empty) .ena-cta-text h3 { color: #1B2A4A; }
.ena-cta-text p { margin: 0; font-size: 13px; opacity: 0.9; }
.ena-cta-banner-empty .ena-btn { background: #B8893E; }
.ena-btn-logout { background: #c62828; }
.ena-btn-logout:hover { background: #a31f1f; }

@media (max-width: 760px) {
	.ena-dashboard-tabbed { flex-direction: column; }
	.ena-dash-sidebar { flex: none; }
	.ena-dash-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; }
	.ena-dash-content { padding: 22px; }
}

.ena-avatar-wrap { position: relative; flex-shrink: 0; }
.ena-avatar-img {
	width: 72px; height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px #EAF0F7;
}
.ena-avatar-edit {
	position: absolute;
	bottom: -2px; right: -2px;
	background: #B8893E;
	color: #fff;
	width: 26px; height: 26px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 13px;
	cursor: pointer;
	border: 2px solid #fff;
}
.ena-avatar-message { font-size: 12px; margin-top: 4px; }
.ena-avatar-message.ena-auth-success { color: #2e7d32; }
.ena-avatar-message.ena-auth-error { color: #c62828; }

.ena-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 32px;
}
.ena-stat-card {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 18px;
	text-align: center;
}
.ena-stat-value { font-size: 28px; font-weight: 700; color: #1B2A4A; }
.ena-stat-gold .ena-stat-value { color: #B8893E; }
.ena-stat-label { font-size: 13px; color: #777; margin-top: 4px; }

.ena-empty-text { color: #999; font-size: 14px; }

.ena-course-row-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ena-course-row-top h4 { margin: 0; }
.ena-course-row-top h4 a { color: #1B2A4A; text-decoration: none; }
.ena-status-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.ena-status-completed { background: #e8f5e9; color: #2e7d32; }
.ena-status-in_progress { background: #fff3e0; color: #B8893E; }
.ena-status-not_started { background: #f0f0f0; color: #888; }
.ena-btn-sm { padding: 7px 16px; font-size: 13px; }

.ena-history-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.ena-history-table th {
	text-align: left;
	font-size: 12px;
	text-transform: uppercase;
	color: #888;
	border-bottom: 2px solid #eee;
	padding: 8px 10px;
}
.ena-history-table td { padding: 10px; border-bottom: 1px solid #f0f0f0; }
.ena-tag-success { color: #2e7d32; font-weight: 600; }
.ena-tag-fail { color: #c62828; font-weight: 600; }

.ena-certificate-list { list-style: none; margin: 0; padding: 0; }
.ena-certificate-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 10px;
}
.ena-certificate-icon { font-size: 22px; }
.ena-certificate-info { display: flex; flex-direction: column; font-size: 13px; }
.ena-certificate-info strong { color: #1B2A4A; font-size: 14px; }
.ena-certificate-date { color: #999; margin: 2px 0 4px; }
.ena-certificate-info a { color: #B8893E; font-weight: 600; text-decoration: none; }

.ena-activity-feed { list-style: none; margin: 0; padding: 0; }
.ena-activity-item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 0;
	border-bottom: 1px solid #f2f2f2;
	font-size: 13px;
}
.ena-activity-icon { font-size: 16px; }
.ena-activity-text { color: #333; }
.ena-activity-date { display: block; color: #999; font-size: 12px; margin-top: 2px; }

/* ===================== Authentification par code email ===================== */

.ena-auth-form {
	max-width: 420px;
	margin: 20px auto;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 28px 26px;
}
.ena-auth-form h2 { color: #1B2A4A; margin-top: 0; text-align: center; }
.ena-auth-intro { color: #777; font-size: 14px; text-align: center; margin-bottom: 20px; }
.ena-auth-form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #444;
	margin: 14px 0 6px;
}
.ena-auth-form input[type="text"],
.ena-auth-form input[type="email"],
.ena-auth-form input[type="tel"] {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 15px;
}
.ena-auth-form input:focus { outline: none; border-color: #1B2A4A; }
.ena-auth-form button[type="submit"] { width: 100%; margin-top: 20px; text-align: center; }
.ena-auth-switch { text-align: center; font-size: 13px; color: #777; margin-top: 18px; }
.ena-auth-switch a { color: #B8893E; font-weight: 600; text-decoration: none; }
.ena-auth-success { color: #2e7d32; font-size: 14px; margin-top: 14px; }
.ena-auth-error { color: #c62828; font-size: 14px; margin-top: 14px; }
#ena-register-step2 input,
#ena-login-step2 input {
	text-align: center;
	font-size: 22px;
	letter-spacing: 6px;
	font-weight: 700;
}

/* ===================== Page portail "Se former" ===================== */

.ena-gate { max-width: 760px; margin: 30px auto; text-align: center; }
.ena-gate h2 { color: #1B2A4A; font-size: 28px; }
.ena-gate-choices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 22px;
	margin-top: 30px;
	text-align: left;
}
.ena-gate-card {
	display: block;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 28px 24px;
	text-decoration: none;
	transition: box-shadow 0.15s, transform 0.15s;
}
.ena-gate-card:hover { box-shadow: 0 6px 18px rgba(27,42,74,0.12); transform: translateY(-2px); }
.ena-gate-icon { font-size: 34px; margin-bottom: 10px; }
.ena-gate-card h3 { color: #1B2A4A; margin: 0 0 8px; font-size: 18px; }
.ena-gate-card p { color: #777; font-size: 14px; margin: 0 0 18px; }
.ena-gate-card .ena-btn { display: inline-block; pointer-events: none; }

/* ===================== Bouton flottant retour dashboard ===================== */

.ena-float-dash-btn {
	position: fixed;
	top: 18px;
	left: 18px;
	z-index: 9999;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #1B2A4A;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0,0,0,0.25);
	border: 3px solid #fff;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
}
.ena-float-dash-btn:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 18px rgba(0,0,0,0.32);
}
.ena-float-dash-btn img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

@media (max-width: 600px) {
	.ena-float-dash-btn { width: 46px; height: 46px; top: 12px; left: 12px; }
}

/* ===================== Modale de session expirée ===================== */

.ena-session-modal {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(10,16,30,0.88);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.ena-session-modal-box {
	background: #fff;
	border-radius: 12px;
	padding: 36px 32px;
	max-width: 400px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.ena-session-modal-icon { font-size: 42px; margin-bottom: 10px; }
.ena-session-modal-box h2 { color: #1B2A4A; margin: 0 0 10px; }
.ena-session-modal-box p { color: #666; font-size: 14px; margin-bottom: 16px; }
.ena-session-modal-box input {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 15px;
	margin-bottom: 14px;
	text-align: center;
}
.ena-session-modal-box input[readonly] { background: #f5f5f5; color: #888; }
.ena-session-modal-box #ena-session-code { font-size: 22px; letter-spacing: 6px; font-weight: 700; }
.ena-session-modal-box .ena-btn { width: 100%; }

