/* Annonce Maison Gardée — styles front-office (v0.6) */

.amg-annonces,
.amg-reponse,
.amg-gate {
	--amg-primary: #2c7a6b;
	--amg-primary-dark: #205a4f;
	--amg-accent: #ef8354;
	--amg-accent-dark: #e2693a;
	--amg-month: #e09226;
	--amg-month-dark: #c2761a;
	--amg-bg: #f7f4ee;
	--amg-card: #ffffff;
	--amg-text: #2b2b2b;
	--amg-muted: #5e6968;
	--amg-border: #e2dccf;
	--amg-radius: 14px;
	--amg-shadow: 0 6px 22px rgba(32, 90, 79, 0.09);
	color: var(--amg-text);
	font-size: 18px;          /* lisibilité seniors */
	line-height: 1.6;
}

/* ---------- Texte d'information permanent ---------- */
.amg-intro {
	margin: 0 0 1.8em;
	padding: 1.4em 1.6em;
	background: #fffaf2;
	border: 2px solid var(--amg-month);
	border-radius: var(--amg-radius);
}
.amg-intro__head {
	margin: 0 0 0.9em;
	font-size: 1.18rem;
	font-weight: 800;
	color: var(--amg-month-dark);
	text-align: center;
	line-height: 1.4;
}
.amg-intro__line {
	margin: 0 0 0.7em;
	font-size: 0.92rem;
}
.amg-intro__sign {
	margin: 1em 0 0.2em;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-align: right;
	padding-right: 6em;
}
.amg-intro__update {
	margin: 0;
	font-weight: 700;
	text-align: center;
	color: var(--amg-month);
}

/* ---------- Filtre par mois ---------- */
.amg-filter {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.6em;
	margin: 0 0 1.6em;
	padding: 0.9em 1.1em;
	background: var(--amg-bg);
	border-radius: var(--amg-radius);
}
.amg-filter__label { font-weight: 700; }
.amg-filter__select {
	padding: 0.55em 0.9em;
	font-size: 1.05rem;
	border: 2px solid var(--amg-border);
	border-radius: 10px;
	background: #fff;
	min-height: 48px;
}

/* ---------- Bandeau mois ---------- */
.amg-month {
	margin: 1.8em 0 1em;
	padding: 0.5em 0.95em;
	font-size: 1.55rem;
	font-weight: 800;
	color: #fff;
	background: linear-gradient(135deg, var(--amg-month), var(--amg-month-dark));
	border-radius: var(--amg-radius);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
	letter-spacing: 0.01em;
}
.amg-monthgroup:first-of-type .amg-month { margin-top: 0; }

/* ---------- Carte annonce ---------- */
.amg-card {
	background: var(--amg-card);
	border: 1px solid var(--amg-border);
	border-radius: var(--amg-radius);
	box-shadow: var(--amg-shadow);
	overflow: hidden;
	margin: 0 0 1.8em;
}
.amg-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.8em;
	padding: 1.1em 1.3em;
	background: var(--amg-bg);
	border-bottom: 1px solid var(--amg-border);
}
.amg-card__title {
	margin: 0;
	font-size: 1.85rem;     /* ville plus grosse */
	font-weight: 800;
	line-height: 1.2;
	color: var(--amg-primary-dark);
}
.amg-card__dates {
	margin: 0.35em 0 0;     /* date de garde sous la ville */
	font-size: 1.05rem;
	color: var(--amg-text);
}
.amg-card__ref {
	flex: none;
	display: inline-block;
	padding: 0.25em 0.75em;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: var(--amg-accent-dark);
	background: #fff;
	border: 1px solid var(--amg-accent);
	border-radius: 999px;
	white-space: nowrap;
}

/* Photos cliquables */
.amg-card__photos {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px;
	background: var(--amg-border);
}
.amg-photo {
	display: block;
	cursor: zoom-in;
	line-height: 0;
}
.amg-card__photos img {
	display: block;
	width: 100%;
	height: 260px;
	object-fit: cover;
}

