/* GR Reviews Wall – styles front */

.grw {
	--grw-accent: #1a73e8;
	--grw-star: #fbbc04;
	--grw-star-empty: #dadce0;
	--grw-radius: 14px;
	--grw-cols: 3;
	--grw-cols-md: 2;
	--grw-c: var(--grw-cols);
	--grw-lines: 5;
	--grw-gap: 20px;
	--grw-card: #ffffff;
	--grw-text: #202124;
	--grw-muted: #5f6368;
	--grw-border: rgba(32, 33, 36, .09);
	--grw-shadow: 0 1px 2px rgba(32, 33, 36, .05), 0 6px 20px rgba(32, 33, 36, .06);
	--grw-shadow-hover: 0 2px 4px rgba(32, 33, 36, .06), 0 12px 32px rgba(32, 33, 36, .1);
	color: var(--grw-text);
	font-size: 15px;
	line-height: 1.55;
	text-align: left;
	margin: 0 0 2em;
}
.grw--dark {
	--grw-card: #1f2023;
	--grw-text: #e8eaed;
	--grw-muted: #9aa0a6;
	--grw-border: rgba(255, 255, 255, .09);
	--grw-star-empty: #3c4043;
	--grw-shadow: 0 6px 20px rgba(0, 0, 0, .35);
	--grw-shadow-hover: 0 12px 32px rgba(0, 0, 0, .45);
}
@media (max-width: 900px) { .grw { --grw-c: var(--grw-cols-md); } }
@media (max-width: 600px) { .grw { --grw-c: 1; --grw-gap: 14px; } }

.grw *, .grw *::before, .grw *::after { box-sizing: border-box; }
.grw [hidden] { display: none !important; }
.grw a { color: inherit; text-decoration: none; box-shadow: none; }
.grw svg { display: inline-block; vertical-align: middle; }

/* ---------- Étoiles ---------- */
.grw-stars {
	display: inline-block;
	flex-shrink: 0;
	width: 5.5em;
	height: 1.1em;
	font-size: 15px;
	vertical-align: middle;
	background: linear-gradient(90deg, var(--grw-star) var(--grw-pct, 100%), var(--grw-star-empty) var(--grw-pct, 100%));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.5l-5.9 3.1 1.2-6.5-4.8-4.6 6.6-.9z'/%3E%3C/svg%3E") 0 0 / 1.1em 1.1em repeat-x;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.5l-5.9 3.1 1.2-6.5-4.8-4.6 6.6-.9z'/%3E%3C/svg%3E") 0 0 / 1.1em 1.1em repeat-x;
}

/* ---------- En-tête ---------- */
.grw-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 22px;
	margin-bottom: var(--grw-gap);
	background: var(--grw-card);
	border: 1px solid var(--grw-border);
	border-radius: var(--grw-radius);
	box-shadow: var(--grw-shadow);
}
.grw-header__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.grw-header__logo { display: flex; flex-shrink: 0; }
.grw-header__name { font-weight: 700; font-size: 1.1em; line-height: 1.3; }
.grw-header__name a:hover { color: var(--grw-accent); }
.grw-header__rating { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.grw-header__score { font-weight: 800; font-size: 1.45em; line-height: 1; }
.grw-header__rating .grw-stars { font-size: 18px; }
.grw-header__count { color: var(--grw-muted); font-size: .92em; }

.grw-btn,
.grw .grw-btn {
	display: inline-flex;
	align-items: center;
	padding: 10px 20px;
	border-radius: 999px;
	background: var(--grw-accent);
	color: #fff;
	font-weight: 600;
	font-size: .95em;
	line-height: 1.2;
	white-space: nowrap;
	transition: filter .2s, transform .2s;
}
.grw .grw-btn:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; }

/* ---------- Cartes ---------- */
.grw-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px;
	background: var(--grw-card);
	border: 1px solid var(--grw-border);
	border-radius: var(--grw-radius);
	box-shadow: var(--grw-shadow);
	transition: box-shadow .25s, transform .25s;
	min-width: 0;
}
.grw-items .grw-card:hover { box-shadow: var(--grw-shadow-hover); transform: translateY(-2px); }
.grw-card--hidden { display: none !important; }

