/* ============================================================
   DOCUMENTS  –  [documents]
   Preview PDF (iframe) + image. Grille 2 colonnes cliquables.
   ============================================================ */

.wc-docs {
	width: 100%;
	box-sizing: border-box;
}

.wc-docs__titre {
	margin: 0 0 var(--s-2xl);
	font-size: var(--fs-h2);
	font-weight: var(--fw-black);
	color: var(--c-brown-700);
	text-transform: uppercase;
	letter-spacing: var(--ls-widest);
	line-height: var(--lh-tight);
	text-align: center;
}

.wc-docs__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--s-2xl);
}

.wc-docs__item {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--br-lg);
	background: var(--c-cream-500);
	border: 2px solid var(--c-brown-700);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
	text-decoration: none;
	color: var(--c-text-inverse);
	transition: transform var(--tr-base), box-shadow var(--tr-base), border-color var(--tr-base);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;

	&:hover,
	&:focus-visible {
		transform: translateY(-4px);
		box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
		border-color: var(--c-primary);
		outline: none;
	}

	&:focus-visible {
		outline: 3px solid var(--c-primary-light);
		outline-offset: 3px;
	}
}

.wc-docs__preview {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;
	background: var(--c-cream-800);
	overflow: hidden;
}

/* iframe : preview pure, pas de clic possible (capture par le <a> parent) */
.wc-docs__pdf {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	border: none;
	pointer-events: none;
	background: var(--c-white);
	display: block;
}

.wc-docs__image {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	pointer-events: none;
}

/* Fallback : visible si iframe ne rend pas (iOS, PDF bloque…) */
.wc-docs__fallback {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--s-md);
	padding: var(--s-xl);
	background: var(--c-cream-800);
	color: var(--c-brown-700);
	text-align: center;
}

.wc-docs__fallback-icon {
	width: 4rem;
	height: 4rem;
	opacity: 0.5;
}

.wc-docs__fallback-text {
	font-size: 0.8125rem;
	font-weight: var(--fw-semibold);
	letter-spacing: var(--ls-wide);
	color: rgba(89, 42, 22, 0.7);
	word-break: break-word;
	max-width: 100%;
}

/* Overlay du bas : label + CTA "Ouvrir" */
.wc-docs__overlay {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s-md);
	padding: var(--s-md) var(--s-ld);
	background: var(--c-brown-700);
	color: var(--c-text-inverse);
	transition: background-color var(--tr-base);
}

.wc-docs__item:hover .wc-docs__overlay,
.wc-docs__item:focus-visible .wc-docs__overlay {
	background: var(--c-primary);
}

.wc-docs__label {
	font-size: 0.9375rem;
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-wider);
	text-transform: uppercase;
	line-height: var(--lh-snug);
}

.wc-docs__cta {
	display: inline-flex;
	align-items: center;
	gap: var(--s-xs);
	flex-shrink: 0;
	font-size: 0.75rem;
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	color: var(--c-cream-600);

	& svg {
		fill: none !important;
		stroke: currentColor !important;
	}
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
	.wc-docs__grid {
		gap: var(--s-xl);
	}
}

@media (max-width: 600px) {
	.wc-docs__titre {
		font-size: var(--fs-h3);
		letter-spacing: var(--ls-wide);
	}

	.wc-docs__grid {
		grid-template-columns: 1fr;
		gap: var(--s-ld);
	}
}

@media (max-width: 480px) {
	.wc-docs__label {
		font-size: 0.8125rem;
		letter-spacing: var(--ls-wide);
	}

	.wc-docs__cta {
		font-size: 0.6875rem;
	}

	.wc-docs__cta span:not(.sr-only) {
		display: none;
	}
}
