/* =====================================================================
   Project Horizon — project.css (Foundation / Apollo Archives)
   Page détail d'un projet : cover + équipe + présentation + galerie +
   vidéo + téléchargement + mot du prof.
   ===================================================================== */

.ph-project .ph-main { padding: 0; }

/* ---------- Container article ---------------------------------------- */

.proj {
    max-width: 920px;
    margin: 0 auto;
    padding: 40px 32px 96px;
    position: relative;
}
.proj::before,
.proj::after {
    content: '';
    position: absolute;
    width: 24px; height: 24px;
    border: 1px solid var(--c-amber);
    opacity: 0.55;
}
.proj::before {
    top: 32px; left: 32px;
    border-right: 0; border-bottom: 0;
}
.proj::after {
    bottom: 64px; right: 32px;
    border-left: 0; border-top: 0;
}

.proj__back {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-tech);
    color: var(--c-bone-dim);
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 36px;
    transition: color var(--t-fast);
}
.proj__back:hover { color: var(--c-amber); }

/* ---------- Header --------------------------------------------------- */

.proj__head {
    display: flex; flex-direction: column;
    align-items: center;          /* titre + meta centres */
    text-align: center;
    gap: 18px;
    margin-bottom: 48px;
    position: relative;
}

.proj__head-meta {
    display: flex; flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;       /* pills centrees */
}
.proj__level {
    display: inline-block;
    padding: 4px 11px;
    font-family: var(--font-tech);
    font-size: 10px; font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid;
    background: transparent;
}
.proj__level--terminale {
    color: var(--c-amber);
    border-color: rgba(232, 163, 61, 0.40);
}
.proj__level--premiere {
    color: var(--c-blueprint);
    border-color: rgba(90, 168, 176, 0.40);
}
.proj__title {
    font-family: var(--font-editorial);
    font-weight: 400;
    font-size: clamp(36px, 5.5vw, 56px);
    margin: 0;
    letter-spacing: -0.025em;
    color: var(--c-bone);
    line-height: 1.05;
}

/* ---------- Hero (cover + caption + thumbs) -------------------------- */

.proj__hero {
    position: relative;
    margin: 0 0 48px;
    overflow: hidden;
    background: var(--bg-warm-2);
    border: 1px solid rgba(244, 239, 230, 0.10);
}
.proj__hero-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.proj__hero-caption {
    margin: 0;
    padding: 14px 22px;
    background: rgba(10, 14, 26, 0.70);
    backdrop-filter: blur(8px);
    color: var(--c-bone-soft);
    font-family: var(--font-editorial);
    font-style: italic;
    font-size: 14px;
    border-top: 1px solid rgba(244, 239, 230, 0.10);
}
.proj__hero-caption[hidden] { display: none; }

.proj__thumbs {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    padding: 5px;
    background: rgba(10, 14, 26, 0.80);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(244, 239, 230, 0.10);
}
.proj__thumb {
    width: 56px; height: 36px;
    padding: 0;
    overflow: hidden;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: border-color var(--t-fast), transform var(--t-fast);
}
.proj__thumb img { width: 100%; height: 100%; object-fit: cover; }
.proj__thumb:hover { transform: translateY(-1px); }
.proj__thumb.is-active { border-color: var(--c-amber); }

/* Si pas de caption, le hero n'a pas la barre du bas → thumbs alignées plus bas */
.proj__hero-caption[hidden] ~ .proj__thumbs,
.proj__hero:not(:has(.proj__hero-caption:not([hidden]))) .proj__thumbs {
    bottom: 14px;
}

/* ---------- Sections ------------------------------------------------- */

.proj__section {
    margin: 48px 0;
}
.proj__h2 {
    font-family: var(--font-tech);
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--c-amber);
    margin: 0 0 22px;
    display: flex; align-items: center; gap: 14px;
}
.proj__h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(232, 163, 61, 0.20);
}

.proj__lead {
    font-family: var(--font-editorial);
    font-style: italic;
    font-weight: 400;
    font-size: 19px;
    line-height: 1.55;
    color: var(--c-bone-soft);
    margin: 0;
}