/* Corps en 2 colonnes : équipements (gauche 30%) + description */
.amg-card__cols {
	display: flex;
	gap: 1.6em;
	padding: 1.2em 1.3em;
}
.amg-card__equip {
	flex: 0 0 20%;
	max-width: 20%;
	display: flex;
	flex-direction: column;
	gap: 0.45em;
	padding: 0.9em;
	background: var(--amg-bg);
	border-radius: 10px;
	align-self: flex-start;
	text-align: center;
	font-size: 0.98rem;
}
.amg-equip__k { color: var(--amg-muted); }
.amg-equip__v { font-weight: 700; color: var(--amg-text); }
.amg-card__main { flex: 1 1 auto; }
.amg-line { margin: 0 0 0.7em; }
.amg-line:last-child { margin-bottom: 0; }
.amg-line__label { font-weight: 700; color: var(--amg-primary-dark); }

/* Pied : bouton répondre centré */
.amg-card__foot {
	padding: 0 1.3em 1.4em;
	text-align: center;
}

/* ---------- Boutons ---------- */
.amg-btn {
	display: inline-block;
	padding: 0.8em 1.7em;
	font-size: 1.1rem;
	font-weight: 700;
	text-decoration: none;
	color: #fff !important;
	background: var(--amg-accent);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	min-height: 52px;
	line-height: 1.4;
	transition: background 0.18s ease, transform 0.18s ease;
}
.amg-btn:hover,
.amg-btn:focus {
	background: var(--amg-accent-dark);
	color: #fff !important;
	transform: translateY(-1px);
}
.amg-btn--lg { padding: 0.9em 2em; font-size: 1.15rem; }
.amg-btn--ghost {
	background: transparent;
	color: var(--amg-primary-dark) !important;
	border: 2px solid var(--amg-primary);
}
.amg-btn--ghost:hover,
.amg-btn--ghost:focus {
	background: var(--amg-month);
	border-color: var(--amg-month);
	color: #fff !important;
}
.amg-reponse__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	flex-wrap: wrap;
	margin-top: 0.5em;
}
.amg-admin-warn { color: #b32d2e; font-size: 0.95rem; }

/* ---------- Lightbox ---------- */
.amg-lightbox {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.55);
	z-index: 100000;
}
.amg-lightbox.is-open { display: flex; }
.amg-lightbox__inner {
	position: relative;
	display: inline-block;
	line-height: 0;
	max-width: 96%;
}
.amg-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 90vh;
	border-radius: 10px;
	box-shadow: 0 12px 50px rgba(0, 0, 0, 0.55);
	cursor: zoom-out;
}
.amg-lightbox__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	font-size: 22px;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, 0.6);
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	z-index: 2;
}
.amg-lightbox__close:hover { background: rgba(0, 0, 0, 0.85); }
body.amg-noscroll { overflow: hidden; }

/* ---------- Porte mot de passe ---------- */
.amg-gate { display: flex; justify-content: center; padding: 1em 0; }
.amg-gate__box {
	width: 100%;
	max-width: 480px;
	padding: 2.4em 2em;
	text-align: center;
	background: var(--amg-card);
	border: 1px solid var(--amg-border);
	border-radius: var(--amg-radius);
	box-shadow: var(--amg-shadow);
}
.amg-gate__title { margin: 0 0 0.4em; color: var(--amg-primary-dark); font-size: 1.5rem; }
.amg-gate__intro { margin: 0 0 1.4em; color: var(--amg-muted); }
.amg-gate__form { display: flex; flex-direction: column; gap: 0.9em; }
.amg-gate__form input[type="password"] {
	width: 100%;
	padding: 0.85em 1em;
	font-size: 1.1rem;
	border: 2px solid var(--amg-border);
	border-radius: 10px;
	box-sizing: border-box;
	min-height: 52px;
}
.amg-gate__form input[type="password"]:focus {
	outline: none;
	border-color: var(--amg-primary);
}
.amg-gate__error {
	margin: 0 0 1em;
	padding: 0.7em 1em;
	color: #8a1f1f;
	background: #fde8e6;
	border-radius: 8px;
	font-size: 1rem;
}

