/* ------------------- */
/* ROOT & VARIABLES    */
/* ------------------- */
:root {
	--color-primary: #f0a61e;
	--color-primary-2: #a91e22;
	--color-secondary: #056e63;
	--color-secondary-rgb: 5, 110, 99;
	--color-dark: #000;
	--color-light-dark: #1b1b1b;
	--color-text: #e5e7eb;
	--color-white: #ffffff;

	--color-text-muted: #9ca3af;
	--color-border: #2d2d2d;
	--font-family-base: "Poppins", sans-serif;
	--header-height: 72px;
	--text-title-size: clamp(2.5rem, 5vw, 3rem);
}

/* ------------------- */
/* RESET & BASE        */
/* ------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	font-size: 16px;
}

body {
	font-family: var(--font-family-base);
	background-color: var(--color-dark);
	color: var(--color-text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.2;
	font-weight: 600;
	color: white;
}

h1 {
	font-size: 3rem;
}
h2 {
	font-size: 2.25rem;
}
h3 {
	font-size: 1.5rem;
}
h4 {
	font-size: 1.25rem;
}

p {
	margin-bottom: 1rem;
	color: var(--color-text-muted);
}
p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color 0.3s ease;
}
a:hover {
	color: #ffc75f;
}

ul {
	list-style: none;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ------------------- */
/* UTILITY CLASSES     */
/* ------------------- */
.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.text-center {
	text-align: center;
}
.text-primary {
	color: var(--color-primary);
}
.section-padding {
	padding: 5rem 0;
}
.bg-dark {
	background-color: var(--color-dark);
}
.bg-light-dark {
	background-color: var(--color-light-dark);
}

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

.btn {
	display: inline-block;
	padding: 0.75rem 1.75rem;
	border-radius: 50px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
	border: none;
}
.btn-primary {
	background-color: var(--color-primary);
	color: var(--color-dark);
}
.btn-primary:hover {
	background-color: #ffc75f;
	color: var(--color-dark);
	transform: translateY(-2px);
}
.btn-secondary {
	background-color: var(--color-primary-2);
	color: white;
}
.btn-secondary:hover {
	background-color: #c73a3e;
	transform: translateY(-2px);
}

.mt-1 {
	margin-top: 1rem;
}
.rounded-image {
	border-radius: 0.5rem;
}
.text-right {
	text-align: right;
}

/* ------------------- */
/* HEADER              */
/* ------------------- */
.header {
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	background: rgba(0, 0, 0, 0.85);
	border-bottom: 1px solid var(--color-border);
	padding: 0.75rem 0;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	transition: all 0.3s ease;
}

.header.sticky-header {
	position: fixed;
}

/* Transparent header on home page */
#page-home .header {
	background: rgba(0, 0, 0, 0.3);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Solid background when scrolled */
#page-home .header.scrolled {
	/* background: rgba(0, 0, 0, 0.95);
	border-bottom: 1px solid var(--color-border); */
}

.header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* ------------------- */
/* LOGO STYLING        */
/* ------------------- */
.logo {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--color-primary-2);
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	position: relative;
	z-index: 1001;
}

