/* Styles extraits de single.php — servis en fichier cacheable (voir colibris_enqueue_template_css). */

/* ══════════════════════════════════════════════════════════════════
   SINGLE POST,  template harmonisé avec la page home
══════════════════════════════════════════════════════════════════ */

/* ── HERO SECTION ───────────────────────────────────────────────── */
.sp-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #1a1612;
}

.sp-hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('../../images/schools/hero-ecoles.webp');
    background-size: cover;
    background-position: center 30%;
    transform: scale(1.04);
    transition: transform 8s ease-out;
}

.sp-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26,22,18,0.1) 0%,
        rgba(26,22,18,0.35) 50%,
        rgba(26,22,18,0.75) 100%
    );
}

.sp-hero__body {
    position: relative;
    z-index: 2;
    padding: 100px 24px 80px;
    max-width: 1160px;
    margin: 0 auto;
    width: 100%;
}

.sp-hero__category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #009C8E;
    margin-bottom: 24px;
}

.sp-hero__category::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: #009C8E;
    border-radius: 1px;
}

.sp-hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
    max-width: 900px;
}

.sp-hero__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.sp-hero__date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-hero__date svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* ── CONTENT SECTION ───────────────────────────────────────────── */
.sp-content {
    padding: 80px 24px;
    background: #fff;
}

.sp-content__inner {
    max-width: 800px;
    margin: 0 auto;
}

.sp-content__featured-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0ece6;
    border-radius: 20px;
    margin-bottom: 48px;
    box-shadow: 0 4px 32px rgba(26,22,18,0.08);
}

.sp-content__featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-content__body {
    font-size: clamp(1.05rem, 1.4vw, 1.15rem);
    line-height: 1.85;
    color: #3d3630;
}

.sp-content__body h2,
.sp-content__body h3 {
    font-weight: 700;
    color: #1a1612;
    margin: 2.5em 0 1em;
    letter-spacing: -0.02em;
}

.sp-content__body h2 {
    font-size: clamp(1.5rem, 2.2vw, 1.8rem);
}

.sp-content__body h3 {
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
}

.sp-content__body p {
    margin-bottom: 1.5em;
}

.sp-content__body ul,
.sp-content__body ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
}

.sp-content__body li {
    margin-bottom: 0.75em;
}

.sp-content__body a {
    color: #009C8E;
    text-decoration: none;
    border-bottom: 2px solid #009C8E;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.sp-content__body a:hover {
    color: #00867a;
    border-color: #00867a;
}

.sp-content__body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em 0;
    box-shadow: 0 2px 16px rgba(26,22,18,0.06);
}

/* ─── GALERIE GUTENBERG ─────────────────────────────────────────────
   Le thème ne charge pas la feuille wp-block-library : sans elle, les
   images d'une galerie s'empilent. On remet une grille propre, scopée
   au corps de l'article. */
.sp-content__body .wp-block-gallery.has-nested-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 2.4em 0;
}
.sp-content__body .wp-block-gallery.has-nested-images figure.wp-block-image {
    margin: 0;
    display: block;
}
.sp-content__body .wp-block-gallery.has-nested-images figure.wp-block-image img {
    width: 100%;
    height: 100%;
    margin: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: none;
    display: block;
}
@media (max-width: 720px) {
    .sp-content__body .wp-block-gallery.has-nested-images { grid-template-columns: repeat(2, 1fr); }
}
.sp-content__body .wp-block-gallery img,
.sp-content__body figure.wp-block-image img { cursor: zoom-in; }

