/* ProgramLoop — identité v1 (docs/brand.md). Chargé sur toutes les pages web
   via web_include_css (hooks.py). EN pivot ; RTL/AR à l'étape 10. */

:root {
	--pl-green: #17423a;
	--pl-orange: #f2911e;
	--pl-sage: #e5ede9;
	--pl-sand: #f7f5f0;
	--pl-ink: #10201b;
	--pl-muted: #5c6f69;
	--pl-radius: 10px;
	--pl-font: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
	font-family: var(--pl-font);
	background: var(--pl-sand);
	color: var(--pl-ink);
}

.navbar,
.web-footer {
	background: #fff;
}

h1, h2, h3, .h1, .h2, .h3 {
	color: var(--pl-green);
	font-weight: 700;
	letter-spacing: -0.01em;
}

a {
	color: var(--pl-green);
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus {
	background: var(--pl-green);
	border-color: var(--pl-green);
	color: #fff;
	border-radius: var(--pl-radius);
}

.btn-primary:hover {
	filter: brightness(1.12);
}

.btn-secondary,
.btn-default {
	border-radius: var(--pl-radius);
}

.form-control:focus {
	border-color: var(--pl-orange);
	box-shadow: 0 0 0 2px rgba(242, 145, 30, 0.25);
}

/* Composants portail ProgramLoop */
.pl-card {
	background: #fff;
	border: 1px solid var(--pl-sage);
	border-radius: var(--pl-radius);
	padding: 1.5rem;
	margin-bottom: 1rem;
}

.pl-hero {
	background: var(--pl-green);
	color: #fff;
	border-radius: var(--pl-radius);
	padding: 2.5rem 2rem;
	margin: 1.5rem 0;
}

.pl-hero h1 {
	color: #fff;
}

.pl-hero .pl-accent {
	color: var(--pl-orange);
}

.pl-badge {
	display: inline-block;
	background: var(--pl-sage);
	color: var(--pl-green);
	border-radius: 999px;
	padding: 0.15rem 0.75rem;
	font-size: 0.8rem;
	font-weight: 600;
}

.pl-badge--orange {
	background: rgba(242, 145, 30, 0.15);
	color: #9a5a0d;
}

/* Chantier C4-b — badge de certification (académie), ton "réussi". */
.pl-badge--green {
	background: rgba(23, 66, 58, 0.12);
	color: var(--pl-green);
}

.pl-muted {
	color: var(--pl-muted);
}

/* Curriculum (étape 9bis-A, style Startup School) */
.pl-curriculum-progress-wrap {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.pl-curriculum-progress {
	flex: 1 1 240px;
	min-width: 160px;
	height: 9px;
	background: var(--pl-sage);
	border-radius: 999px;
	overflow: hidden;
}

.pl-curriculum-progress-fill {
	height: 100%;
	min-width: 2px;
	background: var(--pl-green);
	border-radius: 999px;
}

/* Sur le hero (fond --pl-green déjà sombre), la piste --pl-sage se
   confondrait avec le fond : piste blanche translucide (visible en toutes
   circonstances, y compris à 0 %) + remplissage --pl-orange. */
.pl-hero .pl-curriculum-progress {
	background: rgba(255, 255, 255, 0.25);
}

.pl-hero .pl-curriculum-progress-fill {
	background: var(--pl-orange);
}

.pl-curriculum-progress-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pl-muted);
}

.pl-hero .pl-curriculum-progress-label {
	color: #fff;
}

/* Bouton Continue/Review du hero curriculum : accent orange, pas le vert du
   bouton primaire standard (qui se fond dans le hero). */
.pl-hero .pl-curriculum-cta {
	display: inline-block;
	background: var(--pl-orange);
	color: #fff;
	font-weight: 600;
	padding: 12px 28px;
	border-radius: var(--pl-radius);
	border: none;
}

.pl-hero .pl-curriculum-cta:hover {
	filter: brightness(1.08);
	color: #fff;
}

.pl-curriculum-course-card {
	padding: 20px 24px;
}

.pl-curriculum-course-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0;
}

.pl-curriculum-course-head h3 {
	margin: 0;
}

