/* Root variables for easy theming */
:root {
    --primary-color: #5A2EA6; /* Primary dark purple used in the app */
    --secondary-color: #ffffff; /* Base white */
    --light-purple: #f6f3fd; /* Very light purple for panels */
    --accent-green: #78C045; /* Bright green from the logo */
    --accent-blue: #2CB7DD; /* Cyan blue from the logo */
    --accent-yellow: #F5C10E; /* Yellow from the logo */
    --accent-pink: #E41D72; /* Pink from the logo */
    --text-color: #2E1A47; /* Darker purple for text on light backgrounds */
	--shadow-1: 0 10px 30px rgba(0, 0, 0, 0.18);
	--shadow-2: 0 6px 16px rgba(0, 0, 0, 0.1);
	--radius-lg: 16px;
	--radius-md: 14px;
}

/* Global reset and typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    color: var(--secondary-color);
    background-color: var(--primary-color);
    line-height: 1.6;
}

h1, h2, h3 {
    font-weight: bold;
    line-height: 1.3;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Site header and navigation styling */
.site-header {
    /* Barre de navigation de style clair inspirée du site d'exemple */
    background-color: #ffffff !important;
    color: var(--primary-color);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	position: sticky;
}
.logo-wrapper {
    display: flex;
    align-items: center;
}
.logo-small {
    height: 60px;
    width: auto;
}
.nav-toggle {
	display: none;
	position: relative;
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 8px;
	margin-left: auto;
	border-radius: 10px;
	transition: background-color 0.2s ease;
}
.nav-toggle:hover,
.nav-toggle.open {
	background: rgba(90, 46, 166, 0.08);
}
.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--primary-color);
	border-radius: 999px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle span + span {
	margin-top: 5px;
}
.nav-toggle.open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
	opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}
.navbar ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}
.navbar li {
    margin-left: 20px;
}
/* Navigation links stylées pour la barre claire */
.navbar a {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 0;
    position: relative;
}
.navbar a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

@media (max-width: 860px) {
	.site-header {
		position: sticky;
		padding: 10px 16px;
	}
	.nav-toggle {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.navbar {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #ffffff;
		box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		visibility: hidden;
		transition: max-height 0.25s ease, opacity 0.25s ease;
	}
	.navbar.open {
		max-height: 500px;
		opacity: 1;
		visibility: visible;
	}
	.navbar ul {
		flex-direction: column;
		align-items: flex-start;
		padding: 16px 20px;
		gap: 6px;
	}
	.navbar li {
		margin: 0;
		width: 100%;
	}
	.navbar a {
		display: block;
		width: 100%;
		padding: 10px 0;
		border-bottom: 1px solid rgba(90, 46, 166, 0.08);
	}
	.navbar li:last-child a {
		border-bottom: none;
	}
}

/* Hero section styling */
#hero {
    background: linear-gradient(180deg, var(--primary-color) 0%, #331056 50%, #25093f 100%);
    text-align: center;
    padding: 60px 20px 80px;
    position: relative;
}
#hero .logo-main {
    /* Réduit la taille du logo principal pour harmoniser avec la barre de navigation */
    max-width: 240px;
    width: 60%;
    height: auto;
    margin-bottom: 30px;
}
#hero h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}
#hero .tagline {
    font-size: 1.1rem;
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
/* Style pour les liens de téléchargement des stores */
.store-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}
.store-links img {
    height: 50px;
    width: auto;
    display: block;
}
/* Police ludique pour le slogan */
#hero h1, #hero .tagline {
    font-family: 'Fredoka One', cursive;
}

/* Features section styling */
#features {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 60px 20px;
}
#features h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}
.feature-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.feature {
    flex: 1 1 220px;
    max-width: 280px;
    background-color: var(--light-purple);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}