.grw-card__head { display: flex; align-items: center; gap: 12px; }
.grw-card__meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.grw-card__author {
	font-weight: 650;
	font-size: .98em;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
a.grw-card__author:hover { color: var(--grw-accent); }
.grw-card__date { color: var(--grw-muted); font-size: .85em; }
.grw-card__src { display: flex; flex-shrink: 0; align-self: flex-start; }

.grw-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	margin: 0;
	max-width: none;
}
.grw-avatar--initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: hsl(var(--grw-hue, 210) 55% 52%);
	color: #fff;
	font-weight: 700;
	font-size: 18px;
}

.grw-card__text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--grw-lines);
	overflow: hidden;
	overflow-wrap: anywhere;
	font-size: .95em;
}
.grw-card__text.is-expanded { display: block; -webkit-line-clamp: unset; }

.grw .grw-more {
	align-self: flex-start;
	margin: -4px 0 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	color: var(--grw-accent);
	font: inherit;
	font-size: .9em;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}
.grw .grw-more:hover { text-decoration: underline; background: none; }

/* ---------- Grille / mosaïque / liste ---------- */
.grw-items--grid {
	display: grid;
	grid-template-columns: repeat(var(--grw-c), minmax(0, 1fr));
	gap: var(--grw-gap);
	align-items: start;
}
.grw-items--masonry { column-count: var(--grw-c); column-gap: var(--grw-gap); }
.grw-items--masonry > .grw-card { break-inside: avoid; page-break-inside: avoid; margin-bottom: var(--grw-gap); }
.grw-items--list { display: flex; flex-direction: column; gap: 14px; }

.grw-actions { text-align: center; margin-top: var(--grw-gap); }
.grw .grw-load-more {
	padding: 11px 26px;
	border: 1.5px solid var(--grw-accent);
	border-radius: 999px;
	background: transparent;
	color: var(--grw-accent);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-transform: none;
	transition: background .2s, color .2s;
}
.grw .grw-load-more:hover { background: var(--grw-accent); color: #fff; }

/* ---------- Carrousel ---------- */
.grw-slider { position: relative; }
.grw-track {
	display: flex;
	gap: var(--grw-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
	padding: 4px 2px 18px;
	outline: none;
}
.grw-track::-webkit-scrollbar { display: none; }
.grw-track > .grw-card {
	flex: 0 0 calc((100% - (var(--grw-c) - 1) * var(--grw-gap)) / var(--grw-c));
	scroll-snap-align: start;
}
.grw-track:focus-visible { outline: 2px solid var(--grw-accent); outline-offset: 4px; border-radius: var(--grw-radius); }

.grw .grw-nav {
	position: absolute;
	top: calc(50% - 26px);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--grw-border);
	background: var(--grw-card);
	color: var(--grw-text);
	box-shadow: var(--grw-shadow-hover);
	cursor: pointer;
	transition: transform .2s, color .2s;
}
.grw .grw-nav:hover { color: var(--grw-accent); transform: scale(1.06); }
.grw-nav--prev { left: -18px; }
.grw-nav--next { right: -18px; }
.grw-slider.is-static .grw-nav, .grw-slider.is-static .grw-dots { display: none; }
@media (max-width: 600px) { .grw .grw-nav { display: none; } }

.grw-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.grw .grw-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--grw-star-empty);
	cursor: pointer;
	transition: width .25s, background .25s;
}
.grw .grw-dot.is-active { width: 22px; background: var(--grw-accent); }

