/* =========================================================
   Projet — AlgoGraphe
   Compatible ataraXy V2
   ========================================================= */

.projet-algographe {
	max-width: 1250px;
	margin: 0 auto;
	padding: 24px;
}

.projet-algographe * {
	box-sizing: border-box;
}

.projet-algographe .titre {
	font-size: 2rem;
	font-weight: 800;
	margin-bottom: 8px;
	color: var(--couleur-texte, #202124);
}

.algographe-intro {
	max-width: 820px;
	margin: 0 0 24px;
	line-height: 1.6;
	color: #4b5563;
}

/* Accueil */

.algographe-start-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 22px;
	margin-top: 28px;
}

.algographe-start-card {
	flex: 1 1 310px;
	max-width: 390px;
	padding: 24px;
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 14px 36px rgba(0, 0, 0, .10);
	text-align: left;
}

.algographe-start-card h2 {
	margin: 0 0 10px;
	font-size: 1.25rem;
	font-weight: 800;
	color: #111827;
}

.algographe-start-card p {
	margin: 0 0 18px;
	line-height: 1.55;
	color: #4b5563;
}

.algo-radio-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 12px 0;
}

.algo-radio-row label,
.algo-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: #374151;
}

.projet-algographe textarea,
.projet-algographe input[type="number"],
.projet-algographe input[type="text"],
.projet-algographe input[type="texte"] {
	width: 100%;
	padding: 10px 13px;
	border: 1px solid rgba(17, 24, 39, .30);
	border-radius: 13px;
	background: #f8fafc;
	color: #111827;
	font-size: .98rem;
}

.projet-algographe textarea {
	min-height: 150px;
	resize: vertical;
	font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.projet-algographe input:focus,
.projet-algographe textarea:focus {
	outline: none;
	border-color: #4f46e5;
	background: #fff;
	box-shadow: 0 0 0 4px rgba(79, 70, 229, .13);
}

/* Boutons */

.projet-algographe input[type="submit"],
.projet-algographe button,
.projet-algographe .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 18px;
	margin-top: 12px;
	border: none;
	border-radius: 999px;
	background: #4f46e5;
	color: #fff;
	font-weight: 800;
	font-size: .95rem;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(79, 70, 229, .22);
	transition: transform .15s ease, opacity .15s ease;
}

.projet-algographe input[type="submit"]:hover,
.projet-algographe button:hover,
.projet-algographe .btn:hover {
	transform: translateY(-1px);
	opacity: .92;
	text-decoration: none;
}

/* Haut de page après calcul */

.algographe-top {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: 22px;
	margin: 26px 0;
}

.aff_gauche,
.aff_droite {
	display: block;
	width: max-content;
	max-width: 100%;
	margin: 0;
	padding: 22px;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .09);
	text-align: center;
}

.aff_gauche h2,
.aff_droite h2 {
	margin: 0 0 14px;
	font-size: 1.15rem;
	font-weight: 800;
	color: #111827;
}

.aff_gauche table {
	margin: 0 auto 14px;
	border-collapse: separate;
	border-spacing: 6px 8px;
}

.aff_gauche td {
	text-align: center;
	white-space: nowrap;
}

.aff_gauche input[type="text"],
.aff_gauche input[type="texte"] {
	width: 58px;
	text-align: center;
}

.case-disabled {
	background: #111827 !important;
	border-color: #111827 !important;
	cursor: not-allowed;
}

/* Onglets */

.algographe-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 30px 0 22px;
	padding: 8px;
	border-radius: 24px;
	background: rgba(17, 24, 39, .06);
}

.algographe-tab {
	flex: 1 1 170px;
	min-height: 44px;
	padding: 10px 14px;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: #374151;
	font-weight: 800;
	cursor: pointer;
	box-shadow: none;
}

.algographe-tab:hover {
	background: rgba(255, 255, 255, .8);
	transform: translateY(-1px);
	color : black;
}

.algographe-tab.is-active {
	background: #4f46e5;
	color: #fff;
	box-shadow: 0 8px 18px rgba(79, 70, 229, .24);
}

/* Panneaux */

.algographe-panels {
	margin-top: 18px;
}

.action_algo,
.algographe-panel {
	display: none;
	width: auto;
	max-width: 100%;
	margin: 0;
	padding: 28px;
	border: none;
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 14px 36px rgba(0, 0, 0, .10);
	text-align: left;
	overflow: visible;
}

.algographe-panel.is-active {
	display: block;
}

.action_algo h3,
.algographe-panel h3 {
	margin: 0 0 18px;
	font-size: 1.35rem;
	font-weight: 800;
	color: #111827;
}

.action_algo h3 em,
.algographe-panel h3 em {
	display: block;
	margin-top: 4px;
	font-size: .9rem;
	font-weight: 600;
	color: #6b7280;
}

.algographe-resultat {
	line-height: 1.6;
}

.algographe-resultat form {
	margin: 16px 0;
	padding: 16px;
	border-radius: 18px;
	background: #f8fafc;
	border: 1px solid rgba(17, 24, 39, .08);
}

.algographe-resultat select {
	min-height: 38px;
	padding: 8px 12px;
	border: 1px solid rgba(17, 24, 39, .30);
	border-radius: 12px;
	background: #fff;
	color: #111827;
}

.algographe-resultat ul {
	margin-top: 12px;
	padding-left: 24px;
}

.algographe-resultat li {
	margin: 12px 0;
}

/* Messages */

.algographe-message {
	max-width: 620px;
	margin: 32px auto;
	padding: 24px;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
	text-align: center;
}

/* MathJax */

.projet-algographe mjx-container[display="true"] {
	display: block;
	width: max-content;
	max-width: 100%;
	margin: 14px auto;
	overflow: visible;
}

.projet-algographe mjx-container {
	max-width: 100%;
	overflow: visible;
}

/* Liens */

.projet-algographe a {
	color: #4f46e5;
	font-weight: 700;
	text-decoration: none;
}

.projet-algographe a:hover {
	text-decoration: underline;
}

/* Copyright */

#copyright {
	display: block;
	max-width: 950px;
	margin: 36px auto 12px;
	padding: 14px 18px;
	border-radius: 16px;
	background: rgba(0, 0, 0, .04);
	font-size: .82rem;
	line-height: 1.45;
	text-align: left;
	color: rgba(0, 0, 0, .68);
}

/* Responsive */

@media (max-width: 800px) {
	.projet-algographe {
		padding: 16px;
	}

	.projet-algographe .titre {
		font-size: 1.65rem;
	}

	.algographe-start-grid,
	.algographe-top {
		display: block;
	}

	.algographe-start-card,
	.aff_gauche,
	.aff_droite,
	.algographe-panel {
		width: 100%;
		max-width: none;
		margin: 0 0 18px;
	}

	.algographe-tabs {
		border-radius: 22px;
	}

	.algographe-tab {
		flex: 1 1 100%;
	}
}

.algographe-edition {
	margin-top: 34px;
	padding-top: 28px;
	border-top: 1px solid rgba(17, 24, 39, .10);
}