/* ─── LIGHTBOX (vanilla, alignée sur le style .pc-lb / .ngal-lb du thème) ── */
.sp-lb { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(20,16,12,0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sp-lb.is-open { display: flex; }
.sp-lb__img { max-width: 88vw; max-height: 84vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); object-fit: contain; background: #1a1612; }
.sp-lb__btn { position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, border-color 0.2s ease; }
/* Taille explicite : sans ça, l'inline-SVG se réduit à width:0 dans le bouton
   flex (auto-sizing), donc l'icône disparaît alors que le bouton reste. */
.sp-lb__btn svg { width: 22px; height: 22px; flex: 0 0 auto; display: block; }
.sp-lb__btn:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }
.sp-lb__close { top: 24px; right: 24px; }
.sp-lb__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.sp-lb__next { right: 24px; top: 50%; transform: translateY(-50%); }
.sp-lb__counter { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 0.9rem; letter-spacing: 0.04em; background: rgba(0,0,0,0.3); padding: 6px 14px; border-radius: 20px; }
@media (max-width: 600px) { .sp-lb__prev { left: 12px; } .sp-lb__next { right: 12px; } .sp-lb__btn { width: 42px; height: 42px; } }

.sp-content__body blockquote {
    border-left: 4px solid #009C8E;
    padding: 24px 32px;
    margin: 2em 0;
    background: #faf8f5;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #5a534d;
}

/* ─── TAGS SECTION ─────────────────────────────────────────────── */
.sp-tags {
    padding: 48px 24px;
    background: #faf8f5;
    border-top: 1px solid #f0ede8;
}

.sp-tags__inner {
    max-width: 800px;
    margin: 0 auto;
}

.sp-tags__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a09892;
    margin-bottom: 16px;
}

.sp-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sp-tags__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid #ede8e2;
    color: #5a534d;
    background: #fff;
    transition: all 0.2s ease;
}

.sp-tags__tag:hover {
    border-color: #1a1612;
    color: #1a1612;
    background: #faf8f5;
}

/* ─── NAVIGATION SECTION ─────────────────────────────────────────── */
.sp-nav {
    padding: 48px 24px;
    background: #fff;
    border-top: 1px solid #f0ede8;
}

.sp-nav__inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.sp-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #ede8e2;
    color: #5a534d;
    background: #fff;
    transition: all 0.3s ease;
    max-width: 48%;
}

.sp-nav__link:hover {
    border-color: #1a1612;
    color: #1a1612;
    background: #faf8f5;
    transform: translateY(-2px);
}

.sp-nav__link svg {
    width: 20px;
    height: 20px;
}

.sp-nav__link--prev svg {
    transform: rotate(180deg);
}

.sp-nav__link--title {
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.sp-nav__link--label {
    font-size: 0.8rem;
    color: #a09892;
    font-weight: 500;
}

/* ─── CTA SECTION ─────────────────────────────────────────────────── */
.sp-cta {
    padding: 88px 24px;
    background: linear-gradient(160deg, #faf8f5 0%, #fff 100%);
    border-top: 1px solid #f0ede8;
}

.sp-cta__inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.sp-cta__title {
    font-size: clamp(1.5rem, 2.2vw, 1.8rem);
    font-weight: 700;
    color: #1a1612;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.sp-cta__text {
    font-size: 1.05rem;
    color: #5a534d;
    margin: 0 0 32px;
    line-height: 1.65;
}

.sp-cta__buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sp-cta__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sp-cta__button--primary {
    background: #1a1612;
    color: #fff;
    border: 2px solid #1a1612;
}

.sp-cta__button--primary:hover {
    background: #2d2620;
    border-color: #2d2620;
    transform: translateY(-2px);
}

.sp-cta__button--secondary {
    background: #fff;
    color: #1a1612;
    border: 2px solid #ede8e2;
}

.sp-cta__button--secondary:hover {
    border-color: #1a1612;
    transform: translateY(-2px);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sp-hero {
        min-height: 400px;
    }

    .sp-hero__body {
        padding: 80px 20px 60px;
    }

    .sp-hero__title {
        font-size: 2rem;
    }

    .sp-content {
        padding: 48px 20px;
    }

    .sp-content__featured-image {
        border-radius: 16px;
    }

    .sp-nav__inner {
        flex-direction: column;
    }

    .sp-nav__link {
        max-width: 100%;
    }
}
