/* Page d'accueil d'Educatii (annuaire des écoles) — complète horizon.css */
.ed-hero { position: relative; isolation: isolate; color: #fff; overflow: visible; z-index: 5; background: radial-gradient(900px 420px at 90% -10%, rgba(214, 51, 108, .55), transparent 60%), radial-gradient(700px 400px at 0 120%, rgba(56, 189, 248, .35), transparent 60%), linear-gradient(140deg, #140c33, #3b1f7a 55%, #6c3fb5); }
.ed-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18; background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.ed-hero .hz-wrap { padding-block: clamp(26px, 3.2vw, 44px) clamp(28px, 3.4vw, 46px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 40px; align-items: end; }
.ed-hero h1 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem); max-width: none; margin: 6px 0 0; }
.ed-hero h1 em { font-style: normal; background: linear-gradient(90deg, #ffd166, #ff8fab); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ed-hero p.lead { font-size: .98rem; opacity: .88; max-width: 62ch; margin: 6px 0 0; }
.ed-search { display: flex; gap: 8px; padding: 6px; margin-top: 18px; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(10, 6, 30, .35); max-width: 640px; }
.ed-search input { flex: 1; min-width: 0; border: 0; padding: 0 14px; font: 500 1.02rem var(--font-body); color: #141824; background: transparent; }
.ed-search input:focus { outline: none; }
.ed-search .hz-btn { min-height: 46px; border-radius: 12px; }
.ed-towns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; font-size: .88rem; }
.ed-towns span { opacity: .75; margin-right: 4px; }
.ed-towns button { border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 999px; padding: 6px 12px; font: 600 .84rem var(--font-body); cursor: pointer; }
.ed-towns button:hover { background: rgba(255, 255, 255, .18); }
.ed-hero__card { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 18px; padding: 14px 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; gap: 22px; }
.ed-stat { display: flex; align-items: center; gap: 10px; }
.ed-stat b { font: 800 1.45rem/1 var(--font-head); }
.ed-stat span { opacity: .8; font-size: .8rem; }
.ed-stat i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); font-style: normal; font-size: 18px; flex: none; }

