@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;800&display=swap');

/* ===== Base ===== */

.a2b-page {
	--a2b-accent: #6dc3ff;
	--a2b-accent-dark: #2c6fa8;
	--a2b-gold: #e8c675;
	position: relative;
	padding: 28px 24px;
	background: radial-gradient(circle at 15% 0%, #eef4fb 0%, #e4ecf6 45%, #dde6f2 100%);
	border-radius: 22px;
	font-family: "Titillium Web", arial, helvetica, sans-serif;
}

.a2b-page h2,
.a2b-page h3,
.a2b-hero-title {
	font-family: "Cinzel", "Titillium Web", serif;
}

.a2b-hero {
	position: relative;
	margin-bottom: 28px;
	padding: 64px 40px;
	background-size: cover;
	background-position: center 35%;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.a2b-hero-overlay {
	position: relative;
	z-index: 1;
	max-width: 640px;
}

.a2b-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, rgba(6, 14, 28, 0.92) 0%, rgba(6, 14, 28, 0.55) 55%, rgba(6, 14, 28, 0.15) 100%);
}

.a2b-hero-title {
	margin: 0 0 8px;
	color: #fff;
	font-size: 2.1em;
	font-weight: 800;
	letter-spacing: 0.01em;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.a2b-hero-sub {
	margin: 0;
	color: var(--a2b-gold);
	font-size: 1.05em;
	font-weight: 600;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ===== Layout général ===== */

.a2b-app {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
	gap: 28px;
	align-items: start;
}

.a2b-loading,
.a2b-empty {
	padding: 1.5em 0;
	color: #888;
	text-align: center;
}

.a2b-steps {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

@keyframes a2b-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.a2b-section {
	padding: 22px 24px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 16px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
	animation: a2b-fade-in 0.35s ease both;
}

.a2b-steps .a2b-section:nth-child(2) { animation-delay: 0.05s; }
.a2b-steps .a2b-section:nth-child(3) { animation-delay: 0.1s; }
.a2b-steps .a2b-section:nth-child(4) { animation-delay: 0.15s; }
.a2b-steps .a2b-section:nth-child(5) { animation-delay: 0.2s; }

.a2b-summary {
	animation: a2b-fade-in 0.4s ease 0.1s both;
}

.a2b-section h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	font-size: 1.05em;
	font-weight: 800;
	color: #1a1a2a;
}

.a2b-step-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	flex: 0 0 26px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--a2b-accent-dark), var(--a2b-accent));
	color: #fff;
	font-size: 0.8em;
	font-weight: 800;
}

.a2b-hint {
	color: #999;
	font-size: 0.7em;
	font-weight: 400;
}

/* ===== Classes ===== */

.a2b-class-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
}

.a2b-class-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 16px 12px 14px;
	border: 2px solid #eee;
	border-radius: 14px;
	background: linear-gradient(180deg, #fafbfc, #f2f4f6);
	text-align: center;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.a2b-class-card::after {
	content: "";
	position: absolute;
	top: -60%;
	left: -60%;
	width: 40%;
	height: 220%;
	background: rgba(255, 255, 255, 0.5);
	transform: rotate(20deg);
	opacity: 0;
	transition: opacity 0.2s ease, left 0.5s ease;
	pointer-events: none;
}

.a2b-class-card:hover::after {
	left: 130%;
	opacity: 1;
}

.a2b-class-icon {
	width: 52px;
	height: 52px;
	margin-bottom: 6px;
	object-fit: contain;
	filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
	transition: transform 0.15s ease;
}

.a2b-class-card:hover {
	border-color: var(--a2b-accent);
	transform: translateY(-3px);
	box-shadow: 0 8px 18px rgba(44, 111, 168, 0.18);
}

.a2b-class-card:hover .a2b-class-icon {
	transform: scale(1.08);
}

.a2b-class-card.is-active {
	border-color: var(--a2b-gold);
	background: linear-gradient(180deg, #fff8ea, #fdf0d0);
	box-shadow: 0 8px 20px rgba(232, 198, 117, 0.35);
}

.a2b-class-name {
	font-weight: 800;
	font-size: 0.98em;
	color: #1a1a2a;
}

.a2b-class-role,
.a2b-class-weapon {
	color: #777;
	font-size: 0.76em;
}

/* ===== Stats ===== */

.a2b-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 10px 16px;
}

.a2b-stat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 10px;
	transition: background 0.15s ease;
}

.a2b-stat-row:hover {
	background: #f7fafd;
}

.a2b-stat-row label {
	display: flex;
	flex-direction: column;
	font-size: 0.85em;
	font-weight: 700;
	color: #333;
}

.a2b-stat-effect {
	color: #999;
	font-size: 0.78em;
	font-weight: 400;
}

.a2b-stat-row input[type="number"] {
	width: 64px;
	padding: 6px 7px;
	border: 1px solid #ddd;
	border-radius: 8px;
	text-align: center;
	font-weight: 700;
	color: var(--a2b-accent-dark);
}

.a2b-stat-row input[type="number"]:focus {
	border-color: var(--a2b-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(109, 195, 255, 0.2);
}

/* ===== Compétences ===== */

.a2b-skills-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.a2b-skill-col h4 {
	margin: 0 0 8px;
	font-size: 0.9em;
}

.a2b-count {
	display: inline-block;
	color: var(--a2b-accent-dark);
	font-size: 0.8em;
	font-weight: 400;
	transition: color 0.15s ease, transform 0.15s ease;
}

@keyframes a2b-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-3px); }
	75% { transform: translateX(3px); }
}

.a2b-count.is-cap-reached {
	color: #e05a4e;
	animation: a2b-shake 0.35s ease;
}