/* ---------- Formulaire de réponse ---------- */
.amg-reponse { width: 100%; }
.amg-reponse__summary {
	padding: 1.2em 1.4em;
	margin-bottom: 1.5em;
	background: var(--amg-bg);
	border: 1px solid var(--amg-border);
	border-radius: var(--amg-radius);
}
.amg-reponse__summary h2 { margin: 0 0 0.35em; color: var(--amg-month); font-size: 1.45rem; font-weight: 800; text-align: center; }
.amg-reponse__lieu { margin: 0 0 0.3em; font-size: 1.15rem; }
.amg-reponse__periode { margin: 0; color: var(--amg-muted); }
.amg-reponse__photos {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	width: 80%;
	margin: 1em auto 0;
	background: var(--amg-border);
	border-radius: 10px;
	overflow: hidden;
}
.amg-reponse__photos .amg-photo { display: block; line-height: 0; }
.amg-reponse__photos img { display: block; width: 100%; height: 200px; object-fit: cover; }
.amg-reponse__form .amg-field { margin: 0 0 1.2em; }
.amg-reponse__form label {
	display: block;
	margin-bottom: 0.4em;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--amg-primary-dark);
}
.amg-reponse__form input,
.amg-reponse__form textarea {
	width: 100%;
	padding: 0.8em 0.95em;
	font-size: 1.05rem;
	border: 2px solid var(--amg-border);
	border-radius: 10px;
	box-sizing: border-box;
	font-family: inherit;
	min-height: 52px;
}
.amg-reponse__form textarea { min-height: auto; }
.amg-reponse__form input:focus,
.amg-reponse__form textarea:focus {
	outline: none;
	border-color: var(--amg-primary);
}
.amg-req { color: var(--amg-accent-dark); }
.amg-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---------- Confirmation ---------- */
.amg-reponse--success { text-align: center; }
.amg-reponse__box {
	padding: 2.6em 2em;
	background: var(--amg-card);
	border: 1px solid var(--amg-border);
	border-radius: var(--amg-radius);
	box-shadow: var(--amg-shadow);
}
.amg-check {
	width: 70px;
	height: 70px;
	margin: 0 auto 0.8em;
	font-size: 2.2rem;
	line-height: 70px;
	color: #fff;
	background: var(--amg-primary);
	border-radius: 50%;
}
.amg-reponse__box h2 { margin: 0 0 0.5em; color: var(--amg-primary-dark); }

/* ---------- Divers ---------- */
.amg-empty {
	padding: 1.5em;
	text-align: center;
	color: var(--amg-muted);
	background: var(--amg-bg);
	border-radius: var(--amg-radius);
	font-size: 1.05rem;
}

/* ---------- Grilles ---------- */
.amg-grid { display: grid; gap: 1.2em; }
.amg-grid--2 { grid-template-columns: 1fr 1fr; }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
	.amg-annonces, .amg-reponse, .amg-gate { font-size: 17px; }
	.amg-card__head { flex-direction: column; align-items: flex-start; }
	.amg-card__title { font-size: 1.55rem; }
	.amg-card__photos { grid-template-columns: 1fr; }
	.amg-card__photos img { height: 230px; }
	.amg-reponse__photos { grid-template-columns: 1fr; width: 90%; }
	.amg-card__cols { flex-direction: column; gap: 1.1em; }
	.amg-card__equip { flex-basis: auto; max-width: 100%; }
	.amg-grid--2 { grid-template-columns: 1fr; }
	.amg-btn { width: 100%; box-sizing: border-box; }
	.amg-filter { flex-direction: column; align-items: stretch; }
	.amg-filter__select { width: 100%; }
}
