/* ═══════════════════════════════════════════════════════════════
   OMAR - Agenda (archive + fiche événement)
   Chargé uniquement sur l'archive /agenda/ et les fiches événement.
   S'appuie sur les tokens de main.css.
   ═══════════════════════════════════════════════════════════════ */

:root {
	--ev-sortie:    #0ea5e9;
	--ev-formation: #8b5cf6;
	--ev-conf:      #f59e0b;
	--ev-stand:     #22c55e;
	--ev-scolaire:  #f97316;
	--ev-default:   #0054b6;
}

/* ── Badge type (base + variantes claires, vue liste) ───────── */
.ev-badge {
	display: inline-flex;
	align-items: center;
	padding: .2rem .65rem;
	border-radius: var(--r-pill);
	font-size: .68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	white-space: nowrap;
}
.ev-badge--sortie    { background: rgba(14,165,233,.12); color: var(--ev-sortie); }
.ev-badge--formation { background: rgba(139,92,246,.12); color: var(--ev-formation); }
.ev-badge--conf      { background: rgba(245,158,11,.12); color: var(--ev-conf); }
.ev-badge--stand     { background: rgba(34,197,94,.12);  color: var(--ev-stand); }
.ev-badge--scolaire  { background: rgba(249,115,22,.12); color: var(--ev-scolaire); }
.ev-badge--default   { background: rgba(0,84,182,.12);   color: var(--ev-default); }

/* ═══════════════ ARCHIVE ═══════════════════════════════════════ */
.agenda-hero {
	background: var(--c-deep);
	padding: 5rem 0 3.5rem;
	color: #fff;
	text-align: center;
}
.agenda-hero .eyebrow { color: var(--c-sky); }
.agenda-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .5rem; }
.agenda-hero p  { color: rgba(255,255,255,.65); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* Barre de filtres (sticky sous la nav fixe) */
.agenda-controls {
	background: #f4f8ff;
	border-bottom: 1.5px solid #e4edf8;
	position: sticky;
	top: 72px;
	z-index: 500;
}
.agenda-controls-inner {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .75rem 0;
	flex-wrap: wrap;
}
.ev-filter-btn {
	padding: .35rem .9rem;
	border-radius: var(--r-pill);
	font-size: .75rem;
	font-weight: 600;
	border: 1.5px solid #dde5f0;
	background: #fff;
	color: var(--c-muted);
	cursor: pointer;
	transition: all var(--t-fast);
	white-space: nowrap;
}
.ev-filter-btn:hover { border-color: var(--c-navy); color: var(--c-navy); }
.ev-filter-btn.active { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.ev-filter-btn[data-type="sortie"].active    { background: var(--ev-sortie);    border-color: var(--ev-sortie); }
.ev-filter-btn[data-type="formation"].active { background: var(--ev-formation); border-color: var(--ev-formation); }
.ev-filter-btn[data-type="conf"].active      { background: var(--ev-conf);      border-color: var(--ev-conf); }
.ev-filter-btn[data-type="stand"].active     { background: var(--ev-stand);     border-color: var(--ev-stand); }
.ev-filter-btn[data-type="scolaire"].active  { background: var(--ev-scolaire);  border-color: var(--ev-scolaire); }

.agenda-main { background: #f4f8ff; padding-bottom: 3rem; }
.agenda-list { padding: 2rem 0 1rem; }

.agenda-month-sep {
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--c-muted);
	padding: 1.5rem 0 .5rem;
	border-bottom: 1px solid #e4edf8;
	margin-bottom: 1rem;
}
.agenda-month-sep:first-child { padding-top: 0; }

/* Carte événement */
.ev-card {
	display: grid;
	grid-template-columns: 80px 1fr auto;
	gap: 1.25rem;
	align-items: center;
	background: #fff;
	border-radius: var(--r-lg);
	border: 1.5px solid #e8eff8;
	padding: 1.1rem 1.25rem;
	margin-bottom: .75rem;
	text-decoration: none;
	transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
	position: relative;
	overflow: hidden;
}
.ev-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ev-default); }
.ev-card[data-type="sortie"]::before    { background: var(--ev-sortie); }
.ev-card[data-type="formation"]::before { background: var(--ev-formation); }
.ev-card[data-type="conf"]::before      { background: var(--ev-conf); }
.ev-card[data-type="stand"]::before     { background: var(--ev-stand); }
.ev-card[data-type="scolaire"]::before  { background: var(--ev-scolaire); }
.ev-card:hover {
	border-color: var(--c-sky);
	box-shadow: 0 4px 16px rgba(17,171,239,.1);
	transform: translateX(3px);
}