.pl-curriculum-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid var(--pl-muted);
	color: var(--pl-muted);
	font-size: 0.68rem;
	font-weight: 700;
	flex: 0 0 auto;
}

.pl-curriculum-check--sm {
	width: 18px;
	height: 18px;
	border-width: 1.5px;
	font-size: 0.7rem;
	color: transparent;
	margin-right: 0.5rem;
	vertical-align: middle;
}

.pl-curriculum-check--done {
	background: var(--pl-green);
	border-color: var(--pl-green);
	color: #fff;
}

.pl-curriculum-lesson-list {
	list-style: none;
	padding-left: 0;
	margin: 0.75rem 0 0;
}

.pl-curriculum-lesson-list li {
	display: flex;
	align-items: center;
	padding: 0.4rem 0;
	border-top: 1px solid var(--pl-sage);
}

.pl-curriculum-lesson-list li:first-child {
	border-top: none;
}

@media (max-width: 576px) {
	.pl-curriculum-progress-wrap {
		flex-direction: column;
		align-items: stretch;
	}
}

/* Cartes riches (étape 9bis-B, /, /apply, /competitions) */
.pl-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

.pl-card-grid .pl-card {
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
	transition: box-shadow 150ms ease, transform 150ms ease;
}

.pl-card-grid .pl-card:hover {
	box-shadow: 0 8px 24px rgba(16, 32, 27, 0.12);
	transform: translateY(-2px);
}

.pl-card-badges {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.pl-card-date {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pl-green);
	margin-bottom: 0.5rem;
}

.pl-card-grid .pl-card > .btn {
	margin-top: auto;
	align-self: flex-start;
}

/* Landing page (étape 9bis-B) */
.pl-hero-cta-group {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
}

.pl-hero-cta-secondary {
	display: inline-block;
	padding: 12px 28px;
	border: 2px solid #fff;
	border-radius: var(--pl-radius);
	color: #fff;
	font-weight: 600;
	background: transparent;
}

.pl-hero-cta-secondary:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.pl-hero .btn-primary,
.pl-hero .pl-curriculum-cta {
	background: var(--pl-orange);
	border-color: var(--pl-orange);
	padding: 12px 28px;
	font-weight: 600;
}

.pl-hero .btn-primary:hover {
	filter: brightness(1.08);
}

.pl-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1.5rem;
	margin: 2rem 0;
	text-align: center;
}

.pl-stat-number {
	font-size: 2.25rem;
	font-weight: 800;
	color: var(--pl-green);
	line-height: 1.1;
}

.pl-stat-label {
	color: var(--pl-muted);
	font-size: 0.9rem;
}

.pl-steps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.pl-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--pl-sage);
	color: var(--pl-green);
	font-weight: 800;
	margin-bottom: 0.75rem;
}

.pl-section-title {
	margin: 2.5rem 0 1rem;
}

.pl-ecosystem-list {
	list-style: none;
	padding-left: 0;
	margin: 0.5rem 0 0;
}

.pl-ecosystem-list li {
	padding: 0.35rem 0;
	border-top: 1px solid var(--pl-sage);
}

.pl-ecosystem-list li:first-child {
	border-top: none;
}

/* Footer commun (étape 9bis-B) */
.pl-footer {
	background: #fff;
	border-top: 1px solid var(--pl-sage);
	margin-top: 2.5rem;
	padding: 2.5rem 0 1.25rem;
}

.pl-footer-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 1rem;
}

.pl-footer-logo {
	font-weight: 800;
	color: var(--pl-green);
	font-size: 1.1rem;
}

.pl-footer-col h4 {
	color: var(--pl-ink);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.75rem;
}

