/**
 * Pages Avis - Nature & Loisirs Piscines
 * Liste (all-avis) et détail (avis)
 */

 /* Fond bleu similaire aux autres pages */
body,
.avis-page {
    background: #174274;
}
.avis-page {
    min-height: 100vh;
}
body {
    /* Optionnel : retire la marge si non voulu */
    margin: 0;
}

/* Page liste avis */
.avis-page .wrapper.boxstyle { margin-top: 0 !important; margin-bottom: 50px; }
.avis-page .header-image .wrapper { padding-bottom: 25px !important; }

.avis-page .avis-zone {
	background: #f5f5f5;
	min-height: 320px;
	padding: 45px 40px 50px;
	margin-top: 0;
	border-radius: 4px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Stats (note moyenne, nombre) */
.avis-stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 40px;
	margin-bottom: 40px;
	padding: 30px 25px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.avis-stats-item { text-align: center; }
.avis-stats-value { font-size: 2.2em; font-weight: 700; color: #174274; margin-bottom: 5px; }
.avis-stats-label { font-size: 0.95em; color: #666; }
.avis-stars { color: #e67e22; font-size: 1.4em; letter-spacing: 2px; margin-top: 5px; }

/* Grille avis (comme actualités) */
.avis-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin: 0 0 35px;
	padding: 0;
	list-style: none;
}

@media (max-width: 900px) {
	.avis-list { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

@media (max-width: 520px) {
	.avis-list { grid-template-columns: 1fr; gap: 20px; }
}

.avis-list .avis-item {
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #e0e0e0;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
	display: flex;
	flex-direction: column;
}

.avis-list .avis-item:hover {
	box-shadow: 0 6px 18px rgba(23, 66, 116, 0.18);
	border-color: #174274;
}

.avis-list .avis-item a {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.avis-list .avis-image {
	width: 100%;
	height: 0;
	padding-bottom: 60%;
	position: relative;
	overflow: hidden;
	background: #e8e8e8;
}

.avis-list .avis-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.avis-list .avis-content { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.avis-list .avis-author { font-size: 1.1em; font-weight: 700; color: #174274; margin: 0 0 8px; }
.avis-list .avis-stars-inline { color: #e67e22; font-size: 1em; letter-spacing: 1px; margin-bottom: 8px; }
.avis-list .avis-excerpt { font-size: 0.9em; color: #444; line-height: 1.5; margin: 0 0 10px; flex: 1; }
.avis-list .avis-date { font-size: 0.85em; color: #666; }
.avis-list .avis-link { margin-top: 10px; color: #174274; font-weight: 600; font-size: 0.9em; }

/* Pagination */
.pagination-avis { text-align: center; margin: 28px 0 18px; }
.pagination-avis a, .pagination-avis span {
	display: inline-block;
	padding: 10px 16px;
	margin: 0 5px;
	background: #174274;
	color: #fff !important;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
}

.pagination-avis a:hover { background: #0d2d4d; }
.pagination-avis span.disabled, .pagination-avis .current { background: #0d2d4d; cursor: default; }

/* Répartition des notes */
.avis-repartition {
	background: #fff;
	padding: 28px 32px;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	margin-bottom: 40px;
}

.avis-repartition h3 { font-size: 1.25em; color: #174274; margin: 0 0 20px; text-align: center; }
.avis-repartition-row {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 12px;
}

.avis-repartition-row:last-child { margin-bottom: 0; }
.avis-repartition-label { min-width: 50px; font-weight: 600; color: #333; }
.avis-repartition-bar {
	flex: 1;
	height: 22px;
	background: #e8e8e8;
	border-radius: 4px;
	overflow: hidden;
}

.avis-repartition-fill {
	height: 100%;
	background: linear-gradient(90deg, #174274, #e67e22);
	transition: width 0.4s ease;
}

.avis-repartition-count { min-width: 35px; font-weight: 600; color: #333; text-align: right; }
.avis-repartition-pct { min-width: 50px; font-size: 0.9em; color: #666; }

/* État vide */
.avis-empty {
	text-align: center;
	padding: 60px 40px;
	background: #fff;
	margin: 0 0 35px;
	color: #333;
	border: 2px dashed #ccc;
	border-radius: 8px;
	min-height: 180px;
}

.avis-empty .avis-empty-link {
	display: inline-block;
	margin-top: 22px;
	padding: 12px 24px;
	background: #174274;
	color: #fff !important;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
}

.avis-empty .avis-empty-link:hover {
	background: #0d2d4d;
}

.avis-empty-icon { font-size: 48px; color: #174274; opacity: 0.7; margin-bottom: 20px; line-height: 1; }
.avis-empty h3 { font-size: 1.5em; color: #174274; margin: 0 0 12px; font-weight: 700; }
.avis-empty p { margin: 0 0 8px; font-size: 1.05em; color: #555; line-height: 1.5; }

/* Formulaire témoignage */
.avis-form-block {
	background: #fff;
	padding: 35px 32px 40px;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	margin-top: 20px;
}

.avis-form-block h3 { font-size: 1.35em; color: #174274; margin: 0 0 8px; text-align: center; }
.avis-form-block .avis-form-intro { text-align: center; color: #666; margin-bottom: 25px; font-size: 0.95em; }

.avis-form-block .form-group { margin-bottom: 20px; }
.avis-form-block label { display: block; font-weight: 600; color: #333; margin-bottom: 8px; font-size: 0.95em; }
.avis-form-block input[type="text"],
.avis-form-block input[type="email"],
.avis-form-block textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 1em;
	box-sizing: border-box;
}

.avis-form-block textarea { min-height: 120px; resize: vertical; }
.avis-form-block .rating-stars { display: flex; gap: 8px; margin-bottom: 8px; }
.avis-form-block .rating-stars .star { font-size: 1.8em; color: #ddd; cursor: pointer; }
.avis-form-block .rating-stars .star:hover { color: #e67e22; }
.avis-form-block .form-submit { text-align: center; margin-top: 25px; }
.avis-form-block .btn-avis-submit {
	display: inline-block;
	padding: 14px 28px;
	background: #174274;
	color: #fff !important;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 1em;
	cursor: pointer;
	text-decoration: none;
}

.avis-form-block .btn-avis-submit:hover { background: #0d2d4d; }
.avis-form-message { margin-top: 20px; padding: 15px; border-radius: 6px; text-align: center; display: none; }
.avis-form-message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.avis-form-message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ========== Page détail avis (avis.php) ========== */
.avis-detail-page .wrapper.boxstyle { margin-top: 0 !important; }
.avis-detail-page .actualite-zone,
.avis-detail-page .avis-detail-zone {
	background: #ffffff !important;
	color: #000000 !important;
	padding: 0;
	margin-top: 0;
	border-radius: 8px;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.avis-detail-article { padding: 36px 32px 40px; background: #fff !important; color: #000 !important; }
.avis-detail-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.avis-detail-author { font-size: 1.75em; font-weight: 700; color: #000; margin: 0 0 10px; }
.avis-detail-stars { color: #e67e22; font-size: 1.3em; letter-spacing: 2px; margin-bottom: 8px; }
.avis-detail-date { font-size: 0.9em; color: #666; }
.avis-detail-content { font-size: 1.08em; line-height: 1.8; color: #000 !important; }
.avis-detail-content p { margin: 0 0 1em; }
.avis-detail-back-wrap { margin-top: 30px; padding-top: 24px; border-top: 1px solid #eee; text-align: center; }
.avis-detail-back {
	display: inline-block;
	padding: 14px 28px;
	background: #174274;
	color: #fff !important;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
}

.avis-detail-back:hover { background: #0d2d4d; color: #fff; }
.avis-detail-media { margin-bottom: 25px; background: #0a1628; }
.avis-detail-media img { max-width: 100%; height: auto; display: block; }
.actu-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background: #000; }
.actu-video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