.ed-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.ed-toolbar h2 { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
.ed-active { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-active .hz-chip { cursor: default; }
.ed-filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 26px; box-shadow: var(--shadow); }
.ed-filters summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-weight: 700; }
.ed-filters summary::-webkit-details-marker { display: none; }
.ed-filters summary::after { content: "▾"; margin-left: auto; transition: transform .2s; color: var(--ink-3); }
.ed-filters[open] summary::after { transform: rotate(180deg); }
.ed-filters form { padding: 0 20px 20px; display: grid; gap: 16px; }
.ed-filters__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ed-filters select[multiple] { min-height: 110px; padding: 6px; }
.ed-checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.ed-filters__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.ed-schools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .ed-schools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ed-schools { grid-template-columns: 1fr; } }
.ed-school { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.ed-school:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ed-school__media { position: relative; overflow: hidden; aspect-ratio: 2.4 / 1; background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); }
.ed-school__media img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ed-school__logo { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid var(--line); object-fit: contain; padding: 3px; }
.ed-school__logo--ph { display: grid; place-items: center; padding: 0; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: .85rem; border: 0; }
.ed-school__badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.ed-school__badges span { background: rgba(255, 255, 255, .92); color: #141824; border-radius: 999px; padding: 3px 10px; font-size: .74rem; font-weight: 700; }
.ed-school__badges span.site { background: #10b981; color: #fff; margin-left: auto; }
.ed-school__body { padding: 12px 14px 10px; display: grid; gap: 10px; flex: 1; align-content: start; }
.ed-school__head { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ed-school__title { min-width: 0; }
.ed-school h3 { margin: 0; font-size: .98rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ed-school h3 a { color: var(--ink); text-decoration: none; }
.ed-school h3 a::after { content: ""; position: absolute; inset: 0; }
.ed-school__where { color: var(--ink-3); font-size: .8rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-school__slogan { color: var(--ink-2); font-size: .9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ed-tags { display: flex; flex-wrap: nowrap; gap: 5px; overflow: hidden; }
.ed-tags span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; padding: 3px 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-weight: 600; }
.ed-tags span.more { flex: none; background: var(--brand-soft); color: var(--brand-ink); }
.ed-school__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-3); }
.ed-school__foot strong { color: var(--brand); position: relative; z-index: 1; }

.ed-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.ed-how div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.ed-how div::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: 22px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; font-weight: 800; }
.ed-how h3 { margin-top: 8px; }
.ed-how p { color: var(--ink-2); margin: 0; }

@media (max-width: 1080px) { .ed-filters__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .ed-hero .hz-wrap { grid-template-columns: 1fr; }
  .ed-hero__card { justify-content: space-between; padding: 10px 14px; }
  .ed-hero p.lead { display: none; }
  .ed-stat { flex-direction: column; align-items: flex-start; gap: 6px; }
  .ed-stat b { font-size: 1.2rem; } .ed-stat i { display: none; }
  .ed-how { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 560px) {
  .ed-filters__grid { grid-template-columns: 1fr; }
  .ed-search { margin-top: 12px; }
  .ed-search input { min-height: 44px; padding: 0 8px; font-size: .95rem; }
  .ed-search .hz-btn { min-height: 44px; padding-inline: 14px; }
  .ed-search__ico { display: none; }
  .ed-hero .hz-wrap { padding-block: 18px 20px; gap: 12px; }
  .ed-nameonly { font-size: .82rem; }
}

/* ------------------------------------------------------------ recherche : champ + autocomplétion */
.ed-ac { position: relative; align-items: center; }
.ed-search__ico { padding-left: 10px; font-size: 1.1rem; }
.ed-ac__list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: #fff; color: #141824; border-radius: 16px; box-shadow: 0 24px 60px rgba(10, 6, 30, .3); max-height: 380px; overflow-y: auto; text-align: left; }
.ed-ac__list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; }
.ed-ac__list li[aria-selected="true"], .ed-ac__list li:hover { background: #f3effb; }
.ed-ac__list b { display: block; font-weight: 700; font-size: .95rem; }
.ed-ac__list small { color: #7b8294; font-size: .8rem; }
.ed-ac__list mark { background: #ffe58f; color: inherit; border-radius: 3px; padding: 0 1px; }
.ed-ac__ico { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: #f6f7fb; display: grid; place-items: center; flex: none; }
.ed-ac__empty { color: #7b8294; cursor: default !important; }
.ed-nameonly { display: inline-flex; gap: 8px; align-items: center; margin-top: 8px; font-size: .9rem; opacity: .9; cursor: pointer; }

/* ------------------------------------------------------------ filtres en pastilles */
.ed-wide { width: min(100% - 32px, 1320px); }
.ed-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 26px; align-items: start; }
.ed-panel { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; scrollbar-width: thin; }
.ed-panel__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ed-panel__head strong { font: 800 1.05rem var(--font-head); margin-right: auto; }
.ed-panel__close, .ed-panel__apply { display: none !important; }
.ed-link { border: 0; background: none; color: var(--brand); font: 600 .85rem var(--font-body); cursor: pointer; padding: 4px; }
.ed-group { border: 0; padding: 14px 0; margin: 0; border-top: 1px solid var(--line); }
.ed-group legend { font-weight: 700; font-size: .88rem; padding: 0; margin-bottom: 10px; float: left; width: 100%; }
.ed-group legend + * { clear: both; }
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-chip { position: relative; cursor: pointer; }
.ed-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ed-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: .85rem; font-weight: 600; color: var(--ink-2); transition: .12s; user-select: none; }
.ed-chip span small { color: var(--ink-3); font-weight: 600; }
.ed-chip:hover span { border-color: color-mix(in oklab, var(--brand) 45%, var(--line)); }
.ed-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.ed-chip input:checked + span small { color: rgba(255, 255, 255, .8); }
.ed-chip input:checked + span::before { content: "✓"; font-weight: 800; }
.ed-chip input:focus-visible + span { outline: 3px solid color-mix(in oklab, var(--brand) 40%, #fff); outline-offset: 2px; }
.ed-chip.is-extra { display: none; }
.ed-chips.is-expanded .ed-chip.is-extra, .ed-chips.is-searching .ed-chip.is-extra { display: inline-block; }
.ed-chip[hidden] { display: none !important; }
.ed-more { border: 1.5px dashed var(--line); background: none; border-radius: 999px; padding: 6px 12px; font: 600 .82rem var(--font-body); color: var(--brand); cursor: pointer; }
.ed-filter-search { min-height: 38px; margin-bottom: 10px; font-size: .88rem; }
.ed-hint { font-size: .78rem; color: var(--ink-3); margin: 8px 0 0; }
.ed-toolbar__right { display: flex; gap: 8px; align-items: center; }
.ed-sort { min-height: 38px; width: auto; padding: 6px 12px; font-size: .88rem; }
.ed-filters-btn { display: none; }
.ed-badge { min-width: 20px; height: 20px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .72rem; display: inline-grid; place-items: center; padding: 0 6px; }
.ed-active { margin-bottom: 18px; }
.ed-active:empty { display: none; }
.ed-active .hz-chip { cursor: pointer; }
[data-results] { transition: opacity .15s; }
[data-results].is-loading { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------------ comparateur */
.ed-compare-toggle { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .82rem; color: var(--ink-2); cursor: pointer; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--line); }
.ed-compare-toggle.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.ed-compare-toggle input { accent-color: var(--brand); }
.ed-foot-link { position: relative; z-index: 2; }
.ed-tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #120b2b; color: #fff; box-shadow: 0 -12px 40px rgba(0, 0, 0, .25); padding: 12px 0; animation: ed-up .25s ease both; }
@keyframes ed-up { from { transform: translateY(100%); } to { transform: none; } }
.ed-tray__inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ed-tray__items { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.ed-tray__item { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 4px 6px 4px 6px; font-size: .85rem; font-weight: 600; }
.ed-tray__item img { width: 24px; height: 24px; border-radius: 50%; background: #fff; object-fit: contain; }
.ed-tray__item button { border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: .7rem; }
.ed-tray .ed-hint { color: rgba(255, 255, 255, .7); margin: 0; }
.ed-tray .ed-link { color: #d9c9ff; }
.ed-tray .is-disabled { opacity: .45; pointer-events: none; }
body:has(.ed-tray:not([hidden])) .hz-fab { bottom: 90px; }
.ed-compare { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ed-compare__table { width: 100%; min-width: calc(220px + var(--n) * 220px); border-collapse: collapse; table-layout: fixed; }
.ed-compare__table th, .ed-compare__table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .93rem; }
.ed-compare__table thead th { vertical-align: bottom; background: var(--bg-2); }
.ed-compare__table thead th:first-child, .ed-compare__table tbody th { width: 220px; position: sticky; left: 0; background: var(--surface); z-index: 1; font-weight: 700; color: var(--ink-2); }
.ed-compare__table thead th:first-child { background: var(--bg-2); }
.ed-compare__table tr.is-diff td { background: color-mix(in oklab, var(--accent) 6%, var(--surface)); font-weight: 600; color: var(--ink); }
.ed-compare__table.only-diff tr.is-same { display: none; }
.ed-compare__school { display: grid; gap: 10px; }
.ed-compare__school strong { font: 800 1.02rem var(--font-head); }
.ed-compare__media { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); margin-bottom: 18px; overflow: visible; }
.ed-compare__media > img:first-child { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.ed-compare__media .ed-school__logo { position: absolute; width: 48px; height: 48px; bottom: -20px; left: 10px; box-shadow: 0 8px 20px rgba(16, 24, 40, .15); }
.ed-compare__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-diff-toggle { display: flex; gap: 8px; align-items: center; font-size: .85rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }

/* ------------------------------------------------------------ mobile : filtres en tiroir */
@media (max-width: 960px) {
  .ed-layout { grid-template-columns: 1fr; }
  .ed-filters-btn { display: inline-flex; }
  .ed-panel { position: fixed; inset: 0; top: auto; z-index: 80; max-height: 88vh; border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -20px 60px rgba(0, 0, 0, .3); padding-bottom: 90px; }
  .ed-filters-open .ed-panel { transform: none; }
  .ed-filters-open body { overflow: hidden; }
  .ed-panel__close { display: inline-grid !important; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-2); cursor: pointer; }
  .ed-panel__apply { display: flex !important; position: fixed; left: 16px; right: 16px; bottom: 16px; width: auto; }
}

.hz-infocard .hz-icon { color: #fff; }
.hz-infocard span:not(.hz-icon) { color: var(--ink-2); font-size: .9rem; }
@media (max-width: 640px) {
  .ed-compare__table { min-width: calc(130px + var(--n) * 190px); }
  .ed-compare__table thead th:first-child, .ed-compare__table tbody th { width: 130px; font-size: .82rem; padding: 10px; }
  .ed-compare__table td { padding: 10px; font-size: .86rem; }
}

/* réseaux sociaux */
.ed-social { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-social a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); transition: .15s; }
.ed-social a:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.ed-social--dark { margin-top: 16px; }
.ed-social--dark a { background: rgba(255, 255, 255, .08); color: #fff; }
.ed-social--dark a:hover { background: var(--brand); }

.ed-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ed-sent { text-align: center; padding: 20px 0; }
.ed-sent .hz-icon { margin: 0 auto 14px; background: #10b981; width: 56px; height: 56px; border-radius: 50%; }
