/* AGD Viennoiseries 4 — feuille de style publique.
   Tout est préfixé .afv- pour ne pas dépendre du thème (Divi) ni entrer en conflit avec lui. */

@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/hanken-grotesk-Regular.woff') format('woff'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/hanken-grotesk-Medium.woff') format('woff'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/hanken-grotesk-SemiBold.woff') format('woff'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/hanken-grotesk-Bold.woff') format('woff'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/hanken-grotesk-ExtraBold.woff') format('woff'); }

/* ---------- Réinitialisation locale ---------- */
.afv-root,
.afv-root *,
.afv-root *::before,
.afv-root *::after { box-sizing: border-box; }
.afv-root [hidden] { display: none !important; }
.afv-root h1, .afv-root h2, .afv-root h3, .afv-root p { margin: 0; padding: 0; text-transform: none; font-family: inherit; }
.afv-root button, .afv-root select { font-family: inherit; margin: 0; -webkit-appearance: none; appearance: none; }
.afv-root a { text-decoration: none; }

/* ---------- Conteneur ---------- */
.afv-root {
	display: flex;
	flex-direction: column;
	gap: 18px;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 20px 14px 48px;
	background: transparent;
	font-family: 'Hanken Grotesk', system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.3;
	color: #17331B;
}

/* ---------- En-tête ---------- */
.afv-root .afv-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 8px 6px 0; }
.afv-root .afv-headings { display: flex; flex-direction: column; gap: 4px; }
.afv-root .afv-h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1; font-weight: 800; letter-spacing: -0.02em; color: #1D5A26; }
.afv-root .afv-sub { font-size: 16px; font-weight: 500; color: #1D4A22; }

/* Onglets : visibles seulement quand les deux blocs ne tiennent pas côte à côte (classe ajoutée par le script). */
.afv-root .afv-tabs { display: none; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.afv-root.afv-narrow .afv-tabs { display: flex; }
.afv-root .afv-tab {
	display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
	background: #FFFFFF; color: #17331B; font-size: 17px; font-weight: 600; line-height: 1; cursor: pointer;
}
.afv-root .afv-tab.is-active { background: #1D5A26; color: #FFFFFF; }
.afv-root .afv-tab-count { font-size: 13px; font-weight: 700; opacity: .7; }

/* ---------- Corps ---------- */
.afv-root .afv-body { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.afv-root .afv-card { min-width: 0; background: #FFFFFF; border-radius: 28px; display: flex; flex-direction: column; gap: 14px; }
.afv-root .afv-card--agenda { flex: 2 1 520px; padding: 18px 14px 20px; }
.afv-root .afv-card--films { flex: 1 1 340px; padding: 20px 20px 22px; }

/* Un seul bloc à la fois sur téléphone (onglets). */
.afv-root.afv-narrow[data-active="agenda"] .afv-panel[data-panel="films"],
.afv-root.afv-narrow[data-active="films"] .afv-panel[data-panel="agenda"] { display: none; }

/* ---------- Agenda : navigation ---------- */
.afv-root .afv-monthnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
.afv-root .afv-navbtn {
	flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
	background: #FCDCCF; color: #B83A1D; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.afv-root .afv-navbtn:hover:not(:disabled) { background: #F9C4AF; }
.afv-root .afv-navbtn:disabled { opacity: .35; cursor: default; }
.afv-root .afv-monthtitle { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.afv-root .afv-month { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; color: #1D5A26; line-height: 1.2; }
.afv-root .afv-today {
	height: 32px; padding: 0 14px; border: 1.5px solid #E4502E; border-radius: 999px; background: #FFFFFF;
	color: #B83A1D; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer;
}
.afv-root .afv-today:hover { background: #FCDCCF; }

/* ---------- Agenda : libellés (filtres) ---------- */
.afv-root .afv-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 4px; }
.afv-root .afv-filters:empty { display: none; }
.afv-root .afv-chip {
	display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
	background: #E3EDF9; color: #2B5585; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer;
}
.afv-root .afv-chip.is-active { background: #8AB2DF; color: #FFFFFF; }
.afv-root .afv-chip-star { display: flex; color: #D99A00; }

/* ---------- Agenda : liste ---------- */
.afv-root .afv-days { display: flex; flex-direction: column; gap: 22px; }
.afv-root .afv-days.is-loading { opacity: .45; transition: opacity .15s ease; }
.afv-root .afv-day { display: flex; flex-direction: column; gap: 6px; }
.afv-root .afv-day-title { padding: 0 6px; font-size: 19px; font-weight: 700; color: #17331B; line-height: 1.25; }
.afv-root .afv-city-block { display: flex; flex-direction: column; }
.afv-root .afv-city-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 4px; }
.afv-root .afv-city-name { font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #2E8B34; }
.afv-root .afv-rule { flex: 1; height: 1px; background: #D5E8C6; }

.afv-root .afv-event {
	position: relative; display: grid; grid-template-columns: 44px auto minmax(0, 1fr) auto;
	align-items: center; gap: 10px; padding: 10px 8px; border-radius: 14px;
}
.afv-root .afv-event--nocat { grid-template-columns: 44px minmax(0, 1fr) auto; }
.afv-root .afv-event:hover { background: #F1F7EA; }
.afv-root .afv-time { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.afv-root .afv-cat {
	display: flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #E3EDF9;
	color: #2B5585; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.afv-root .afv-title-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.afv-root .afv-title { display: block; min-width: 0; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afv-root .afv-title-link { color: inherit; outline: none; }
.afv-root .afv-title-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.afv-root .afv-title-link:focus-visible::after { outline: 2px solid #1D5A26; outline-offset: -2px; }
.afv-root .afv-star { flex: none; display: flex; color: #D99A00; }
.afv-root .afv-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 2px; pointer-events: none; }
.afv-root .afv-cal, .afv-root .afv-ext { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: #6F8574; }
.afv-root .afv-cal { pointer-events: auto; border-radius: 50%; }
.afv-root .afv-cal:hover, .afv-root .afv-cal:focus-visible { background: #FCDCCF; color: #B83A1D; }
.afv-root .afv-empty { padding: 18px 8px; text-align: center; font-size: 16px; color: #3D5A40; }

.afv-root .afv-more {
	align-self: center; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 22px; border: 0;
	border-radius: 999px; background: #E4502E; color: #FFFFFF; font-size: 16px; font-weight: 600; line-height: 1; cursor: pointer;
}
.afv-root .afv-more:hover { background: #C9431F; }

/* ---------- Films ---------- */
.afv-root .afv-films-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.afv-root .afv-films-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: #1D5A26; line-height: 1.25; }
.afv-root .afv-films-title svg { flex: none; }
.afv-root .afv-count {
	flex: none; display: flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
	background: #FCDCCF; color: #B83A1D; font-size: 13px; font-weight: 700;
}
.afv-root .afv-selects { display: flex; flex-wrap: wrap; gap: 8px; }
.afv-root .afv-select {
	flex: 1 1 150px; min-width: 0; height: 40px; padding: 0 36px 0 14px; border: 1.5px solid #D7E4C8; border-radius: 999px;
	background-color: #FFFFFF;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='%239B2F52'%3E%3Cpath d='M4.6 6.2a.5.5 0 0 1 .7 0L8 8.9l2.7-2.7a.5.5 0 1 1 .7.7l-3 3a.5.5 0 0 1-.7 0l-3-3a.5.5 0 0 1 0-.7z'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center;
	color: #17331B; font-size: 15px; font-weight: 500; cursor: pointer;
}
.afv-root .afv-select.is-set { border-color: #9B2F52; background-color: #FBE3EA; color: #9B2F52; }
.afv-root .afv-select:focus { outline: none; border-color: #9B2F52; }
.afv-root .afv-select:focus-visible { outline: 2px solid #9B2F52; outline-offset: 2px; }

.afv-root .afv-films-list { display: flex; flex-direction: column; }
.afv-root .afv-film { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid #E3ECD8; }
.afv-root .afv-film-title { font-size: 17px; font-weight: 700; line-height: 1.25; text-wrap: pretty; color: #2E8B34; }
.afv-root .afv-film-city { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.afv-root .afv-city-tag {
	display: flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #FBE3EA;
	color: #C2366C; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.afv-root .afv-cinema {
	display: flex; align-items: center; height: 28px; padding: 0 11px; border: 1px solid #D7E4C8; border-radius: 999px;
	color: #17331B; font-size: 14px; font-weight: 500; text-decoration: none;
}
.afv-root a.afv-cinema:hover, .afv-root a.afv-cinema:focus-visible { border-color: #C2366C; background: #FDF0F4; color: #9B2F52; }
.afv-root .afv-films-empty { padding: 12px 0; font-size: 15px; color: #3D5A40; }

/* ---------- Accessibilité ---------- */
.afv-root .afv-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.afv-root button:focus-visible, .afv-root .afv-cal:focus-visible, .afv-root a.afv-cinema:focus-visible { outline: 2px solid #1D5A26; outline-offset: 2px; }

/* ---------- Téléphone portable (≤ 600 px) ---------- */
@media (max-width: 600px) {
	/* Mois : un peu plus petit pour limiter les retours à la ligne */
	.afv-root .afv-month { font-size: 20px; }

	/* Liste des évènements : plus compacte, sans pastille de catégorie ni icône « lien externe » */
	.afv-root .afv-event,
	.afv-root .afv-event--nocat { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; padding: 10px 6px; }
	.afv-root .afv-event .afv-cat { display: none; }
	.afv-root .afv-event .afv-ext { display: none; }
	.afv-root .afv-time { font-size: 14px; }
	.afv-root .afv-title { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	.afv-root .afv-days.is-loading { transition: none; }
}