.ev-date-block {
	text-align: center;
	background: #f4f8ff;
	border-radius: var(--r-md);
	padding: .6rem .5rem;
	flex-shrink: 0;
}
.ev-date-day   { font-family: var(--f-display); font-size: 1.8rem; font-weight: 700; line-height: 1; color: var(--c-navy); }
.ev-date-month { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); }
.ev-date-dow   { font-size: .68rem; color: var(--c-muted); margin-top: .1rem; }

.ev-card-body { min-width: 0; }
.ev-card-top  { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; flex-wrap: wrap; min-height: 1px; }
.ev-card-title { font-family: var(--f-display); font-size: 1rem; font-weight: 700; color: var(--c-ink); line-height: 1.25; margin-bottom: .4rem; }
.ev-card-meta  { display: flex; gap: 1rem; flex-wrap: wrap; }
.ev-meta-item  { display: flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--c-muted); }
.ev-meta-item svg { flex-shrink: 0; }

.ev-card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; flex-shrink: 0; }
.ev-places { font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: var(--r-pill); white-space: nowrap; }
.ev-places--ok   { background: #dcfce7; color: #16a34a; }
.ev-places--low  { background: #fef9c3; color: #a16207; }
.ev-places--full { background: #fee2e2; color: #b91c1c; }
.ev-places--free { background: #eef5ff; color: var(--c-muted); }

/* Événements passés */
.agenda-past { padding-top: 1.5rem; }
.agenda-past-title {
	font-family: var(--f-display);
	font-size: 1.15rem;
	color: var(--c-navy);
	margin: 1rem 0 1.25rem;
	padding-top: 1.5rem;
	border-top: 1.5px solid #e4edf8;
}
.agenda-list--past { opacity: .72; }
.agenda-list--past .ev-card:hover { opacity: 1; }
.agenda-past-note { font-size: .8rem; color: var(--c-muted); text-align: center; margin-top: 1rem; }

.agenda-empty { text-align: center; padding: 3rem 1rem; color: var(--c-muted); }
.agenda-empty p { margin: 0 0 .35rem; }
.agenda-empty-sub { font-size: .88rem; }

/* ═══════════════ FICHE (SINGLE) ════════════════════════════════ */
.ev-hero {
	position: relative;
	height: 58vh;
	min-height: 400px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background: var(--c-deep);
}
.ev-hero--noimg {
	background: linear-gradient(140deg, var(--c-deep) 0%, var(--c-navy) 100%);
	min-height: 320px;
	height: 42vh;
}
.ev-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.ev-hero-overlay {
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(4,25,60,.9) 0%, rgba(4,25,60,.35) 60%, transparent 100%);
}
.ev-hero-content { position: relative; z-index: 1; padding: 0 0 2.5rem; color: #fff; }
.ev-hero-content .container { display: flex; flex-direction: column; gap: .75rem; }
.ev-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); color: #fff; max-width: 720px; line-height: 1.15; margin: 0; }

.breadcrumb { display: flex; gap: .4rem; align-items: center; font-size: .75rem; color: rgba(255,255,255,.65); flex-wrap: wrap; padding-top: 5rem; }
.breadcrumb a { color: rgba(255,255,255,.65); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb-sep { color: rgba(255,255,255,.35); }

/* Badge type - version pleine dans le hero */
.ev-hero .ev-badge { padding: .3rem .8rem; font-size: .72rem; }
.ev-hero .ev-badge--sortie    { background: var(--ev-sortie);    color: #fff; }
.ev-hero .ev-badge--formation { background: var(--ev-formation); color: #fff; }
.ev-hero .ev-badge--conf      { background: var(--ev-conf);      color: #fff; }
.ev-hero .ev-badge--stand     { background: var(--ev-stand);     color: #fff; }
.ev-hero .ev-badge--scolaire  { background: var(--ev-scolaire);  color: #fff; }
.ev-hero .ev-badge--default   { background: var(--ev-default);   color: #fff; }

/* Barre statut */
.ev-status-bar { background: #f4f8ff; border-bottom: 1.5px solid #e4edf8; }
.ev-status-inner { display: flex; gap: 1.5rem; padding: .9rem 0; align-items: center; flex-wrap: wrap; }
.ev-status-item { display: flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--c-ink); }
.ev-status-item svg { color: var(--c-sky); flex-shrink: 0; }
.ev-status-item strong { font-weight: 700; }
.ev-status-sep { color: #dde5f0; font-size: 1.2rem; }
.ev-status-places--low  { color: #a16207; }
.ev-status-places--low svg, .ev-status-places--low strong { color: #a16207; }
.ev-status-places--full { color: #b91c1c; }
.ev-status-places--full svg, .ev-status-places--full strong { color: #b91c1c; }

/* Layout */
.ev-page { background: #f4f8ff; }
.ev-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; padding: 2.5rem 0 4rem; align-items: start; }
.ev-main { min-width: 0; }

.ev-section { background: #fff; border-radius: var(--r-xl); border: 1.5px solid #e8eff8; padding: 1.75rem; margin-bottom: 1.5rem; }
.ev-section h2 {
	font-family: var(--f-display);
	font-size: 1.1rem;
	color: var(--c-navy);
	margin: 0 0 1.1rem;
	padding-bottom: .7rem;
	border-bottom: 1.5px solid #e8eff8;
	display: flex; align-items: center; gap: .5rem;
}
.ev-section h2 svg { color: var(--c-sky); flex-shrink: 0; }

.ev-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.ev-info-card { background: #f4f8ff; border-radius: var(--r-lg); padding: 1rem 1.1rem; }
.ev-info-card-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--c-muted); margin-bottom: .3rem; }
.ev-info-card-value { font-size: .9rem; font-weight: 600; color: var(--c-navy); line-height: 1.4; }
.ev-info-card-value--low, .ev-info-card-value--full { color: #d97706; }
.ev-info-card-sub { font-size: .75rem; color: var(--c-muted); margin-top: .15rem; }

.ev-description { font-size: .95rem; line-height: 1.8; color: var(--c-ink); }
.ev-description p { margin-bottom: 1rem; }
.ev-description p:last-child { margin-bottom: 0; }

.ev-programme { list-style: none; padding: 0; margin: 0; }
.ev-programme li { display: flex; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid #f0f5fb; align-items: flex-start; }
.ev-programme li:last-child { border-bottom: none; }
.ev-prog-time { font-size: .75rem; font-weight: 700; color: var(--c-sky); white-space: nowrap; min-width: 72px; padding-top: .1rem; }
.ev-prog-text { font-size: .88rem; color: var(--c-ink); line-height: 1.5; }

.ev-map-address { background: #f4f8ff; border-radius: var(--r-md); padding: .9rem 1rem; font-size: .85rem; display: flex; gap: .75rem; align-items: flex-start; }
.ev-map-address svg { color: var(--c-sky); margin-top: .1rem; flex-shrink: 0; }
.ev-map-address div { line-height: 1.5; }
.ev-map-address strong { color: var(--c-navy); display: block; }
.ev-map-address a { color: var(--c-sky); font-size: .8rem; }

.ev-speakers { display: flex; flex-direction: column; gap: .85rem; }
.ev-speaker { display: flex; gap: .9rem; align-items: center; }
.ev-speaker-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--c-navy); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--f-display); font-size: .9rem; font-weight: 700; flex-shrink: 0; }
.ev-speaker:nth-child(2n) .ev-speaker-avatar { background: var(--c-sky); }
.ev-speaker:nth-child(3n) .ev-speaker-avatar { background: #64748b; }
.ev-speaker-name { font-weight: 600; font-size: .9rem; color: var(--c-navy); margin: 0; }
.ev-speaker-role { font-size: .78rem; color: var(--c-muted); margin: 0; }

.ev-checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ev-checklist li { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; color: var(--c-ink); }
.ev-checklist li::before { content: '✓'; color: var(--c-sky); font-weight: 700; flex-shrink: 0; }

/* Navigation événements */
.ev-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.5rem 0 0; }
.ev-nav-btn { background: #fff; border: 1.5px solid #e8eff8; border-radius: var(--r-xl); padding: 1rem 1.25rem; text-decoration: none; transition: all var(--t-fast); display: flex; flex-direction: column; gap: .25rem; }
.ev-nav-btn:hover { border-color: var(--c-sky); box-shadow: 0 3px 12px rgba(17,171,239,.1); }
.ev-nav-btn--next { text-align: right; }
.ev-nav-dir { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); }
.ev-nav-title { font-size: .88rem; font-weight: 600; color: var(--c-navy); }

/* Sidebar */
.ev-sidebar { position: sticky; top: 90px; }
.ev-cta-card { background: var(--c-navy); border-radius: var(--r-xl); padding: 1.75rem; color: #fff; margin-bottom: 1.25rem; }
.ev-cta-card h3 { color: #fff; font-size: 1.05rem; margin: 0 0 .4rem; }
.ev-cta-card p  { color: rgba(255,255,255,.7); font-size: .83rem; line-height: 1.6; margin: 0 0 1.25rem; }
.ev-cta-card p strong { color: #fff; }
.ev-cta-price { display: flex; align-items: baseline; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.ev-price-amount { font-family: var(--f-display); font-size: 1.8rem; font-weight: 800; color: #fff; }
.ev-price-unit { font-size: .8rem; color: rgba(255,255,255,.55); }

.ev-places-gauge { background: rgba(255,255,255,.15); border-radius: var(--r-pill); height: 6px; margin-bottom: .5rem; overflow: hidden; }
.ev-places-gauge-fill { height: 100%; background: #f59e0b; border-radius: var(--r-pill); transition: width .6s ease; }
.ev-places-label { display: flex; justify-content: space-between; font-size: .72rem; color: rgba(255,255,255,.6); margin-bottom: 1.25rem; }
.ev-places-label strong { color: #f59e0b; }
.ev-places-label--solo { margin-top: .25rem; }

.ev-cta-btn { width: 100%; text-align: center; display: block; }
.ev-cta-btn--full { background: rgba(255,255,255,.15); color: rgba(255,255,255,.7); cursor: not-allowed; }

.ev-sidebar-info { background: #fff; border-radius: var(--r-xl); border: 1.5px solid #e8eff8; padding: 1.4rem; margin-bottom: 1.25rem; }
.ev-sidebar-info h4 { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--c-muted); margin: 0 0 .9rem; }
.ev-sidebar-row { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid #f0f5fb; font-size: .83rem; }
.ev-sidebar-row:last-child { border-bottom: none; padding-bottom: 0; }
.ev-sidebar-row-label { color: var(--c-muted); flex-shrink: 0; }
.ev-sidebar-row-value { color: var(--c-navy); font-weight: 600; text-align: right; }

.ev-share { background: #fff; border-radius: var(--r-xl); border: 1.5px solid #e8eff8; padding: 1.2rem 1.4rem; display: flex; gap: .75rem; align-items: center; }
.ev-share-label { font-size: .78rem; font-weight: 600; color: var(--c-muted); flex: 1; }
.share-btn { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #dde5f0; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--c-muted); font-size: .8rem; font-weight: 700; transition: all var(--t-fast); text-decoration: none; }
.share-btn:hover { border-color: var(--c-sky); color: var(--c-sky); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
	.ev-layout { grid-template-columns: 1fr; }
	.ev-sidebar { position: static; order: -1; }
}
@media (max-width: 800px) {
	.ev-card { grid-template-columns: 64px 1fr; }
	.ev-card-actions { display: none; }
	.agenda-controls { top: 0; }
}
@media (max-width: 540px) {
	.ev-info-grid { grid-template-columns: 1fr; }
	.ev-checklist { grid-template-columns: 1fr; }
	.ev-nav { grid-template-columns: 1fr; }
	.ev-nav-btn--next { text-align: left; }
}
