/* 🌅 Horizon — la vitrine publique des projets des élèves (/horizon/, app/views/horizon_layout.php).
   Reprend l'identité du site d'origine, projecthorizon.fr : nuit bleue chaude, blanc os, ambre « signal »,
   bleu de plan ; Fraunces pour les titres, IBM Plex Mono pour les repères, Inter pour le texte.
   Préfixe .hzp- (les pages prof et élève ont horizon-app.css, préfixe .hz-). */
*, *::before, *::after { box-sizing: border-box; }
:root {
    --hz-bg: #0a0e1a; --hz-bg-2: #0e1320; --hz-bg-3: #131929;
    --hz-bone: #f4efe6; --hz-bone-soft: #d6cfc1; --hz-bone-dim: #9a9485;
    --hz-amber: #e8a33d; --hz-amber-dim: rgba(232, 163, 61, .22); --hz-blueprint: #5aa8b0;
    --hz-line: rgba(244, 239, 230, .10); --hz-line-strong: rgba(244, 239, 230, .18);
    --hz-editorial: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
    --hz-tech: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --hz-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --hz-t: 180ms cubic-bezier(.2, 0, .2, 1);
}
html { -webkit-text-size-adjust: 100%; }
body.hzp { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--hz-bone); font: 16px/1.6 var(--hz-body);
           -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
           background: radial-gradient(1100px 520px at 50% -180px, rgba(232, 163, 61, .13), transparent 70%),
                       radial-gradient(900px 600px at 100% 0, rgba(90, 168, 176, .07), transparent 65%), var(--hz-bg); background-attachment: fixed; }