/* ---------- Badge ---------- */
.grw-badge {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 12px 18px 12px 14px;
	background: var(--grw-card);
	color: var(--grw-text);
	border: 1px solid var(--grw-border);
	border-top: 3px solid var(--grw-accent);
	border-radius: var(--grw-radius);
	box-shadow: var(--grw-shadow);
	font: inherit;
	text-align: left;
	transition: box-shadow .25s, transform .25s;
}
a.grw-badge:hover, button.grw-badge:hover { box-shadow: var(--grw-shadow-hover); transform: translateY(-2px); }
button.grw-badge { cursor: pointer; }
.grw-badge__logo { display: flex; }
.grw-badge__body { display: flex; flex-direction: column; line-height: 1.25; }
.grw-badge__title { font-weight: 650; font-size: .9em; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grw-badge__row { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.grw-badge__row strong { font-size: 1.15em; font-weight: 800; }
.grw-badge__count { color: var(--grw-muted); font-size: .8em; }

/* ---------- Pop-up flottant ---------- */
.grw--floating {
	position: fixed;
	z-index: 99990;
	bottom: 20px;
	left: 20px;
	margin: 0;
	font-size: 14px;
}
.grw--pos-bottom-right { left: auto; right: 20px; }
.grw--floating .grw-badge { box-shadow: var(--grw-shadow-hover); }

.grw-toast {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 0;
	width: min(350px, calc(100vw - 40px));
	opacity: 0;
	transform: translateY(14px) scale(.98);
	transition: opacity .35s ease, transform .35s ease;
	pointer-events: none;
}
.grw--pos-bottom-right .grw-toast { left: auto; right: 0; }
.grw--no-badge .grw-toast { bottom: 0; }
.grw-toast.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.grw-toast__body { cursor: pointer; outline: none; }
.grw-toast__body:focus-visible .grw-card { outline: 2px solid var(--grw-accent); }
.grw .grw-toast__close {
	position: absolute;
	top: -9px;
	right: -9px;
	z-index: 2;
	width: 24px;
	height: 24px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--grw-border);
	background: var(--grw-card);
	color: var(--grw-muted);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	box-shadow: var(--grw-shadow);
}
.grw-card--toast { padding: 16px; gap: 8px; box-shadow: var(--grw-shadow-hover); border-left: 3px solid var(--grw-accent); }
.grw-card--toast .grw-card__text { -webkit-line-clamp: 3; font-size: .92em; }
.grw-card--toast .grw-avatar { width: 38px; height: 38px; }
@media (max-width: 600px) {
	.grw--floating { left: 12px; bottom: 12px; }
	.grw--pos-bottom-right { right: 12px; left: auto; }
	.grw-toast { width: calc(100vw - 24px); }
}

/* Modale */
html.grw-lock { overflow: hidden; }
.grw-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.grw-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 17, 20, .55);
	opacity: 0;
	transition: opacity .25s;
}
.grw-modal__panel {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: 86vh;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 26px;
	background: var(--grw-card);
	color: var(--grw-text);
	border-radius: calc(var(--grw-radius) + 4px);
	box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .25s, transform .25s;
}
.grw--light .grw-modal__panel { background: #f8f9fa; }
.grw--light .grw-modal__panel .grw-card,
.grw--light .grw-modal__panel .grw-header { background: #fff; }
.grw--dark .grw-modal__panel { background: #17181a; }
.grw--dark .grw-modal__panel .grw-card,
.grw--dark .grw-modal__panel .grw-header { background: #1f2023; }
.grw-modal.is-open .grw-modal__backdrop { opacity: 1; }
.grw-modal.is-open .grw-modal__panel { opacity: 1; transform: none; }
.grw-modal__panel .grw-header { padding-right: 52px; }
.grw .grw-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(127, 127, 127, .14);
	color: var(--grw-text);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.grw .grw-modal__close:hover { background: rgba(127, 127, 127, .25); }
@media (max-width: 600px) {
	.grw-modal { padding: 0; align-items: flex-end; }
	.grw-modal__panel { max-height: 90vh; border-radius: 18px 18px 0 0; padding: 20px 16px; }
}

/* ---------- Notice admin ---------- */
.grw-notice {
	padding: 12px 16px;
	margin: 0 0 1.5em;
	background: #fff8e5;
	border-left: 4px solid #dba617;
	color: #3c3c3c;
	font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
	.grw *, .grw *::before, .grw *::after { transition: none !important; }
	.grw-track { scroll-behavior: auto; }
}
