/* ========================================
   FICHIER CSS PRINCIPAL - GASTRONOLAND
   Styles communs à toutes les pages
   ======================================== */

/* ========================================
   VARIABLES ET COULEURS
   ======================================== */
:root {
    --primary-color: #242424;
    --primary-dark: #030202;
    --primary-light: #949292;
    --secondary-color: #5F5F5F;
    --accent-color: #f5d2db;
    --background-color: #f1f1f1;
    --text-dark: #1d1e1e;
    --text-grey: #434645;
    --white: #ffffff;
    --grey: #f8f9fa;
    --black: #000000;
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.3);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --light-grey: #f8f9fa;
}

/* ========================================
   STYLES DE BASE
   ======================================== */
body:not(.index-page) {
    font-family: Poppins, sans-serif;
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    background-color: var(--background-color);
}
html, body {
	padding: 0;
	margin: 0;
	height: 100%;
    background-color: var(--background-color);
}

body {
	padding-left: env(safe-area-inset-left);
	padding-right: env(safe-area-inset-right);
	background-color: #f8f9fa;
	font-family: 'Poppins', sans-serif;
}

/* Gestion spécifique de l'encoche iOS pour PWA */
/* Le header doit être collé en haut pour que l'image passe sous l'encoche */
body.pwa-mode .header-section {
	margin-top: 0;
	padding-top: 0;
}

/* Le contenu du header doit respecter l'encoche */
body.pwa-mode .header-section .container {
	padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
}

/* Pour les pages sans header-section, appliquer safe-area au body directement */
body.pwa-mode:not(:has(.header-section)) {
	padding-top: calc(1rem + env(safe-area-inset-top, 0px));
}

/* Fallback pour navigateurs qui ne supportent pas :has() */
@supports not selector(:has(*)) {
	body.pwa-mode .container:first-child,
	body.pwa-mode .container-fluid:first-child,
	body.pwa-mode main:first-child {
		margin-top: calc(1rem + env(safe-area-inset-top, 0px));
	}
	
	/* Annuler pour les pages avec header-section */
	body.pwa-mode .header-section ~ .container,
	body.pwa-mode .header-section ~ .container-fluid,
	body.pwa-mode .header-section ~ main {
		margin-top: 0;
	}
}

/* HEADER SECTION */
.header-section {
	color: white;
	padding: 3rem 0;
	margin-bottom: 1rem;
	position: relative;
}
.header-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
}
.header-section .container {
	position: relative;
	z-index: 20;
}
/* Scroll to top button */
#scrollTopBtn.btn.position-fixed.scrolltop {
	bottom: 8rem;
	right: 2rem;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #333;
	font-size: 1.2rem;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1050;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	opacity: 1;
	visibility: visible;
}

#scrollTopBtn.btn.position-fixed.scrolltop.show {
	display: flex;
	animation: slideIn 0.3s ease-out;
}

#scrollTopBtn.btn.position-fixed.scrolltop:hover {
	background: rgba(255, 255, 255, 0.3);
	backdrop-filter: blur(15px);
	-webkit-backdrop-filter: blur(15px);
	transform: translateY(-3px) scale(1.05);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
	color: #000;
	border-color: rgba(255, 255, 255, 0.4);
}

#scrollTopBtn.btn.position-fixed.scrolltop:focus {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
	color: #000;
	outline: none;
}

#scrollTopBtn.btn.position-fixed.scrolltop:active {
	transform: translateY(-1px) scale(0.98);
	transition: all 0.1s ease;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.8);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (min-width: 992px) {
	#scrollTopBtn.btn.position-fixed.scrolltop {
		bottom: 2rem;
	}
}