/* ========================================
   STYLES SPÉCIFIQUES - PAGE D'ACCUEIL
   ======================================== */

/* Règles globales pour les images responsive */
img {
	max-width: 100%;
	height: auto;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

.img-responsive {
	max-width: 100%;
	height: auto;
	display: block;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

/* Corrections spécifiques pour Safari iOS */
@supports (-webkit-touch-callout: none) {
	img {
		max-width: 100% !important;
		width: auto !important;
		height: auto !important;
	}
	
	.logo-accueil {
		max-width: 100% !important;
		width: auto !important;
		height: auto !important;
		max-height: 120px !important;
	}
	
	.popular-card-img {
		max-width: 100% !important;
		width: 100% !important;
		height: 230px !important;
		max-height: 230px !important;
		object-fit: cover !important;
	}
	
	.small-card-img {
		max-width: 100% !important;
		width: 100% !important;
		height: 80px !important;
		max-height: 80px !important;
		object-fit: cover !important;
		object-position: center !important;
		display: block !important;
	}
	
	/* Corrections pour la barre de recherche sur Safari */
	.search-container .input-group {
		display: flex !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	
	.search-input {
		flex: 1 !important;
		max-width: calc(100% - 60px) !important;
	}
	
	.input-group-append {
		flex-shrink: 0 !important;
		width: auto !important;
	}
	
	.search-btn {
		width: 50px !important;
		flex-shrink: 0 !important;
	}
}

/* Styles pour les images responsive */
@media (max-width: 575.98px) {
    .img-mobile {
        display: block;
    }
    
    .img-desktop {
        display: none;
    }
}

/* Styles spécifiques à la page d'accueil */
.container{
	z-index: 5;
}
/* Search Container */
.search-container {
	position: relative;
	margin: 1.5rem 0;
}

.search-container .input-group {
	border-radius: 25px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-input {
	border: none;
	padding: 12px 20px;
	font-size: 0.95rem;
	border-radius: 25px 0 0 25px;
}

.search-input:focus {
	box-shadow: none;
	border-color: transparent;
}

.search-btn {
	border: none !important;
	background: #242424 !important;
	color: white !important;
	cursor: pointer;
	border-radius: 0 25px 25px 0 !important;
	padding: 12px 15px;
}

.search-btn:hover {
	background: #1a1a1a !important;
	color: white !important;
	border-color: #1a1a1a !important;
}

.input-group-append {
	border-radius: 0 25px 25px 0;
}

/* Style spécifique pour le bouton de recherche */
.btn-search-custom,
.btn-search-custom:hover,
.btn-search-custom:focus,
.btn-search-custom:active {
	background-color: #242424 !important;
	border-color: #242424 !important;
	color: white !important;
	box-shadow: none !important;
	outline: none !important;
}

.btn-search-custom:hover {
	background-color: #1a1a1a !important;
	border-color: #1a1a1a !important;
}

/* Corrections globales pour les petites cartes */
.small-card {
	width: 140px !important;
	max-width: 140px !important;
	height: 180px !important;
	max-height: 180px !important;
	overflow: hidden !important;
}

.small-card-img {
	width: 100% !important;
	height: 80px !important;
	max-height: 80px !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	display: block !important;
}

/* Suggestions */
#liste-suggestions-accueil {
	max-height: 300px;
	overflow-y: auto;
	box-shadow: 0 4px 15px rgba(0,0,0,0.15);
	border-radius: 15px;
	border: none;
	z-index: 10000 !important;
}

#liste-suggestions-accueil .list-group-item {
	border: none;
	border-bottom: 1px solid #f0f0f0;
	cursor: pointer;
	padding: 12px 15px;
}

#liste-suggestions-accueil .list-group-item:hover {
	background-color: #f8f9fa;
}

#liste-suggestions-accueil .list-group-item:first-child {
	border-radius: 15px 15px 0 0;
}

#liste-suggestions-accueil .list-group-item:last-child {
	border-radius: 0 0 15px 15px;
	border-bottom: none;
}

.suggestion-type {
	font-size: 0.7rem;
	padding: 0.2rem 0.5rem;
	border-radius: 10px;
	margin-left: 0.5rem;
}

.suggestion-parc {
	background-color: #e3f2fd;
	color: #1976d2;
}

.suggestion-restaurant {
	background-color: #fff3e0;
	color: #f57c00;
}

.suggestion-meta {
	font-size: 0.75rem;
	color: #6c757d;
	margin-top: 2px;
}

/* Carousel */
.carousel-container {
	position: relative;
}

.restaurant-carousel {
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-behavior: smooth;
	transition: all 0.3s ease;
}

.restaurant-carousel::-webkit-scrollbar {
	display: none;
}

/* Small Cards */
.small-card {
	background: white;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	border: none;
	transition: transform 0.2s ease;
	width: 140px;
	height: 180px;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
}

.small-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.small-card-img {
	width: 100% !important;
	height: 80px !important;
	max-height: 80px !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	border-radius: 12px 12px 0 0;
	display: block !important;
}