.feature:hover {
    transform: translateY(-5px);
}
.feature .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Ajustement de la taille des images d'icônes dans les fonctionnalités */
.feature .icon img {
    width: 64px;
    height: 64px;
}
.feature h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}
.feature p {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* Presentation section styling */
#presentation {
    background-color: #f9f9ff;
    color: var(--text-color);
    padding: 60px 20px;
}
#presentation h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}
#presentation p {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 1rem;
    text-align: center;
}
.reasons-list {
    list-style-type: disc;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 20px;
}
.reasons-list li {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Banners section styling */
#banners {
    background-color: #f9f9ff;
    color: var(--text-color);
    padding: 60px 20px;
}
#banners h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}
.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}
.banner-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.banner-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}
.banner-item:hover {
    transform: translateY(-5px);
}
.banner-item:hover img {
    transform: scale(1.05);
}
.banner-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(90, 46, 166, 0.8);
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Screenshots section styling */
#screenshots {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 60px 20px;
}
#screenshots h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}
.screenshot-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.screenshot-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* Illustrations section styling */
#illustrations {
    background-color: #f9f9ff;
    color: var(--text-color);
    padding: 60px 20px;
}
#illustrations h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}
.illustration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}
.illustration-grid img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.illustration-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}
/* Footer styling */
footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 30px 20px;
}
footer nav {
    margin-top: 10px;
}
footer nav a {
    color: var(--secondary-color);
    margin: 0 12px;
    font-size: 0.9rem;
}
footer nav a:hover {
    text-decoration: underline;
}

/* Legal pages styling */
.legal {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    background-color: var(--secondary-color);
    color: var(--text-color);
}
.legal h1 {
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}
.legal-content {
    font-size: 0.95rem;
    line-height: 1.5;
}
.legal-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}
.legal a {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent-blue);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #hero h1 {
        font-size: 1.6rem;
    }
    #features h2, #presentation h2, #screenshots h2 {
        font-size: 1.5rem;
    }
	#hero {
		padding: 48px 16px 60px;
	}
	#hero .logo-main {
		max-width: 180px;
		width: 70%;
	}
	#hero .tagline {
		font-size: 1rem;
	}
	.store-links {
		flex-direction: column;
		gap: 12px;
	}
	.store-links img {
		height: 48px;
		width: auto;
	}
	#features,
	#banners,
	#presentation,
	#illustrations,
	#screenshots {
		padding: 40px 16px;
	}
	.banner-grid,
	.screenshot-grid,
	.illustration-grid {
		grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
		gap: 16px;
	}
    .feature-grid {
        flex-direction: column;
        align-items: center;
    }
    .feature {
        max-width: 90%;
        margin-bottom: 20px;
    }
	.reasons-list {
		padding-left: 16px;
	}
	footer {
		padding: 24px 16px;
	}
}