.a2b-skill-item.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.a2b-cap-note {
	margin: 0 0 14px;
	padding: 8px 12px;
	background: #eef4fb;
	border-radius: 8px;
	color: #4a6b8a;
	font-size: 0.76em;
	line-height: 1.5;
}

.a2b-cap-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #9fb0c8;
	font-size: 0.75em;
	font-weight: 600;
}

.a2b-cap-tag.is-over {
	background: rgba(224, 90, 78, 0.2);
	color: #f3a79c;
}

.a2b-skill-search {
	box-sizing: border-box;
	width: 100%;
	margin-bottom: 8px;
	padding: 0.5em 0.8em;
	border: 1px solid #ddd;
	border-radius: 8px;
}

.a2b-skill-search:focus {
	border-color: var(--a2b-accent);
	outline: none;
}

.a2b-skill-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-height: 260px;
	overflow-y: auto;
	padding: 4px;
}

.a2b-skill-item {
	padding: 5px 11px;
	border: 1px solid #ddd;
	border-radius: 999px;
	background: #fff;
	color: #444;
	font-size: 0.78em;
	cursor: pointer;
	transition: all 0.15s ease;
}

.a2b-skill-item:hover {
	border-color: var(--a2b-accent);
	color: var(--a2b-accent-dark);
}

.a2b-skill-item.is-selected {
	background: linear-gradient(135deg, var(--a2b-accent-dark), var(--a2b-accent));
	border-color: transparent;
	color: #fff;
}

/* ===== Arcana ===== */

.a2b-arcana-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}

.a2b-arcana-card {
	padding: 14px 16px;
	border: 1px solid #eee;
	border-radius: 12px;
	background: linear-gradient(180deg, #fbfbfd, #f3f4f7);
	transition: box-shadow 0.15s ease;
}

.a2b-arcana-card:hover {
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.a2b-arcana-card h4 {
	margin: 0 0 2px;
	font-size: 0.9em;
	color: #1a1a2a;
}

.a2b-arcana-icon {
	display: block;
	margin-bottom: 6px;
	font-size: 1.4em;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.a2b-arcana-role {
	margin: 0 0 8px;
	color: #999;
	font-size: 0.72em;
}

.a2b-arcana-card select,
.a2b-arcana-card input {
	box-sizing: border-box;
	width: 100%;
	padding: 0.5em 0.6em;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 0.85em;
}

.a2b-arcana-card select:focus,
.a2b-arcana-card input:focus {
	border-color: var(--a2b-accent);
	outline: none;
}

/* ===== Résumé ===== */

.a2b-summary {
	position: sticky;
	top: 20px;
	padding: 22px 24px;
	background: linear-gradient(165deg, #10192b, #1b2740);
	border-radius: 18px;
	box-shadow: 0 12px 32px rgba(16, 25, 43, 0.35);
	color: #dfe6f0;
}

.a2b-summary h3 {
	margin: 0 0 16px;
	color: #fff;
	font-size: 1.05em;
	font-weight: 800;
}

.a2b-summary-portrait {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
	padding: 12px 14px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 12px;
}

.a2b-summary-portrait img {
	width: 52px;
	height: 52px;
	object-fit: contain;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.a2b-summary-portrait div {
	display: flex;
	flex-direction: column;
}

.a2b-summary-classname {
	color: #fff;
	font-weight: 800;
	font-size: 1em;
}

.a2b-summary-classrole {
	color: var(--a2b-gold);
	font-size: 0.8em;
}

.a2b-summary-row {
	margin-bottom: 10px;
	font-size: 0.88em;
	line-height: 1.5;
	color: #c6d1e2;
}

.a2b-summary-row strong {
	color: #fff;
}

.a2b-bonus-list {
	margin: 6px 0 12px;
	padding-left: 18px;
	font-size: 0.85em;
	line-height: 1.8;
	color: #c6d1e2;
}

.a2b-bonus-list strong {
	color: var(--a2b-gold);
}

.a2b-disclaimer {
	margin: 14px 0 18px;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	color: #94a3b8;
	font-size: 0.72em;
	line-height: 1.5;
}

.a2b-share-btn {
	display: block;
	width: 100%;
	padding: 0.8em 1em;
	border: none;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--a2b-gold), #d1a44a);
	color: #1a1400;
	font-weight: 800;
	font-size: 0.9em;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.15s ease;
}

.a2b-share-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.a2b-share-feedback {
	margin: 10px 0 0;
	color: #7ee787;
	font-size: 0.78em;
	word-break: break-all;
}

.a2b-reset-btn {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 0.6em 1em;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 10px;
	background: transparent;
	color: #9fb0c8;
	font-size: 0.8em;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.a2b-reset-btn:hover {
	border-color: #e07a6b;
	color: #e07a6b;
}

.a2b-draft-notice {
	margin: 0 0 14px;
	padding: 8px 12px;
	background: rgba(232, 198, 117, 0.15);
	border: 1px solid rgba(232, 198, 117, 0.35);
	border-radius: 8px;
	color: var(--a2b-gold);
	font-size: 0.78em;
	font-weight: 600;
}

.a2b-saved-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	z-index: 9999;
	padding: 10px 20px;
	background: #10192b;
	color: #fff;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	font-size: 0.85em;
	font-weight: 600;
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
}

.a2b-saved-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ===== Responsive ===== */

@media only screen and (max-width: 60em) {
	.a2b-app {
		grid-template-columns: 1fr;
	}
	.a2b-skills-columns {
		grid-template-columns: 1fr;
	}
	.a2b-summary {
		position: static;
	}
	.a2b-hero {
		padding: 44px 24px;
	}
	.a2b-hero-title {
		font-size: 1.5em;
	}
}