.pl-footer-col ul {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.pl-footer-col li {
	margin-bottom: 0.5rem;
}

.pl-footer-col a {
	color: var(--pl-muted);
}

.pl-footer-col a:hover {
	color: var(--pl-green);
}

.pl-footer-bottom {
	max-width: 1140px;
	margin: 1.5rem auto 0;
	padding: 1rem 1rem 0;
	border-top: 1px solid var(--pl-sage);
	color: var(--pl-muted);
	font-size: 0.85rem;
}

@media (max-width: 768px) {
	.pl-footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.pl-footer-grid {
		grid-template-columns: 1fr;
	}
}

/* Étape 9bis-D — bouton unifié (hors hero et hors jalon courant du stepper,
   qui restent orange). Classe dédiée .pl-btn plutôt que .btn-primary : évite
   toute collision de spécificité avec les styles de bouton du cœur Frappe
   (constatée en revue visuelle sur les petits boutons "Learn more"/"Apply"/
   "View details"/"Continue"). Aucune retouche aux styles du desk Frappe. */
.pl-btn {
	display: inline-block;
	background: var(--pl-green);
	color: #fff;
	font-weight: 600;
	padding: 8px 18px;
	border-radius: var(--pl-radius);
	border: none;
	text-decoration: none;
	line-height: 1.4;
}

.pl-btn:hover,
.pl-btn:focus {
	background: #0f2f29;
	color: #fff;
	text-decoration: none;
}

.pl-link-arrow {
	display: inline-block;
	color: var(--pl-green);
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
}

.pl-link-arrow:hover {
	color: #0f2f29;
	text-decoration: underline;
}

/* Timeline de statut candidat (/apply, Founder connecté) */
.pl-stepper {
	display: flex;
	align-items: flex-start;
	margin-top: 0.75rem;
}

.pl-stepper-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	flex: 0 0 auto;
	width: 88px;
}

.pl-stepper-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 2px solid var(--pl-muted);
	color: transparent;
	background: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	flex: 0 0 auto;
}

.pl-stepper-step--done .pl-stepper-dot {
	background: var(--pl-green);
	border-color: var(--pl-green);
	color: #fff;
}

.pl-stepper-step--current .pl-stepper-dot {
	background: var(--pl-orange);
	border-color: var(--pl-orange);
}

.pl-stepper-step--stopped .pl-stepper-dot {
	background: #b3402a;
	border-color: #b3402a;
}

.pl-stepper-label {
	font-size: 0.75rem;
	color: var(--pl-muted);
	margin-top: 0.35rem;
	line-height: 1.2;
}

.pl-stepper-step--current .pl-stepper-label,
.pl-stepper-step--stopped .pl-stepper-label {
	color: var(--pl-ink);
	font-weight: 600;
}

.pl-stepper-reallabel {
	font-size: 0.72rem;
	color: #b3402a;
	font-weight: 600;
	margin-top: 0.15rem;
}

.pl-stepper-line {
	flex: 1 1 auto;
	height: 2px;
	background: var(--pl-sage);
	margin-top: 13px;
	min-width: 12px;
}

.pl-stepper-line--done {
	background: var(--pl-green);
}

@media (max-width: 480px) {
	.pl-stepper {
		flex-direction: column;
		align-items: flex-start;
	}

	.pl-stepper-step {
		flex-direction: row;
		width: auto;
		text-align: left;
		gap: 0.5rem;
		margin-bottom: 0.25rem;
	}

	.pl-stepper-label,
	.pl-stepper-reallabel {
		margin-top: 0;
	}

	.pl-stepper-line {
		width: 2px;
		height: 16px;
		margin: 0 0 0.25rem 12px;
		min-width: 0;
	}
}

/* Étape 9ter-C4 — zone deck drag & drop */
.pl-dropzone {
	border: 2px dashed var(--pl-sage);
	border-radius: var(--pl-radius);
	padding: 1.5rem;
	text-align: center;
	cursor: pointer;
	background: var(--pl-sand);
}

.pl-dropzone:hover,
.pl-dropzone--active {
	border-color: var(--pl-green);
	background: var(--pl-sage);
}

.pl-field-error {
	color: #b3402a;
	font-size: 0.85rem;
	margin-top: 0.35rem;
	font-weight: 600;
}

/* Étape 9ter-C1 — cartes entièrement cliquables (le bouton visible reste
   l'affordance ; toute la carte partage la même destination). */
.pl-card--clickable {
	position: relative;
}

.pl-card-stretched-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.pl-card--clickable .pl-btn,
.pl-card--clickable h3 a {
	position: relative;
	z-index: 2;
}