.logo img.logo-img {
	max-height: 55px;
	width: auto;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.logo:hover img.logo-img {
	transform: scale(1.05);
}

/* ------------------- */
/* NAVIGATION - MOBILE */
/* ------------------- */
.main-nav {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: linear-gradient(135deg, var(--color-light-dark) 0%, #0a0a0a 100%);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding-top: var(--header-height);
	z-index: 999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show nav when mobile menu is open */
body.mobile-nav-open {
	overflow: hidden;
}

body.mobile-nav-open .main-nav {
	display: flex;
	opacity: 1;
	visibility: visible;
}

.nav-link {
	color: var(--color-text);
	padding: 0.75rem 1.5rem;
	font-weight: 500;
	font-size: 1.5rem;
	position: relative;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.nav-link::after {
	content: "";
	position: absolute;
	bottom: 0.5rem;
	left: 50%;
	transform: translateX(-50%) scaleX(0);
	width: 80%;
	height: 2px;
	background: var(--color-primary);
	transition: transform 0.3s ease;
}

.nav-link.active,
.nav-link:hover {
	color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
	transform: translateX(-50%) scaleX(1);
}
/* ------------------- */
/* FOOTER              */
/* ------------------- */

.footer {
	background-color: var(--color-light-dark);
	padding: 3rem 0 2rem;
	border-top: 1px solid var(--color-border);
}

.footer .grid {
	align-items: flex-start;
}

/* Texte du footer */
.footer-about {
	font-size: 0.9rem;
	max-width: 320px;
}

/* Liens rapides */
.footer-links li + li {
	margin-top: 0.4rem;
}

.footer-links a {
	font-size: 0.9rem;
	color: var(--color-text-muted);
}

.footer-links a:hover {
	color: var(--color-primary);
}

/* Contact */
.footer-contact {
	margin-top: 0.75rem;
}

.footer-contact li {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
}

.footer-contact-icon {
	color: var(--color-primary);
	margin-top: 0.2rem;
}

/* Réseaux sociaux */
.footer-social {
	margin-top: 1.25rem;
}

.footer-social span {
	font-size: 0.9rem;
	color: var(--color-text-muted);
}

.social-icons {
	display: flex;
	gap: 0.6rem;
	margin-top: 0.75rem;
}

.social-icons a {
	width: 36px;
	height: 36px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.03);
	color: var(--color-text);
	transition: all 0.25s ease;
}

.social-icons a i {
	font-size: 0.9rem;
}

/* Hover sur les icônes */
.social-icons a:hover {
	background: var(--color-primary);
	color: var(--color-dark);
	transform: translateY(-2px);
	border-color: transparent;
}

/* Bas de footer */
.footer-bottom {
	border-top: 1px solid var(--color-border);
	margin-top: 2rem;
	padding-top: 1rem;
	text-align: center;
	font-size: 0.8rem;
	color: var(--color-text-muted);
}

/* Responsive footer */
@media (max-width: 768px) {
	.footer .grid {
		grid-template-columns: 1fr 1fr;
		row-gap: 2rem;
	}

	.footer-about {
		max-width: none;
	}

	.footer-bottom {
		margin-top: 1.5rem;
	}
}

@media (max-width: 480px) {
	.footer .grid {
		grid-template-columns: 1fr;
	}

	.social-icons {
		justify-content: flex-start;
	}
}

/* ------------------- */
/* HEADER ACTIONS      */
/* ------------------- */
.header-actions {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	position: relative;
	z-index: 1001;
}

.lang-switcher {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(255, 255, 255, 0.05);
	padding: 0.4rem 0.75rem;
	border-radius: 50px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: all 0.3s ease;
}

.lang-switcher:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(240, 166, 30, 0.3);
}

.lang-switcher span {
	color: var(--color-text-muted);
	font-size: 0.85rem;
}

.lang-btn {
	background: none;
	border: none;
	color: var(--color-text-muted);
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	transition: all 0.3s ease;
	font-family: var(--font-family-base);
}

.lang-btn.active,
.lang-btn:hover {
	color: var(--color-primary);
	transform: scale(1.1);
}

/* ------------------- */
/* MOBILE NAV TOGGLE   */
/* ------------------- */
.mobile-nav-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(240, 166, 30, 0.1);
	border: 1px solid rgba(240, 166, 30, 0.3);
	border-radius: 8px;
	color: white;
	cursor: pointer;
	width: 44px;
	height: 44px;
	transition: all 0.3s ease;
	position: relative;
}

.mobile-nav-toggle:hover {
	background: rgba(240, 166, 30, 0.2);
	border-color: var(--color-primary);
	transform: scale(1.05);
}

.mobile-nav-toggle svg {
	width: 24px;
	height: 24px;
	transition: all 0.3s ease;
}

.mobile-nav-toggle .icon-close {
	display: none;
	position: absolute;
}

.mobile-nav-toggle .icon-menu {
	display: block;
}

body.mobile-nav-open .mobile-nav-toggle {
	/* background: rgba(169, 30, 34, 0.2); */
	/* border-color: var(--color-primary-2); */
	z-index: 9999;
}

body.mobile-nav-open .mobile-nav-toggle .icon-menu {
	display: none;
}

body.mobile-nav-open .mobile-nav-toggle .icon-close {
	display: block;
}

/* ------------------- */
/* MOBILE LAYOUT       */
/* ------------------- */
@media (max-width: 991px) {
	/* Fixed: Use flex instead of grid for better control */
	.header-container {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 1rem;
	}
	#page-home .header.scrolled {
		background: rgba(0, 0, 0, 0.95);
		border-bottom: 1px solid var(--color-border);
	}

	/* Menu button on the left - always visible */
	.mobile-nav-toggle {
		order: 1;
		flex-shrink: 0;
	}

	/* Logo in the center - takes remaining space */
	.logo {
		order: 2;
		flex: 1;
		display: flex;
		justify-content: center;
	}

	.logo img.logo-img {
		max-height: 50px;
	}

	/* Language switcher on the right */
	.header-actions {
		order: 3;
		flex-shrink: 0;
		gap: 0;
	}

	/* Remove duplicate toggle button from header-actions */
	.header-actions .mobile-nav-toggle {
		display: none;
	}

	/* Keep only language switcher in header-actions on mobile */
	.lang-switcher {
		display: flex;
	}

	.section-padding {
		padding: 2rem 0;
	}
}