.small-card-body {
	padding: 0.75rem;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.small-card-title {
	font-size: 0.75rem;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 0.25rem;
	line-height: 1.2;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.small-card-subtitle {
	font-size: 0.65rem;
	color: #6c757d;
	margin-bottom: 0.25rem;
	line-height: 1.2;
}

.small-card-content {
	flex-grow: 1;
}

.small-card-country {
	font-size: 0.6rem;
	color: #6c757d;
	margin-bottom: 0.25rem;
	line-height: 1.2;
}

.small-card-avis {
	font-size: 0.6rem;
	color: #007bff;
	margin-bottom: 0;
	line-height: 1.2;
	font-weight: 500;
}

.small-badge {
	font-size: 0.6rem;
	padding: 0.2rem 0.4rem;
}

/* Popular Cards */
.popular-carousel {
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-behavior: smooth;
	transition: all 0.3s ease;
}

.popular-carousel::-webkit-scrollbar {
	display: none;
}

.popular-card {
	background: white;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 2px 15px rgba(0,0,0,0.08);
	border: none;
	transition: transform 0.2s ease;
	height: 230px;
	position: relative;
}

.popular-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.logo-accueil {
	max-height: 120px;
	height: auto;
	margin-bottom: -1rem;
}

/* Popular Cards - Images et overlay */
.popular-card-img {
	height: 100%;
	object-fit: cover;
	width: 100%;
	max-width: 100%;
	display: block;
}

.popular-card-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(
		to bottom,
		transparent 0%,
		rgba(0,0,0,0.2) 20%,
		rgba(0,0,0,0.6) 60%,
		rgba(0,0,0,0.85) 100%
	);
	color: white;
	padding: 1.5rem;
}

/* Section titles et navigation */
.section-title {
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.section-arrow {
	background-color: white;
	color: #000;
	font-size: 1rem;
	border-radius: 1rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 40px;
}

.section-arrow:hover {
	background-color: #f8f9fa;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Boutons de navigation des carousels */
.carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.7);
	border: none;
	border-radius: 50%;
	width: 45px;
	height: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 1.3rem;
	z-index: 100;
	transition: all 0.3s ease;
	cursor: pointer;
	opacity: 0.7;
}

.carousel-nav:hover {
	background: rgba(0, 0, 0, 0.9);
	opacity: 1;
	transform: translateY(-50%) scale(1.1);
}

.carousel-nav-left {
	left: 10px;
}

.carousel-nav-right {
	right: 10px;
}

@media (max-width: 768px) {
	.header-section {
		padding: 1rem 0 0.5rem 0;
	}
	
	/* Safe-area seulement en mode non-PWA */
	body:not(.pwa-mode) .header-section {
		padding-top: calc(env(safe-area-inset-top));
	}
	
	.logo-accueil {
		max-height: 110px;
	}
	
	.small-card {
		width: 120px;
		height: 160px;
	}
	
	.small-card-img {
		height: 60px;
	}
	
	.small-card-title {
		font-size: 0.7rem;
	}
	
	.small-card-subtitle {
		font-size: 0.6rem;
	}
	
	.small-card-country {
		font-size: 0.55rem;
	}
	
	.small-card-avis {
		font-size: 0.55rem;
	}
	
	/* Correction pour les cartes populaires sur mobile */
	.popular-card {
		height: 200px;
		max-height: 200px;
	}
	
	.popular-card-img {
		height: 200px;
		max-height: 200px;
		object-fit: cover;
		object-position: center;
	}
	
	/* Réduction de la largeur des cartes populaires sur mobile */
	.popular-carousel .flex-shrink-0 {
		width: 250px !important;
		max-width: 250px;
	}
}

/* Media queries spécifiques pour iPhone et petits écrans */
@media (max-width: 480px) {
	.popular-card {
		height: 180px;
		max-height: 180px;
	}
	
	.popular-card-img {
		height: 180px;
		max-height: 180px;
		object-fit: cover;
		object-position: center;
		width: 100%;
	}
	
	.popular-carousel .flex-shrink-0 {
		width: 220px !important;
		max-width: 220px;
	}
	
	.small-card {
		width: 110px;
		height: 150px;
	}
	
	.small-card-img {
		height: 50px;
		max-height: 50px;
	}
	
	.logo-accueil {
		max-height: 100px;
		width: auto;
	}
	
	/* Ajustements pour la barre de recherche */
	.search-input {
		font-size: 0.9rem;
		padding: 10px 15px;
	}
	
	.search-btn {
		padding: 10px 12px;
	}
}

/* Media queries pour très petits écrans (iPhone SE, etc.) */
@media (max-width: 375px) {
	.popular-card {
		height: 160px;
		max-height: 160px;
	}
	
	.popular-card-img {
		height: 160px;
		max-height: 160px;
	}
	
	.popular-carousel .flex-shrink-0 {
		width: 200px !important;
		max-width: 200px;
	}
	
	.small-card {
		width: 100px;
		height: 140px;
	}
	
	.small-card-img {
		height: 45px;
		max-height: 45px;
	}
}

/* Media queries spécifiques pour Safari Mobile */
@media screen and (-webkit-min-device-pixel-ratio: 1) and (max-width: 768px) {
	/* Safari iOS - Corrections forcées */
	.logo-accueil {
		max-height: 110px !important;
		width: auto !important;
		max-width: 90% !important;
	}
	
	.popular-card {
		height: 200px !important;
		max-height: 200px !important;
		overflow: hidden !important;
	}
	
	.popular-card-img {
		height: 200px !important;
		max-height: 200px !important;
		width: 100% !important;
		max-width: 100% !important;
		object-fit: cover !important;
		object-position: center !important;
	}
	
	.small-card {
		width: 120px !important;
		max-width: 120px !important;
		height: 160px !important;
		max-height: 160px !important;
	}
	
	.small-card-img {
		height: 60px !important;
		max-height: 60px !important;
		width: 100% !important;
		max-width: 100% !important;
		object-fit: cover !important;
		object-position: center !important;
	}
	
	/* Corrections pour la barre de recherche */
	.search-container .input-group {
		max-width: 100% !important;
		overflow: hidden !important;
	}
	
	.search-input {
		border-radius: 25px 0 0 25px !important;
		max-width: calc(100% - 60px) !important;
	}
	
	.search-btn {
		border-radius: 0 25px 25px 0 !important;
		width: 60px !important;
		min-width: 60px !important;
	}
}

@media screen and (-webkit-min-device-pixel-ratio: 1) and (max-width: 480px) {
	.logo-accueil {
		max-height: 100px !important;
		width: auto !important;
		max-width: 85% !important;
	}
	
	.popular-card {
		height: 180px !important;
		max-height: 180px !important;
		overflow: hidden !important;
	}
	
	.popular-card-img {
		height: 180px !important;
		max-height: 180px !important;
		width: 100% !important;
		max-width: 100% !important;
		object-fit: cover !important;
		object-position: center !important;
	}
	
	.small-card {
		width: 110px !important;
		max-width: 110px !important;
		height: 150px !important;
		max-height: 150px !important;
		overflow: hidden !important;
	}
	
	.small-card-img {
		height: 50px !important;
		max-height: 50px !important;
		width: 100% !important;
		max-width: 100% !important;
		object-fit: cover !important;
		object-position: center !important;
	}
	
	/* Barre de recherche sur petits écrans */
	.search-container .input-group {
		border-radius: 20px !important;
	}
	
	.search-input {
		border-radius: 20px 0 0 20px !important;
		padding: 10px 15px !important;
	}
	
	.search-btn {
		border-radius: 0 20px 20px 0 !important;
		width: 50px !important;
		padding: 10px 12px !important;
	}
}

@media screen and (-webkit-min-device-pixel-ratio: 1) and (max-width: 375px) {
	.logo-accueil {
		max-height: 90px !important;
		width: auto !important;
		max-width: 80% !important;
	}
	
	.popular-card {
		height: 160px !important;
		max-height: 160px !important;
		overflow: hidden !important;
	}
	
	.popular-card-img {
		height: 160px !important;
		max-height: 160px !important;
		width: 100% !important;
		max-width: 100% !important;
		object-fit: cover !important;
		object-position: center !important;
	}
	
	.small-card {
		width: 100px !important;
		max-width: 100px !important;
		height: 140px !important;
		max-height: 140px !important;
		overflow: hidden !important;
	}
	
	.small-card-img {
		height: 45px !important;
		max-height: 45px !important;
		width: 100% !important;
		max-width: 100% !important;
		object-fit: cover !important;
		object-position: center !important;
	}
}

.header-section {
	margin-bottom: 0 !important;	
	background: url('../img/fond-accueil.webp') center center / cover no-repeat;
	padding: 1.5rem 0 1rem 0;
}

/* Carousel des avis */
.avis-carousel {
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-behavior: smooth;
	transition: all 0.3s ease;
	display: grid;
	grid-template-rows: repeat(2, 1fr);
	grid-auto-flow: column;
	gap: 1rem;
	padding: 0.5rem;
}

.avis-carousel::-webkit-scrollbar {
	display: none;
}

.avis-card {
	position: relative;
	width: 400px;
	height: 200px;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avis-card-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	filter: blur(3px);
	transform: scale(1.1);
	transition: filter 0.3s ease;
}

.avis-card:hover .avis-card-bg {
	filter: blur(2px);
}

.avis-card-content {
	position: relative;
	z-index: 1;
	height: 100%;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.4);
	color: white;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.avis-card-title {
	font-size: 0.9rem;
	margin-bottom: 0.25rem;
	color: white;
}

.avis-text {
	font-size: 0.8rem;
	line-height: 1.3;
	margin-top: 0.5rem;
}

.avis-card small {
	font-size: 0.7rem;
	color: rgba(255, 255, 255, 0.9);
}

.avis-card .text-muted {
	color: rgba(255, 255, 255, 0.7) !important;
}

@media (max-width: 768px) {
	.avis-card {
		width: 350px;
		height: 180px;
	}
}

@media (max-width: 480px) {
	.avis-carousel {
		grid-template-rows: 1fr;
	}
	
	.avis-card {
		width: 300px;
		height: 160px;
	}
}
