/* ============================================================
   Impact Stadium — Custom Block Styles
   Gutenberg component styles matching the HTML appraisal design
   Version: 1.2.0
   ============================================================ */

/* --- CSS Custom Properties (supplements theme.json) --- */
:root {
	--is-border-subtle: rgba(255, 255, 255, 0.06);
	--is-border-glow: rgba(99, 102, 241, 0.3);
	--is-accent-glow: rgba(99, 102, 241, 0.15);
	--is-accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
	--is-radius-sm: 6px;
	--is-radius-md: 12px;
	--is-radius-lg: 20px;
	--is-radius-xl: 28px;
	--is-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
	--is-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
	--is-shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
	--is-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	--is-transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.5); }

/* --- Selection --- */
::selection {
	background: #6366f1;
	color: white;
}

/* --- Ambient Background Orbs --- */
.is-ambient-bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.is-ambient-bg::before,
.is-ambient-bg::after,
.is-ambient-bg > span {
	content: '';
	position: absolute;
	border-radius: 50%;
	filter: blur(120px);
	opacity: 0.4;
	animation: is-orbFloat 20s ease-in-out infinite;
}

.is-ambient-bg::before {
	width: 600px;
	height: 600px;
	background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
	top: -200px;
	right: -200px;
}

.is-ambient-bg::after {
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
	bottom: -150px;
	left: -150px;
	animation-delay: -7s;
	animation-duration: 25s;
}

@keyframes is-orbFloat {
	0%, 100% { transform: translate(0, 0) scale(1); }
	25% { transform: translate(30px, -40px) scale(1.05); }
	50% { transform: translate(-20px, 20px) scale(0.95); }
	75% { transform: translate(40px, 30px) scale(1.02); }
}

/* ============================================================
   HERO SECTION
   Use: wp:group with class "is-hero" or "is-hero--compact"
   ============================================================ */
.is-hero {
	position: relative;
	z-index: 2;
	padding-top: 4rem !important;
	padding-bottom: 4rem !important;
	text-align: center;
}

.is-hero--compact {
	position: relative;
	z-index: 2;
	padding-top: 3rem !important;
	padding-bottom: 3rem !important;
	text-align: center;
}

/* Ensure all children inside hero are full-width and centered */
.is-hero > *,
.is-hero--compact > * {
	max-width: 800px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	text-align: center;
}

/* Hero headings need to stay on proper lines */
.is-hero h1,
.is-hero--compact h1 {
	width: 100%;
	word-break: normal;
	overflow-wrap: normal;
}

/* Hero subtitle */
.is-hero p,
.is-hero--compact p {
	width: 100%;
}

/* Hero badge */
.is-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 20px;
	border-radius: 100px;
	background: var(--is-accent-glow);
	border: 1px solid var(--is-border-glow);
	color: #818cf8;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: 2rem;
}

.is-hero__badge::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #6366f1;
	animation: is-pulse 2s ease-in-out infinite;
}

@keyframes is-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(0.8); }
}

