:root {
	--primary-color: #2d3436;
	--secondary-color: #0984e3;
	--background-color: #f5f6fa;
	--text-color: #2d3436;
	--border-color: #dfe6e9;
	--hover-color: #74b9ff;
	--condom-color: #ff6b6b;
	--condom-shadow: rgba(255, 107, 107, 0.2);
	--scrollbar-color: #ff6b6b;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Poppins', sans-serif;
	background-color: var(--background-color);
	color: var(--text-color);
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
	width: 100%;
}

body.modal-open {
	overflow: hidden;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
	width: 12px;
}

::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 6px;
}

::-webkit-scrollbar-thumb {
	background: var(--scrollbar-color);
	border-radius: 6px;
	border: 3px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
	background: #ff5252;
}

.main-header {
	background: linear-gradient(
		135deg,
		var(--primary-color),
		var(--secondary-color)
	);
	color: white;
	padding: 1.5rem 0;
	text-align: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

.header-content {
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
	padding: 0 1.5rem;
}

.logo {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.tagline {
	font-size: 1.2rem;
	opacity: 0.9;
}

.main-container {
	flex: 1;
	position: relative;
	min-height: calc(100vh - 120px);
	padding: 2rem;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	width: 100%;
}

/* Préservatifs décoratifs */
.condom-decoration {
	position: absolute;
	width: 300px;
	height: 300px;
	background: var(--condom-color);
	border-radius: 50%;
	opacity: 0.1;
	z-index: 0;
}

.condom-decoration::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 280px;
	height: 280px;
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
}

.condom-decoration.top-right {
	top: -150px;
	right: -150px;
}

.condom-decoration.bottom-left {
	bottom: -150px;
	left: -150px;
}

.condom-decoration.top-left {
	top: -150px;
	left: -150px;
}

.condom-decoration.bottom-right {
	bottom: -150px;
	right: -150px;
}

.content-container {
	position: relative;
	z-index: 1;
	background: white;
	border-radius: 15px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	padding: 2rem;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.tech-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.tech-section {
	background: white;
	border: 1px solid var(--border-color);
	border-radius: 10px;
	padding: 1.5rem;
	transition: all 0.3s ease;
}

.tech-section:hover {
	border-color: var(--secondary-color);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tech-section h2 {
	color: var(--primary-color);
	margin-bottom: 1rem;
	font-size: 1.5rem;
	font-weight: 600;
}

.tech-options {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	max-height: 400px;
	overflow-y: auto;
	padding-right: 0.5rem;
}

.tech-options label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	transition: color 0.3s ease;
}

.tech-options label:hover {
	color: var(--secondary-color);
}

.tech-options input[type='checkbox'] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.generate-btn {
	display: block;
	width: 100%;
	max-width: 300px;
	margin: 0 auto;
	padding: 1rem 2rem;
	background: linear-gradient(
		135deg,
		var(--primary-color),
		var(--secondary-color)
	);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.generate-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.generate-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Modal */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	justify-content: center;
	align-items: center;
	overflow-y: auto;
	overflow-x: hidden;
}

.modal-content {
	background: white;
	border-radius: 15px;
	width: 95%;
	max-width: 800px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	margin: 2rem auto;
}

.modal-header {
	padding: 1rem;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-header h2 {
	color: var(--primary-color);
	font-size: 1.8rem;
}

.close {
	font-size: 2rem;
	color: var(--text-color);
	cursor: pointer;
	transition: color 0.3s ease;
}

.close:hover {
	color: var(--secondary-color);
}

.modal-body {
	padding: 1rem;
	overflow-y: auto;
}

.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 0.5rem;
}

.tab-btn {
	padding: 0.5rem 1rem;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--text-color);
	opacity: 0.7;
	transition: all 0.3s ease;
	border-radius: 4px;
}

.tab-btn:hover {
	opacity: 1;
	background: rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
	opacity: 1;
	background: var(--secondary-color);
	color: white;
}

.tab-content {
	display: none;
	padding: 1rem 0;
}

.tab-content.active {
	display: block;
}

.tab-content h3 {
	color: var(--primary-color);
	margin: 1rem 0;
	font-size: 1.2rem;
	font-weight: 600;
}

.tab-content pre {
	background: #f8f9fa;
	padding: 1rem;
	border-radius: 6px;
	border: 1px solid var(--border-color);
	overflow-x: auto;
	font-family: 'Consolas', 'Monaco', monospace;
	font-size: 0.9rem;
	line-height: 1.5;
	margin: 1rem 0;
}

.tab-content p {
	color: var(--text-color);
	opacity: 0.8;
	font-style: italic;
}

.modal-footer {
	padding: 1rem;
	border-top: 1px solid var(--border-color);
	display: flex;
	justify-content: flex-end;
}

.copy-btn {
	padding: 0.5rem 1rem;
	background: var(--secondary-color);
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.copy-btn:hover {
	background: var(--hover-color);
}

/* Hide copy button on how-to tab */
.modal-footer .copy-btn[data-tab='how-to'] {
	display: none;
}

/* Show copy button for other tabs */
.modal-footer .copy-btn {
	display: block;
}

/* Desktop styles */
@media (min-width: 768px) {
	.modal-content {
		width: 90%;
		max-width: 800px;
	}

	.tabs {
		flex-wrap: nowrap;
		gap: 1rem;
	}

	.tab-btn {
		font-size: 1rem;
		padding: 0.75rem 1.5rem;
	}
}

/* Responsive Design */
@media (max-width: 768px) {
	.main-container {
		padding: 1rem;
	}

	.content-container {
		padding: 1rem;
	}

	.tech-grid {
		grid-template-columns: 1fr;
	}

	.modal-content {
		width: 95%;
		margin: 1rem;
	}

	.tabs {
		flex-wrap: wrap;
	}

	.tab-btn {
		flex: 1;
		text-align: center;
	}

	.condom-decoration {
		width: 200px;
		height: 200px;
	}

	.condom-decoration::before {
		width: 180px;
		height: 180px;
	}
}

.how-to-steps {
	padding: 1rem 0;
}

.how-to-steps h4 {
	color: var(--primary-color);
	margin: 1.5rem 0 0.5rem;
	font-size: 1.1rem;
	font-weight: 600;
}

.how-to-steps h4:first-child {
	margin-top: 0;
}

.how-to-steps p {
	margin-bottom: 1rem;
	line-height: 1.6;
}

.how-to-steps code {
	background: #f1f1f1;
	padding: 0.2rem 0.4rem;
	border-radius: 4px;
	font-family: 'Consolas', 'Monaco', monospace;
	font-size: 0.9rem;
}

.how-to-steps ul {
	margin: 1rem 0;
	padding-left: 1.5rem;
}

.how-to-steps li {
	margin-bottom: 0.5rem;
	line-height: 1.6;
}