.hzp a { color: inherit; text-decoration: none; }
.hzp img { display: block; max-width: 100%; height: auto; }
.hzp :focus-visible { outline: 2px solid var(--hz-amber); outline-offset: 3px; }
.hzp-skip { position: absolute; left: -9999px; top: 0; padding: 10px 16px; background: var(--hz-amber); color: #0a0e1a; font-weight: 700; z-index: 20; }
.hzp-skip:focus { left: 12px; top: 12px; }
.hzp-preview { padding: 10px 20px; text-align: center; font: 500 13px/1.5 var(--hz-tech); letter-spacing: .02em; color: #0a0e1a; background: var(--hz-amber); }

/* en-tête */
.hzp-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(18px, 4vw, 40px);
              background: rgba(10, 14, 26, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--hz-line); }
.hzp-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.hzp-brand__mark { flex: 0 0 auto; width: 26px; height: 14px; border: 1.5px solid var(--hz-amber); border-bottom: 0; border-radius: 26px 26px 0 0; position: relative; }
.hzp-brand__mark::after { content: ''; position: absolute; left: -7px; right: -7px; bottom: -1.5px; height: 1.5px; background: var(--hz-bone-soft); }
.hzp-brand__name { font: 500 15px/1.2 var(--hz-tech); letter-spacing: .14em; text-transform: uppercase; color: var(--hz-bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hzp-nav { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; font: 500 12px/1 var(--hz-tech); letter-spacing: .16em; text-transform: uppercase; color: var(--hz-bone-dim); }
.hzp-nav a { transition: color var(--hz-t); }
.hzp-nav a:hover { color: var(--hz-amber); }
.hzp .lang-switch__btn { display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 9px; border: 1px solid var(--hz-line-strong); color: var(--hz-bone-soft); letter-spacing: .08em; transition: border-color var(--hz-t), color var(--hz-t); }
.hzp .lang-switch:hover .lang-switch__btn { border-color: var(--hz-amber); color: var(--hz-amber); }

.hzp-main { flex: 1 0 auto; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px) 96px; }

/* textes communs */
.hzp-kicker { margin: 0 0 18px; font: 500 12px/1.4 var(--hz-tech); letter-spacing: .2em; text-transform: uppercase; color: var(--hz-amber); }
.hzp-h1 { margin: 0; font-family: var(--hz-editorial); font-weight: 400; font-size: clamp(36px, 6vw, 64px); line-height: 1.04; letter-spacing: -.025em; color: var(--hz-bone); overflow-wrap: anywhere; }
.hzp-lead { margin: 22px auto 0; max-width: 680px; font-family: var(--hz-editorial); font-style: italic; font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--hz-bone-soft); }
.hzp-lead.hzp-prose { font-style: normal; font-family: var(--hz-body); font-size: 16.5px; }
.hzp-lead.hzp-prose ul, .hzp-lead.hzp-prose ol { display: table; margin-left: auto; margin-right: auto; text-align: left; }
.hzp-h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font: 600 12px/1.4 var(--hz-tech); letter-spacing: .2em; text-transform: uppercase; color: var(--hz-amber); }
.hzp-h2::after { content: ''; flex: 1; height: 1px; background: var(--hz-amber-dim); }
.hzp-prose { font-size: 16.5px; line-height: 1.8; color: var(--hz-bone-soft); overflow-wrap: anywhere; }
.hzp-prose > :first-child { margin-top: 0; } .hzp-prose > :last-child { margin-bottom: 0; }
.hzp-prose h3, .hzp-prose h4, .hzp-prose h5 { margin: 32px 0 10px; font-family: var(--hz-editorial); font-weight: 500; line-height: 1.25; color: var(--hz-bone); }
.hzp-prose h3 { font-size: 24px; } .hzp-prose h4 { font-size: 20px; } .hzp-prose h5 { font-size: 17px; }
.hzp-prose p { margin: 0 0 16px; }
.hzp-prose ul, .hzp-prose ol { margin: 0 0 16px; padding-left: 24px; }
.hzp-prose li { margin: 4px 0; }
.hzp-prose li::marker { color: var(--hz-amber); }
.hzp-prose a { color: var(--hz-amber); text-decoration: underline; text-decoration-color: var(--hz-amber-dim); text-underline-offset: 3px; }
.hzp-prose a:hover { text-decoration-color: var(--hz-amber); }
.hzp-prose strong { color: var(--hz-bone); font-weight: 600; }
.hzp-prose code { padding: 2px 6px; font: 14px/1.4 var(--hz-tech); color: var(--hz-bone); background: var(--hz-bg-3); border: 1px solid var(--hz-line); }
.hzp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hzp-tag { display: inline-block; padding: 4px 10px; font: 500 11px/1.3 var(--hz-tech); letter-spacing: .14em; text-transform: uppercase; color: var(--hz-bone-dim); border: 1px solid var(--hz-line-strong); }
.hzp-tag--stage { color: var(--hz-blueprint); border-color: rgba(90, 168, 176, .4); }
.hzp-tag--done { color: var(--hz-amber); border-color: rgba(232, 163, 61, .45); }
.hzp-tag--draft { color: #0a0e1a; background: var(--hz-amber); border-color: var(--hz-amber); }
.hzp-btn { display: inline-block; margin-top: 28px; padding: 12px 20px; font: 500 12px/1 var(--hz-tech); letter-spacing: .16em; text-transform: uppercase; color: var(--hz-bone); border: 1px solid var(--hz-line-strong); transition: border-color var(--hz-t), color var(--hz-t); }
.hzp-btn:hover { border-color: var(--hz-amber); color: var(--hz-amber); }
.hzp-empty { margin: 40px 0; text-align: center; font-family: var(--hz-editorial); font-style: italic; font-size: 19px; color: var(--hz-bone-dim); }
.hzp-missing { padding: 110px 0 40px; text-align: center; }
.hzp-missing .hzp-h1 { font-size: clamp(28px, 4vw, 40px); }

/* la vitrine */
.hzp-hero { padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 64px); text-align: center; }
.hzp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.hzp-card { background: var(--hz-bg-2); border: 1px solid var(--hz-line); transition: border-color var(--hz-t), transform var(--hz-t); }
.hzp-card:hover { border-color: rgba(232, 163, 61, .5); transform: translateY(-3px); }
.hzp-card.is-draft { border-style: dashed; }
.hzp-card > a { display: flex; flex-direction: column; height: 100%; }
.hzp-card__cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--hz-bg-3); border-bottom: 1px solid var(--hz-line); }
.hzp-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms cubic-bezier(.2, 0, .2, 1); }
.hzp-card:hover .hzp-card__cover img { transform: scale(1.035); }
.hzp-card__blank { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--hz-editorial); font-size: 84px; color: rgba(244, 239, 230, .14);
                   background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(90, 168, 176, .09) 31px 32px), repeating-linear-gradient(90deg, transparent 0 31px, rgba(90, 168, 176, .09) 31px 32px); }
.hzp-card__no { position: absolute; top: 12px; left: 12px; padding: 4px 8px; font: 500 11px/1 var(--hz-tech); letter-spacing: .12em; color: var(--hz-bone); background: rgba(10, 14, 26, .78); border: 1px solid var(--hz-line-strong); }
.hzp-card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.hzp-card__title { font-family: var(--hz-editorial); font-size: 26px; line-height: 1.15; letter-spacing: -.015em; color: var(--hz-bone); overflow-wrap: anywhere; }
.hzp-card__tagline { font-size: 15px; line-height: 1.55; color: var(--hz-bone-soft); }
.hzp-card__team { margin-top: auto; padding-top: 12px; font: 500 12px/1.5 var(--hz-tech); letter-spacing: .06em; color: var(--hz-bone-dim); border-top: 1px solid var(--hz-line); }
.hzp-boards { max-width: 720px; margin: 0 auto; padding: 0; list-style: none; border-top: 1px solid var(--hz-line); }
.hzp-boards a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding: 22px 4px; border-bottom: 1px solid var(--hz-line); transition: color var(--hz-t), padding var(--hz-t); }
.hzp-boards a:hover { color: var(--hz-amber); padding-left: 12px; }
.hzp-boards__title { font-family: var(--hz-editorial); font-size: 26px; line-height: 1.2; }
.hzp-boards__meta { font: 500 12px/1 var(--hz-tech); letter-spacing: .14em; text-transform: uppercase; color: var(--hz-bone-dim); }