/* ------------------- */
/* DESKTOP NAVIGATION  */
/* ------------------- */
@media (min-width: 992px) {
	.header {
		padding: 1rem 0;
	}

	.header-container {
		display: flex;
		justify-content: space-between;
	}

	.logo {
		order: 0;
	}

	.logo img.logo-img {
		max-height: 60px;
	}

	.main-nav {
		position: static;
		display: flex;
		flex-direction: row;
		height: auto;
		width: auto;
		background: transparent;
		padding: 0;
		gap: 0.5rem;
		opacity: 1;
		visibility: visible;
		order: 0;
	}

	.nav-link {
		font-size: 0.95rem;
		padding: 0.5rem 1rem;
		text-transform: none;
		letter-spacing: 0.02em;
	}

	.nav-link::after {
		bottom: 0;
		height: 3px;
	}

	.mobile-nav-toggle {
		display: none;
	}

	.header-actions {
		order: 0;
	}

	.lang-switcher {
		padding: 0.5rem 1rem;
	}
}

/* ------------------- */
/* LARGE DESKTOP       */
/* ------------------- */
@media (min-width: 1200px) {
	.main-nav {
		gap: 1rem;
	}

	.nav-link {
		font-size: 1rem;
		padding: 0.5rem 1.25rem;
	}

	.logo img.logo-img {
		max-height: 65px;
	}
}

/* ------------------- */
/* MOBILE SMALL        */
/* ------------------- */
@media (max-width: 480px) {
	.header {
		padding: 0.5rem 0;
	}

	.header-container {
		padding: 0 1rem;
	}

	.logo img.logo-img {
		max-height: 42px;
	}

	.nav-link {
		font-size: 1.25rem;
		padding: 0.6rem 1rem;
	}

	.lang-switcher {
		padding: 0.3rem 0.5rem;
		gap: 0.3rem;
	}

	.lang-btn {
		font-size: 0.75rem;
	}

	.mobile-nav-toggle {
		width: 40px;
		height: 40px;
	}

	.mobile-nav-toggle svg {
		width: 22px;
		height: 22px;
	}
}

/* ------------------- */
/* ANIMATIONS          */
/* ------------------- */
@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

body.mobile-nav-open .nav-link {
	animation: slideInDown 0.4s ease forwards;
}

body.mobile-nav-open .nav-link:nth-child(1) {
	animation-delay: 0.05s;
}
body.mobile-nav-open .nav-link:nth-child(2) {
	animation-delay: 0.1s;
}
body.mobile-nav-open .nav-link:nth-child(3) {
	animation-delay: 0.15s;
}
body.mobile-nav-open .nav-link:nth-child(4) {
	animation-delay: 0.2s;
}
body.mobile-nav-open .nav-link:nth-child(5) {
	animation-delay: 0.25s;
}
body.mobile-nav-open .nav-link:nth-child(6) {
	animation-delay: 0.3s;
}
body.mobile-nav-open .nav-link:nth-child(7) {
	animation-delay: 0.35s;
}
/* ------------------- */
/* LOADER              */
/* ------------------- */
.loader-wrapper {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--color-dark);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-wrapper.hidden {
	opacity: 0;
	visibility: hidden;
}

.loader {
	width: 48px;
	height: 48px;
	display: inline-block;
	position: relative;
}

.loader::after,
.loader::before {
	content: "";
	box-sizing: border-box;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 2px solid var(--color-white);
	position: absolute;
	left: 0;
	top: 0;
	animation: animloader 2s linear infinite;
}

.loader::after {
	animation-delay: 1s;
}

@keyframes animloader {
	0% {
		transform: scale(0);
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 0;
	}
}

.loader-text {
	color: var(--color-primary-2);
	font-family: var(--font-family-base);
	font-size: 1.1rem;
	font-weight: 500;
	letter-spacing: 1px;
	margin-top: 30px;
}