/* -------- Store Popup (moved from inline style) -------- */
.tt-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 14, 31, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: none; /* shown via JS on load */
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 16px;
	overflow-x: hidden;
}
.tt-modal {
	position: relative;
	background: linear-gradient(180deg, #ffffff, #fafafe);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-1);
	max-width: min(720px, calc(100vw - 32px));
	width: 100%;
	overflow: hidden;
	animation: tt-pop 200ms ease-out;
	border: 1px solid rgba(90, 46, 166, 0.08);
	max-height: calc(100dvh - 48px);
	overflow: auto;
	margin: 0 auto;
	box-sizing: border-box;
}
@keyframes tt-pop {
	from { transform: translateY(10px); opacity: 0.9; }
	to { transform: translateY(0); opacity: 1; }
}
.tt-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid #f1eff8;
	background:
		radial-gradient(1200px 200px at -10% -40%, rgba(122, 77, 207, 0.08), transparent 50%),
		linear-gradient(180deg, #fff, #f9f7ff);
}
.tt-modal-head-left {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.tt-app-avatar {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	border: 1px solid #ece7fb;
	box-shadow: 0 4px 10px rgba(90,46,166,0.15);
	object-fit: cover;
	background: #fff;
}
.tt-headings {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.tt-modal-title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	color: #20113a;
	letter-spacing: 0.2px;
}
.tt-modal-sub {
	margin: 0;
	font-size: 13px;
	color: #6a5a8e;
}
.tt-modal-close {
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 6px;
	border-radius: 10px;
	line-height: 0;
	transition: background-color 160ms ease, transform 160ms ease;
}
.tt-modal-close:hover { background: #f3effc; transform: rotate(0.5deg); }
.tt-modal-body {
	padding: 20px;
}
.tt-modal-note {
	font-size: 0.95rem;
	color: #493a6f;
	background: #f7f5ff;
	border: 1px solid #eee9fb;
	border-radius: 12px;
	padding: 10px 12px;
	margin-bottom: 14px;
}
.tt-store-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 560px) {
	.tt-store-grid { grid-template-columns: 1fr; gap: 12px; }
}
.tt-store-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	border: 1px solid #eee9fb;
	border-radius: var(--radius-md);
	transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
	text-decoration: none;
	background: #ffffff;
	box-shadow: var(--shadow-2);
	position: relative;
}
.tt-store-card:hover,
.tt-store-card:focus {
	text-decoration: none;
}
.tt-store-card:hover .tt-store-title,
.tt-store-card:hover .tt-store-sub,
.tt-store-card:hover .tt-badge,
.tt-store-card:focus .tt-store-title,
.tt-store-card:focus .tt-store-sub,
.tt-store-card:focus .tt-badge {
	text-decoration: none;
}
.tt-store-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(0,0,0,0.12);
	border-color: #e3dcff;
	background: linear-gradient(180deg, #fff, #fbfaff);
}
.tt-icon {
	width: 52px;
	height: 52px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	background: #f6f7fb;
	border: 1px solid #eef0f6;
}
.tt-icon img {
	max-width: 32px;
	width: 100%;
	height: auto;
	display: block;
}
.tt-store-card#ttAndroidCard .tt-icon {
	background: #eefcf4;
	border-color: #d9f6e6;
}
.tt-store-card#ttIosCard .tt-icon {
	background: #f3f4f7;
	border-color: #e8e9ee;
}
.tt-store-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.tt-store-title {
	font-weight: 800;
	color: #1a1030;
	white-space: normal;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}
.tt-store-sub {
	font-size: 13px;
	color: #66608a;
}
.tt-badge {
	display: inline-block;
	margin-left: 8px;
	font-size: 11px;
	font-weight: 800;
	color: #1b5e20;
	background: #e1f7e9;
	border: 1px solid #b9efcf;
	border-radius: 999px;
	padding: 2px 8px;
	vertical-align: middle;
}
.tt-disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

/* -------- Mobile responsive refinements -------- */
@media (max-width: 560px) {
	.tt-modal-overlay {
		padding: 12px;
		padding-left: calc(12px + env(safe-area-inset-left, 0px));
		padding-right: calc(12px + env(safe-area-inset-right, 0px));
		padding-top: calc(12px + env(safe-area-inset-top, 0px));
		padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	}
	.tt-modal {
		border-radius: 12px;
		max-height: calc(100dvh - 24px);
		max-width: calc(100dvw - 24px);
		width: 100%;
		margin-left: 0px;
		box-sizing: border-box;
	}
	.tt-modal-header {
		padding: 12px 14px;
		gap: 10px;
	}
	.tt-app-avatar {
		width: 36px;
		height: 36px;
		border-radius: 10px;
	}
	.tt-modal-title {
		font-size: 16px;
	}
	.tt-modal-sub {
		font-size: 12px;
	}
	.tt-modal-close {
		padding: 8px;
	}
	.tt-modal-body {
		padding: 14px;
	}
	.tt-modal-note {
		font-size: 0.9rem;
		padding: 10px;
	}
	.tt-icon {
		width: 44px;
		height: 44px;
		border-radius: 10px;
	}
	.tt-store-card {
		gap: 12px;
		padding: 14px;
	}
	.tt-store-title {
		font-size: 0.98rem;
	}
	.tt-store-sub {
		font-size: 12px;
	}
	.tt-badge {
		font-size: 10px;
		padding: 2px 6px;
	}
}