/* la fiche d'un projet */
.hzp-proj { max-width: 920px; margin: 0 auto; padding-top: 36px; }
.hzp-back { display: inline-block; margin-bottom: 36px; font: 600 12px/1 var(--hz-tech); letter-spacing: .18em; text-transform: uppercase; color: var(--hz-bone-dim); transition: color var(--hz-t); }
.hzp-back:hover { color: var(--hz-amber); }
.hzp-proj__head { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: 44px; text-align: center; }
.hzp-proj__head .hzp-tags { justify-content: center; }
.hzp-proj__head .hzp-lead { margin-top: 0; }
.hzp-cover { position: relative; margin: 0 0 48px; background: var(--hz-bg-2); border: 1px solid var(--hz-line); }
.hzp-cover > img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #06080f; }
.hzp-cover figcaption { margin: 0; padding: 12px 20px; font-family: var(--hz-editorial); font-style: italic; font-size: 15px; color: var(--hz-bone-soft); border-top: 1px solid var(--hz-line); }
.hzp-cover figcaption[hidden] { display: none; }
.hzp-thumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-top: 1px solid var(--hz-line); }
.hzp-thumb { width: 72px; height: 46px; padding: 0; overflow: hidden; cursor: pointer; background: #06080f; border: 1px solid var(--hz-line-strong); opacity: .6; transition: opacity var(--hz-t), border-color var(--hz-t); }
.hzp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hzp-thumb:hover, .hzp-thumb.is-active { opacity: 1; }
.hzp-thumb.is-active { border-color: var(--hz-amber); }
.hzp-section { margin: 48px 0; }
.hzp-team { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; padding: 0; list-style: none; font-size: 16.5px; color: var(--hz-bone); }
.hzp-team li { display: inline-flex; align-items: center; gap: 10px; }
.hzp-team__avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 500 14px/1 var(--hz-tech); color: var(--hz-amber); border: 1px solid rgba(232, 163, 61, .5); }
.hzp-links { display: flex; flex-wrap: wrap; gap: 14px; }
.hzp-link { display: grid; gap: 6px; min-width: min(100%, 250px); padding: 16px 20px; background: var(--hz-bg-2); border: 1px solid var(--hz-line-strong); transition: border-color var(--hz-t), transform var(--hz-t); }
.hzp-link:hover { border-color: var(--hz-amber); transform: translateY(-2px); }
.hzp-link--primary { border-color: rgba(232, 163, 61, .55); }
.hzp-link__label { font: 500 11px/1.3 var(--hz-tech); letter-spacing: .16em; text-transform: uppercase; color: var(--hz-amber); }
.hzp-link__value { font-size: 16px; color: var(--hz-bone); overflow-wrap: anywhere; }
.hzp-video { position: relative; aspect-ratio: 16 / 9; background: #06080f; border: 1px solid var(--hz-line); }
.hzp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hzp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.hzp-gallery figure { margin: 0; background: var(--hz-bg-2); border: 1px solid var(--hz-line); }
.hzp-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hzp-gallery figcaption { padding: 10px 14px; font-family: var(--hz-editorial); font-style: italic; font-size: 14.5px; color: var(--hz-bone-soft); border-top: 1px solid var(--hz-line); }
.hzp-remark { margin: 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--hz-amber); font-family: var(--hz-editorial); font-style: italic; font-size: 20px; line-height: 1.6; color: var(--hz-bone); overflow-wrap: anywhere; }

.hzp-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 26px clamp(18px, 4vw, 40px); font: 500 11.5px/1.5 var(--hz-tech); letter-spacing: .12em; text-transform: uppercase; color: var(--hz-bone-dim); border-top: 1px solid var(--hz-line); }
.hzp-footer a:hover { color: var(--hz-amber); }

@media (max-width: 640px) {
    .hzp-brand__name { font-size: 13px; letter-spacing: .1em; }
    .hzp-nav { gap: 12px; letter-spacing: .1em; }
    .hzp-nav > a:not(.lang-switch) { display: none; }
    .hzp-grid { gap: 20px; }
    .hzp-section { margin: 36px 0; }
    .hzp-remark { font-size: 18px; padding-left: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .hzp *, .hzp *::before, .hzp *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .hzp-card:hover, .hzp-link:hover { transform: none; }
}
@media print {
    body.hzp { background: #fff; color: #111; }
    .hzp-header, .hzp-footer, .hzp-preview, .hzp-back, .hzp-thumbs { display: none; }
}