.proj__prose {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    color: var(--c-bone-soft);
}

/* ---------- Équipe (override des styles base.css pour la page détail) - */

.proj__team {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.proj__team .tm {
    padding: 14px 16px;
    background: var(--bg-warm-2);
    border-color: rgba(244, 239, 230, 0.10);
    transition: background var(--t-base), border-color var(--t-base);
}
.proj__team .tm:hover {
    background: var(--bg-warm-3);
    border-color: var(--accent, rgba(232, 163, 61, 0.40));
}
.proj__team .tm__avatar {
    width: 56px; height: 56px;
}
.proj__team .tm__name {
    font-size: 15px;
}

/* ---------- Galerie (images additionnelles avec captions) ------------ */

.proj__gallery {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .proj__gallery { grid-template-columns: 1fr 1fr; }
}
.proj__gallery-item {
    margin: 0;
    overflow: hidden;
    background: var(--bg-warm-2);
    border: 1px solid rgba(244, 239, 230, 0.10);
    transition: border-color var(--t-base);
}
.proj__gallery-item:hover {
    border-color: rgba(232, 163, 61, 0.40);
}
.proj__gallery-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.proj__gallery-item figcaption {
    padding: 12px 18px;
    color: var(--c-bone-soft);
    font-family: var(--font-editorial);
    font-style: italic;
    font-size: 13px;
    line-height: 1.5;
}

/* ---------- Vidéo (réutilise styles modal) --------------------------- */

.proj__video {
    margin-top: 0;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-warm-3);
    border: 1px solid rgba(244, 239, 230, 0.10);
}
.proj__video iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ---------- Boutons -------------------------------------------------- */

.proj__btn {
    display: inline-flex; align-items: center;
    gap: 12px;
    padding: 14px 28px;
    font-family: var(--font-tech);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    border: 1px solid rgba(244, 239, 230, 0.20);
    background: transparent;
    color: var(--c-bone);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast),
                border-color var(--t-fast);
    text-decoration: none;
}
.proj__btn--primary {
    background: transparent;
    color: var(--c-amber);
    border-color: var(--c-amber);
}
.proj__btn--primary:hover {
    background: var(--c-amber);
    color: var(--bg-warm);
    box-shadow: 0 0 20px rgba(232, 163, 61, 0.40);
}
.proj__btn--ghost {
    color: var(--c-bone-soft);
}
.proj__btn--ghost:hover {
    background: rgba(244, 239, 230, 0.04);
    border-color: var(--c-bone-soft);
}

/* ---------- Mot du professeur (encart cité) -------------------------- */

.proj__remark-section {
    margin-top: 64px;
}
.proj__remark {
    margin: 0;
    padding: 32px 36px 32px 40px;
    background: rgba(232, 163, 61, 0.04);
    border: 1px solid rgba(232, 163, 61, 0.25);
    border-left: 2px solid var(--c-amber);
    color: var(--c-bone);
    font-family: var(--font-editorial);
    font-style: italic;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    position: relative;
}
.proj__remark::before {
    content: '§';
    position: absolute;
    top: 12px; right: 18px;
    font-family: var(--font-editorial);
    font-style: italic;
    font-size: 32px;
    color: var(--c-amber);
    opacity: 0.45;
    line-height: 1;
}

/* ---------- 404 ------------------------------------------------------ */

.proj-404 {
    min-height: 60vh;
    display: flex; align-items: center; justify-content: center;
    padding: 32px;
}
.proj-404__inner { text-align: center; }
.proj-404 h1 {
    font-family: var(--font-editorial);
    font-weight: 400;
    font-size: 36px;
    margin: 0 0 28px;
    color: var(--c-bone);
    letter-spacing: -0.02em;
}

/* ---------- Responsive ----------------------------------------------- */

@media (max-width: 600px) {
    .proj { padding: 28px 20px 64px; }
    .proj::before, .proj::after { display: none; }
    .proj__hero-caption { padding: 10px 16px; font-size: 13px; }
    .proj__thumbs { bottom: 52px; }
    .proj__remark { padding: 24px 24px 24px 28px; }
}