/* Gradient text for hero title */
.is-gradient-text {
	background: var(--is-accent-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Hero meta row */
.is-hero__meta {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 2rem !important;
	flex-wrap: wrap !important;
	color: #6b7280;
	font-size: 0.85rem;
	max-width: 800px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

.is-hero__meta > * {
	margin: 0 !important;
	color: #6b7280;
	font-size: 0.85rem;
}

.is-hero__meta svg {
	width: 18px;
	height: 18px;
	opacity: 0.6;
	vertical-align: middle;
	margin-right: 6px;
}

/* ============================================================
   SECTION LABELS
   Use: wp:paragraph with class "is-section-label"
   ============================================================ */
.is-section-label {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	font-size: 0.75rem !important;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: #818cf8 !important;
	margin-bottom: 1rem !important;
}

.is-section-label::before {
	content: '';
	width: 24px;
	height: 1px;
	background: #6366f1;
}

/* ============================================================
   STEP CARDS
   Use: wp:group with class "is-step-card"
   ============================================================ */
.is-step-card {
	background: #1a1a26 !important;
	border: 1px solid var(--is-border-subtle) !important;
	border-radius: var(--is-radius-lg) !important;
	padding: 2.5rem !important;
	margin-bottom: 3rem !important;
	position: relative;
	overflow: hidden;
	transition: var(--is-transition-medium);
}

.is-step-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	background: var(--is-accent-gradient);
	opacity: 0.6;
	transition: var(--is-transition-medium);
}

.is-step-card:hover {
	border-color: rgba(99, 102, 241, 0.12) !important;
	box-shadow: var(--is-shadow-md);
}

.is-step-card:hover::before {
	opacity: 1;
	width: 4px;
}

/* Step number badge */
.is-step-number {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--is-radius-sm);
	background: var(--is-accent-glow);
	border: 1px solid var(--is-border-glow);
	color: #818cf8 !important;
	font-size: 0.85rem !important;
	font-weight: 700;
	margin-bottom: 1.25rem !important;
	font-family: 'JetBrains Mono', monospace;
	line-height: 1 !important;
	padding: 0 !important;
}

/* ============================================================
   CALLOUT BOXES
   Use: wp:group with class "is-callout is-callout--critical" etc.
   ============================================================ */
.is-callout {
	border-radius: var(--is-radius-md) !important;
	padding: 1.25rem 1.5rem !important;
	margin: 1.5rem 0 !important;
	border-left: 3px solid !important;
	font-size: 0.92rem;
	line-height: 1.7;
}

.is-callout p {
	color: inherit !important;
}

/* Callout label - first paragraph inside callout should use this */
.is-callout__label {
	font-size: 0.72rem !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 0.5rem !important;
}

/* Critical */
.is-callout--critical {
	background: rgba(239, 68, 68, 0.1) !important;
	border-color: #ef4444 !important;
	color: #fca5a5 !important;
}
.is-callout--critical .is-callout__label { color: #ef4444 !important; }

/* Warning / High */
.is-callout--warning {
	background: rgba(245, 158, 11, 0.1) !important;
	border-color: #f59e0b !important;
	color: #fcd34d !important;
}
.is-callout--warning .is-callout__label { color: #f59e0b !important; }

/* Info / Medium */
.is-callout--info {
	background: rgba(59, 130, 246, 0.1) !important;
	border-color: #3b82f6 !important;
	color: #93c5fd !important;
}
.is-callout--info .is-callout__label { color: #3b82f6 !important; }

/* Success */
.is-callout--success {
	background: rgba(16, 185, 129, 0.1) !important;
	border-color: #10b981 !important;
	color: #6ee7b7 !important;
}
.is-callout--success .is-callout__label { color: #10b981 !important; }

/* ============================================================
   CONSEQUENCE / BUSINESS IMPACT BLOCK
   Use: wp:group with class "is-consequence"
   ============================================================ */
.is-consequence {
	padding: 1.25rem 1.5rem !important;
	margin: 1.25rem 0 !important;
	background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(245, 158, 11, 0.03)) !important;
	border: 1px solid rgba(239, 68, 68, 0.1) !important;
	border-radius: var(--is-radius-md) !important;
	font-size: 0.9rem;
	color: #fca5a5 !important;
	line-height: 1.7;
}

.is-consequence p {
	color: #fca5a5 !important;
}

.is-consequence__label {
	font-size: 0.7rem !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #ef4444 !important;
	margin-bottom: 4px !important;
}

/* ============================================================
   HIGHLIGHT / QUOTE BLOCK
   Use: wp:group with class "is-highlight"
   ============================================================ */
.is-highlight {
	position: relative;
	padding: 2rem 2rem 2rem 2.5rem !important;
	margin: 2rem 0 !important;
	background: linear-gradient(135deg, #16162a, #1a1a26) !important;
	border-radius: var(--is-radius-lg) !important;
	border: 1px solid var(--is-border-subtle) !important;
	font-size: 1.1rem;
	font-style: italic;
	color: #9ca3af !important;
	line-height: 1.8;
}

.is-highlight::before {
	content: '\201C';
	position: absolute;
	top: 10px;
	left: 16px;
	font-size: 3rem;
	font-family: Georgia, serif;
	color: #6366f1;
	opacity: 0.4;
	line-height: 1;
}

.is-highlight p {
	color: #9ca3af !important;
}

.is-highlight--critical {
	border-color: rgba(239, 68, 68, 0.15) !important;
	background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), #1a1a26) !important;
}

.is-highlight strong {
	color: #e8e8ed !important;
	font-style: normal;
}

/* ============================================================
   SEVERITY BADGES
   Use: inline <span> in table cells or paragraphs
   ============================================================ */
.is-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 14px;
	border-radius: 100px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.is-badge::before {
	content: '';
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: currentColor;
}

.is-badge--critical {
	background: rgba(239, 68, 68, 0.1);
	color: #ef4444;
	border: 1px solid rgba(239, 68, 68, 0.2);
}

.is-badge--high {
	background: rgba(245, 158, 11, 0.1);
	color: #f59e0b;
	border: 1px solid rgba(245, 158, 11, 0.2);
}

.is-badge--medium {
	background: rgba(59, 130, 246, 0.1);
	color: #3b82f6;
	border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ============================================================
   SUMMARY TABLE
   Overrides Gutenberg's default table block styling
   ============================================================ */
.wp-block-table {
	overflow: hidden;
}

.wp-block-table table,
table.is-summary-table {
	width: 100%;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border-radius: 12px !important;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.06) !important;
	table-layout: auto !important;
}

.wp-block-table thead,
.is-summary-table thead {
	background: #16162a;
}

.wp-block-table th,
.is-summary-table th {
	text-align: left !important;
	padding: 14px 20px !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #6b7280 !important;
	border: none !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
	background: #16162a !important;
}

.wp-block-table td,
.is-summary-table td {
	padding: 14px 20px !important;
	font-size: 0.9rem !important;
	color: #9ca3af !important;
	border: none !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
	background: transparent !important;
	vertical-align: middle !important;
}

.wp-block-table tr:last-child td,
.is-summary-table tr:last-child td {
	border-bottom: none !important;
}

.wp-block-table tbody tr,
.is-summary-table tbody tr {
	transition: background 0.2s ease;
}

.wp-block-table tbody tr:hover,
.is-summary-table tbody tr:hover {
	background: rgba(255, 255, 255, 0.02);
}

.wp-block-table tbody tr:hover td,
.is-summary-table tbody tr:hover td {
	color: #e8e8ed !important;
}

/* First column (Étape) — narrow, monospace, muted */
.wp-block-table td:first-child,
.wp-block-table th:first-child,
.is-summary-table td:first-child,
.is-summary-table th:first-child {
	width: 60px !important;
	min-width: 60px;
	max-width: 80px;
	font-family: 'JetBrains Mono', monospace;
	color: #6b7280 !important;
	font-size: 0.85rem !important;
	text-align: center !important;
}

/* Last column (Sévérité) — fixed width for badges */
.wp-block-table td:last-child,
.wp-block-table th:last-child,
.is-summary-table td:last-child,
.is-summary-table th:last-child {
	width: 120px !important;
	min-width: 120px;
	text-align: right !important;
	white-space: nowrap;
}

/* Remove any Gutenberg default table borders/stripes */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: transparent;
}

.wp-block-table figcaption {
	color: #6b7280;
	font-size: 0.8rem;
}

/* ============================================================
   STAT CARDS
   Use: wp:columns > wp:column with class "is-stat-card"
   ============================================================ */
.is-stats-row {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1.25rem;
	margin: 2rem 0;
}

.is-stat-card {
	background: #1a1a26 !important;
	border: 1px solid var(--is-border-subtle) !important;
	border-radius: var(--is-radius-md) !important;
	padding: 1.5rem !important;
	text-align: center;
	transition: var(--is-transition-medium);
}

.is-stat-card:hover {
	border-color: rgba(99, 102, 241, 0.15) !important;
	transform: translateY(-2px);
}

.is-stat-card__value {
	font-size: 2rem !important;
	font-weight: 800 !important;
	color: #818cf8 !important;
	line-height: 1 !important;
	margin-bottom: 6px !important;
	font-family: 'JetBrains Mono', monospace !important;
}

.is-stat-card__label {
	font-size: 0.75rem !important;
	color: #6b7280 !important;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600 !important;
}

/* Stat card color accents */
.is-stat-card--critical { border-color: rgba(239, 68, 68, 0.15) !important; }
.is-stat-card--critical .is-stat-card__value { color: #ef4444 !important; }

.is-stat-card--high { border-color: rgba(245, 158, 11, 0.15) !important; }
.is-stat-card--high .is-stat-card__value { color: #f59e0b !important; }

.is-stat-card--medium { border-color: rgba(59, 130, 246, 0.15) !important; }
.is-stat-card--medium .is-stat-card__value { color: #3b82f6 !important; }

/* ============================================================
   RECOMMENDATION ITEMS
   Use: wp:group with class "is-reco-group"
   ============================================================ */
.is-reco-group__badge {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	padding: 3px 10px;
	border-radius: 100px;
	background: var(--is-accent-glow);
	color: #818cf8;
	border: 1px solid var(--is-border-glow);
	vertical-align: middle;
	margin-right: 8px;
}

.is-reco-item {
	display: flex !important;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 18px !important;
	background: #1a1a26 !important;
	border: 1px solid var(--is-border-subtle) !important;
	border-radius: var(--is-radius-md) !important;
	font-size: 0.92rem;
	color: #9ca3af !important;
	line-height: 1.6;
	transition: var(--is-transition-fast);
	margin-bottom: 10px !important;
}

.is-reco-item:hover {
	border-color: rgba(99, 102, 241, 0.12) !important;
	background: #222233 !important;
}

.is-reco-item::before {
	content: '';
	width: 20px;
	height: 20px;
	min-width: 20px;
	border-radius: 50%;
	border: 2px solid var(--is-border-glow);
	margin-top: 2px;
	flex-shrink: 0;
	transition: var(--is-transition-fast);
}

.is-reco-item:hover::before {
	border-color: #6366f1;
	background: var(--is-accent-glow);
}

.is-reco-item p {
	color: #9ca3af !important;
	margin: 0 !important;
}

.is-reco-item strong {
	color: #e8e8ed !important;
}

/* ============================================================
   DESIGN PRINCIPLE CARDS (grid of 3)
   Use: wp:group with class "is-principle-card"
   ============================================================ */
.is-principle-card {
	padding: 1.25rem !important;
	background: #1a1a26 !important;
	border: 1px solid var(--is-border-subtle) !important;
	border-radius: var(--is-radius-md) !important;
}

.is-principle-card__tag {
	font-size: 0.7rem !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #818cf8 !important;
	margin-bottom: 0.5rem !important;
}

.is-principle-card p:last-child {
	color: #9ca3af !important;
	font-size: 0.82rem !important;
	line-height: 1.6 !important;
	margin-bottom: 0 !important;
}

/* ============================================================
   COMPARISON BOXES (Industry Standard vs Current)
   ============================================================ */
.is-compare-box {
	flex: 1;
	min-width: 200px;
	padding: 1.25rem !important;
	border-radius: var(--is-radius-md) !important;
	text-align: center;
}

.is-compare-box--standard {
	background: #16162a !important;
	border: 1px solid var(--is-border-subtle) !important;
}

.is-compare-box--current {
	background: rgba(239, 68, 68, 0.05) !important;
	border: 1px solid rgba(239, 68, 68, 0.1) !important;
}

/* ============================================================
   SCREENSHOT / IMAGE STYLING
   Applies to core/image blocks inside step cards
   ============================================================ */
.is-step-card .wp-block-image {
	margin: 1.5rem auto !important;
	text-align: center;
	display: flex !important;
	flex-direction: column;
	align-items: center;
}

.is-step-card .wp-block-image img {
	max-width: 240px;
	margin-left: auto !important;
	margin-right: auto !important;
	display: block;
	border-radius: var(--is-radius-lg);
	border: 1px solid var(--is-border-subtle);
	box-shadow: var(--is-shadow-md);
	transition: var(--is-transition-medium);
}

.is-step-card .wp-block-image figcaption {
	text-align: center;
	color: #6b7280;
	font-size: 0.8rem;
	margin-top: 10px;
}

.is-step-card .wp-block-image img:hover {
	border-color: var(--is-border-glow);
	transform: translateY(-3px) scale(1.02);
	box-shadow: var(--is-shadow-lg), var(--is-shadow-glow);
	filter: brightness(1.08);
}

/* Multiple screenshots side by side */
.is-screenshot-group {
	display: flex !important;
	gap: 1.25rem;
	justify-content: center;
	flex-wrap: wrap;
	margin: 1.5rem 0;
}

.is-screenshot-group .wp-block-image img {
	max-width: 180px;
}

/* ============================================================
   NAVIGATION BAR (fixed)
   ============================================================ */
.is-nav {
	position: fixed !important;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	padding: 0 2rem !important;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	background: rgba(10, 10, 15, 0.8) !important;
	border-bottom: 1px solid var(--is-border-subtle) !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
.is-footer {
	position: relative;
	z-index: 2;
	border-top: 1px solid var(--is-border-subtle) !important;
	padding: 3rem 2rem !important;
	text-align: center;
}

.is-footer__divider {
	width: 40px;
	height: 2px;
	background: var(--is-accent-gradient);
	margin: 1rem auto;
	border-radius: 1px;
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.is-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0%;
	background: var(--is-accent-gradient);
	z-index: 1001;
	transition: width 0.1s linear;
	box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* ============================================================
   INLINE CODE
   ============================================================ */
code {
	color: #818cf8;
	background: #16162a;
	padding: 2px 8px;
	border-radius: 4px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.85em;
}

/* ============================================================
   CROSS MARK LIST (used in Step 7)
   ============================================================ */
.is-cross-list {
	list-style: none !important;
	padding-left: 0 !important;
}

.is-cross-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: #9ca3af;
	font-size: 0.92rem;
	margin-bottom: 8px;
}

.is-cross-list li::before {
	content: '\2715';
	color: #ef4444;
	margin-top: 2px;
	flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE: Tablet
   ============================================================ */
@media (max-width: 768px) {
	.is-hero,
	.is-hero--compact {
		padding-top: 2rem !important;
		padding-bottom: 2rem !important;
	}

	.is-step-card {
		padding: 1.5rem !important;
		margin-bottom: 2rem !important;
	}

	.is-stats-row {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}

	.is-stat-card__value {
		font-size: 1.6rem !important;
	}

	.is-step-card .wp-block-image img {
		max-width: 200px;
	}

	.is-screenshot-group .wp-block-image img {
		max-width: 140px;
	}

	.is-callout {
		padding: 1rem 1.25rem !important;
		font-size: 0.85rem;
	}

	.is-consequence {
		font-size: 0.85rem;
		padding: 1rem 1.25rem !important;
	}
}

/* ============================================================
   RESPONSIVE: Mobile
   ============================================================ */
@media (max-width: 480px) {
	.is-hero--compact {
		padding-top: 1.5rem !important;
		padding-bottom: 1.5rem !important;
	}

	.is-hero__badge {
		font-size: 0.7rem;
		padding: 6px 14px;
	}

	.is-hero__meta {
		flex-direction: column;
		gap: 0.4rem;
	}

	.is-step-card {
		padding: 1.25rem !important;
		border-radius: var(--is-radius-md) !important;
	}

	.is-step-number {
		width: 34px;
		height: 34px;
		font-size: 0.75rem !important;
	}

	.is-stats-row {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.5rem;
	}

	.is-stat-card {
		padding: 1rem 0.75rem !important;
	}

	.is-stat-card__value {
		font-size: 1.4rem !important;
	}

	.is-stat-card__label {
		font-size: 0.65rem !important;
	}

	.is-step-card .wp-block-image img {
		max-width: 180px;
	}

	.is-screenshot-group .wp-block-image img {
		max-width: 100px;
	}

	.is-reco-item {
		padding: 10px 12px !important;
		font-size: 0.82rem;
	}

	.is-highlight {
		padding: 1.25rem !important;
		font-size: 0.92rem;
	}
}