/* Étape 9ter-C7 — état actif de la navbar */
.navbar .nav-link.pl-nav-active {
	color: var(--pl-green) !important;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Bouton "Apply" natif de la navbar (Website Settings.call_to_action),
   aligné visuellement sur .pl-btn. */
.navbar-cta {
	background: var(--pl-green) !important;
	border-color: var(--pl-green) !important;
	color: #fff !important;
	font-weight: 600;
	padding: 8px 18px !important;
	border-radius: var(--pl-radius) !important;
	margin-left: 0.75rem;
}

.navbar-cta:hover {
	background: #0f2f29 !important;
	filter: none;
}

/* Chantier C1 — barre staff commune (/dashboard, /screening, /round,
   /leaderboard), visible uniquement Chapter Admin/System Manager. */
.pl-staff-bar {
	display: flex;
	align-items: center;
	gap: 1rem;
	background: var(--pl-sage);
	border-radius: var(--pl-radius);
	padding: 0.5rem 1rem;
	margin: 1rem 0;
	font-size: 0.9rem;
}

.pl-staff-bar-label {
	font-weight: 700;
	color: var(--pl-green);
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
}

.pl-staff-bar a {
	color: var(--pl-green);
	font-weight: 600;
}

/* Chantier C1 — duel A/B pairwise (/score_team en mode Pairwise). */
.pl-duel-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.pl-duel-card {
	text-align: center;
}

@media (max-width: 576px) {
	.pl-duel-grid {
		grid-template-columns: 1fr;
	}
}

/* Chantier C2 — dépliant de preuves IA par ligne (/screening). */
.pl-evidence {
	border-top: 1px solid var(--pl-sage);
	padding-top: 0.5rem;
}

.pl-evidence summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--pl-green);
}

.pl-evidence-pass {
	margin-top: 0.5rem;
	padding: 0.75rem;
	background: var(--pl-sand);
	border-radius: var(--pl-radius);
}

.pl-evidence-pass + .pl-evidence-pass {
	margin-top: 0.5rem;
}

/* Chantier C7-d — sélecteur de langue EN | FR | AR (footer commun). */
.pl-footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pl-lang-switcher {
	font-size: 0.85rem;
}

.pl-lang-link {
	color: var(--pl-muted);
	font-weight: 600;
}

.pl-lang-link:hover {
	color: var(--pl-green);
}

.pl-lang-link--active {
	color: var(--pl-green);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pl-lang-sep {
	color: var(--pl-sage);
	margin: 0 0.4rem;
}

/* Chantier C7-e — Noto Sans Arabic, embarquée localement (self-host,
   licence OFL — voir public/fonts/OFL.txt), pas de CDN. Variable font
   couvrant 400-700 (voir docs/brand.md:30-31). */
@font-face {
	font-family: "Noto Sans Arabic";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("/assets/programloop/fonts/NotoSansArabic.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
		U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
		U+FE70-FE74, U+FE76-FEFC;
}

/* Chantier C7-e — RTL : direction posée par programloop/i18n.py (script en
   tête de <head>, cf. update_website_context) plutôt que dans ce fichier ;
   ici seulement la police et les quelques propriétés physiques (gauche/
   droite) qui ne s'inversent pas automatiquement avec `dir`. Le reste
   (flex, grid, stepper, cartes, barre staff) suit `dir="rtl"` nativement
   sans changement. */
[dir="rtl"] body {
	font-family: "Noto Sans Arabic", var(--pl-font);
}

[dir="rtl"] .pl-curriculum-check--sm {
	margin-right: 0;
	margin-left: 0.5rem;
}

[dir="rtl"] .pl-curriculum-lesson-list,
[dir="rtl"] .pl-footer-col ul {
	padding-left: revert;
	padding-right: 0;
}

[dir="rtl"] .navbar-cta {
	margin-left: 0;
	margin-right: 0.75rem;
}

@media (max-width: 480px) {
	[dir="rtl"] .pl-stepper-step {
		text-align: right;
	}

	[dir="rtl"] .pl-stepper-line {
		margin: 0 12px 0.25rem 0;
	}
}
