/* Arrière-plans visuels par section — Afyra Teach */

.teach-visual-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.teach-visual-section > .container,
.teach-visual-section > .etudes-contact-card {
    position: relative;
    z-index: 2;
}

.teach-visual-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--teach-bg-image);
    background-size: cover;
    background-position: var(--teach-bg-position, center);
    background-repeat: no-repeat;
    transform: scale(1.02);
    filter: saturate(1.05) contrast(1.02);
}

.teach-visual-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--teach-bg-overlay);
    pointer-events: none;
}

.teach-bg-hero {
    --teach-bg-image: url("../images/backgrounds/hero-campus.jpg");
    --teach-bg-position: center 35%;
}

/* Hero : photo pleine largeur + fondu navy */
.etudes-hero.teach-visual-section::before {
    opacity: 0.42;
    background-position: center 35%;
}
.etudes-hero.teach-visual-section::after {
    background:
        linear-gradient(125deg, rgba(7, 28, 49, 0.94) 0%, rgba(11, 42, 74, 0.82) 42%, rgba(20, 58, 95, 0.78) 100%),
        radial-gradient(ellipse at 12% 20%, rgba(245, 197, 24, 0.18), transparent 50%),
        radial-gradient(ellipse at 88% 75%, rgba(31, 138, 76, 0.2), transparent 45%);
}

.teach-bg-mali {
    --teach-bg-image: url("../images/backgrounds/mali-africa.jpg");
    --teach-bg-position: center;
    --teach-bg-overlay: linear-gradient(180deg, rgba(238, 242, 248, 0.94) 0%, rgba(244, 246, 250, 0.88) 55%, rgba(238, 242, 248, 0.96) 100%);
}
.teach-bg-mali::before { opacity: 0.22; background-position: center 60%; }

.teach-bg-offer {
    --teach-bg-image: url("../images/backgrounds/parcours-university.jpg");
    --teach-bg-overlay: linear-gradient(165deg, rgba(255, 255, 255, 0.93) 0%, rgba(248, 250, 253, 0.9) 40%, rgba(255, 255, 255, 0.94) 100%);
}
.teach-bg-offer::before { opacity: 0.16; background-position: center 30%; }

.teach-bg-form {
    --teach-bg-image: url("../images/backgrounds/inscription-desk.jpg");
    --teach-bg-overlay: linear-gradient(100deg, rgba(244, 246, 250, 0.95) 0%, rgba(244, 246, 250, 0.88) 45%, rgba(238, 242, 248, 0.92) 100%);
}
.teach-bg-form::before { opacity: 0.14; background-position: right center; }

.teach-bg-services {
    --teach-bg-image: url("../images/backgrounds/services-team.jpg");
    --teach-bg-overlay: linear-gradient(180deg, rgba(238, 242, 248, 0.92) 0%, rgba(232, 238, 246, 0.88) 100%);
}
.teach-bg-services::before { opacity: 0.18; }

.teach-bg-france {
    --teach-bg-image: url("../images/backgrounds/france-paris.jpg");
    --teach-bg-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.9) 100%);
}
.teach-bg-france::before { opacity: 0.12; background-position: center 40%; }

.teach-bg-steps {
    --teach-bg-image: url("../images/backgrounds/etapes-travel.jpg");
    --teach-bg-overlay: linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(248, 250, 252, 0.9) 100%);
}
.teach-bg-steps::before { opacity: 0.15; background-position: center; }

.teach-bg-faq {
    --teach-bg-image: url("../images/backgrounds/faq-library.jpg");
    --teach-bg-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 251, 253, 0.92) 100%);
}
.teach-bg-faq::before { opacity: 0.1; }

.teach-bg-contact {
    --teach-bg-image: url("../images/backgrounds/contact-meeting.jpg");
    --teach-bg-overlay: linear-gradient(180deg, rgba(238, 242, 248, 0.9) 0%, rgba(228, 234, 242, 0.88) 100%);
}
.teach-bg-contact::before { opacity: 0.2; }

/* Cartes glass sur fonds photo */
.teach-visual-section .etudes-market-card,
.teach-visual-section .etudes-card,
.teach-visual-section .etudes-service,
.teach-visual-section .etudes-sector-card,
.teach-visual-section .teach-guide-card,
.teach-visual-section .etudes-city-grid article,
.teach-visual-section .afyra-landing-faq-item,
.teach-visual-section .afyra-stepper li,
.teach-visual-section .etudes-form-card,
.teach-visual-section .etudes-local-context {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.teach-visual-section .etudes-forfait-banner {
    box-shadow: 0 20px 48px rgba(11, 42, 74, 0.22);
}

/* Motif décoratif coin section */
.teach-visual-section .container::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -20px;
    top: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 138, 76, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

@media (max-width: 768px) {
    .teach-visual-section::before { opacity: calc(var(--teach-bg-mobile-opacity, 0.12)); }
    .teach-bg-mali::before,
    .teach-bg-offer::before,
    .teach-bg-form::before,
    .teach-bg-services::before,
    .teach-bg-france::before,
    .teach-bg-steps::before,
    .teach-bg-faq::before,
    .teach-bg-contact::before {
        opacity: 0.1;
    }
}

/* Sections : laisser transparaître les visuels */
.teach-visual-section.etudes-markets,
.teach-visual-section.etudes-offer,
.teach-visual-section.etudes-form-section,
.teach-visual-section.etudes-services,
.teach-visual-section.etudes-france,
.teach-visual-section.etudes-steps,
.teach-visual-section.afyra-landing-faq,
.teach-visual-section.etudes-contact {
    background: transparent;
}

.etudes-hero-aside {
    display: grid;
    gap: 1rem;
}

.etudes-hero-visual {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35);
    aspect-ratio: 4 / 3;
}

.etudes-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.etudes-hero-visual__badge {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--afyra-navy);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
}

.teach-visual-section .container {
    position: relative;
}

.teach-section-divider {
    height: 6px;
    background: linear-gradient(90deg, var(--afyra-navy), var(--afyra-green), var(--afyra-yellow), var(--afyra-orange));
    opacity: 0.85;
}

.teach-page.teach-visual-section {
    padding: calc(var(--pub-nav-h) + 2rem) 0 3.5rem;
    min-height: 50vh;
}

.teach-page-inner {
    position: relative;
    z-index: 2;
}

.teach-guide-block {
    margin: 0 0 1.25rem;
    padding: 1.4rem 1.45rem 1.5rem;
    border-radius: var(--radius-md, 16px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--afyra-border);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    scroll-margin-top: calc(var(--pub-nav-h, 76px) + 1rem);
}

.teach-guide-block__num {
    margin: 0 0 0.35rem;
    color: var(--afyra-green);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.teach-guide-block h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.15rem, 1rem + 0.6vw, 1.35rem);
    font-weight: 800;
    color: var(--afyra-navy);
    line-height: 1.3;
}

.teach-guide-block p,
.teach-guide-block li {
    color: var(--afyra-muted);
    line-height: 1.7;
}

.teach-guide-block > p {
    margin: 0 0 0.85rem;
}

.teach-guide-hero {
    display: grid;
    gap: 1.35rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

@media (min-width: 900px) {
    .teach-guide-hero {
        grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
        gap: 1.75rem;
    }
}

.teach-guide-hero__media {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(11, 42, 74, 0.1);
    box-shadow: 0 16px 36px rgba(11, 42, 74, 0.12);
    min-height: 200px;
    background: var(--afyra-navy);
}

.teach-guide-hero__media img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    display: block;
}

.teach-guide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    margin: 1rem 0 0;
    color: var(--afyra-muted);
    font-size: 0.84rem;
    font-weight: 650;
}

.teach-guide-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.teach-guide-takeaways {
    margin: 0 0 1.5rem;
    padding: 1.2rem 1.3rem;
    border-radius: 16px;
    border: 1px solid rgba(31, 138, 76, 0.28);
    background: linear-gradient(180deg, #f3fbf6 0%, #eaf7ef 100%);
}

.teach-guide-takeaways h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 850;
    color: var(--afyra-navy);
}

.teach-guide-takeaways ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.teach-guide-takeaways li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem;
    align-items: start;
    color: #2d445f;
    font-size: 0.92rem;
    line-height: 1.5;
}

.teach-guide-takeaways i {
    color: var(--afyra-green);
    margin-top: 0.15rem;
}

.teach-guide-layout {
    display: grid;
    gap: 1.35rem;
    align-items: start;
}

@media (min-width: 992px) {
    .teach-guide-layout {
        grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
        gap: 1.75rem;
    }
}

.teach-guide-toc {
    padding: 1.1rem 1.15rem;
    border-radius: 16px;
    border: 1px solid var(--afyra-border);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 992px) {
    .teach-guide-toc {
        position: sticky;
        top: calc(var(--pub-nav-h, 76px) + 1rem);
    }
}

.teach-guide-toc__title {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--afyra-navy);
}

.teach-guide-toc ol {
    margin: 0 0 1rem;
    padding: 0 0 0 1.1rem;
    display: grid;
    gap: 0.45rem;
}

.teach-guide-toc a {
    color: #3a4d66;
    text-decoration: none;
    font-size: 0.86rem;
    line-height: 1.4;
    font-weight: 650;
}

.teach-guide-toc a:hover {
    color: var(--afyra-green);
}

.teach-guide-toc__cta {
    width: 100%;
    justify-content: center;
}

.teach-guide-steps {
    margin: 0.85rem 0 1rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
    counter-reset: guide-step;
}

.teach-guide-steps li {
    counter-increment: guide-step;
    display: grid;
    grid-template-columns: 1.85rem 1fr;
    gap: 0.65rem;
    align-items: start;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: #f5f8fc;
    border: 1px solid #e4ebf3;
    color: #2d445f;
    font-size: 0.9rem;
}

.teach-guide-steps li::before {
    content: counter(guide-step);
    display: grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(31, 138, 76, 0.18), rgba(245, 197, 24, 0.25));
    color: var(--afyra-green-dark, #157a42);
    font-weight: 850;
    font-size: 0.82rem;
}

.teach-guide-table-wrap {
    overflow-x: auto;
    margin: 0.9rem 0 1rem;
    border-radius: 12px;
    border: 1px solid #e0e8f1;
}

.teach-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    min-width: 420px;
}

.teach-guide-table th,
.teach-guide-table td {
    padding: 0.7rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e8eef5;
    vertical-align: top;
}

.teach-guide-table th {
    background: #f0f5fa;
    color: var(--afyra-navy);
    font-weight: 800;
}

.teach-guide-table tr:last-child td {
    border-bottom: 0;
}

.teach-guide-docs {
    margin: 0.9rem 0 1rem;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    background: #fffaf0;
    border: 1px solid rgba(246, 166, 35, 0.35);
}

.teach-guide-docs__title {
    margin: 0 0 0.55rem;
    color: var(--afyra-navy);
    font-weight: 850;
    font-size: 0.92rem;
}

.teach-guide-docs ul {
    margin: 0;
    padding-left: 1.15rem;
}

.teach-guide-list {
    margin: 0.75rem 0 1rem;
    padding-left: 1.2rem;
}

.teach-guide-callout {
    margin: 1rem 0 0;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #2d445f;
}

.teach-guide-callout--tip {
    background: #eef9f2;
    border: 1px solid rgba(31, 138, 76, 0.28);
}

.teach-guide-callout--warn {
    background: #fff5f3;
    border: 1px solid rgba(220, 53, 69, 0.25);
}

.teach-guide-end {
    margin-top: 2.5rem;
    padding: 1.75rem 0 0.25rem;
    border-top: 1px solid var(--afyra-border);
    clear: both;
}

.teach-guide-related {
    margin: 0 0 1.35rem;
}

.teach-guide-related h2 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-weight: 850;
    color: var(--afyra-navy);
}

.teach-guides-grid--related {
    grid-template-columns: 1fr;
    max-width: 40rem;
}

.teach-guides-grid--related .teach-guide-card {
    grid-template-columns: 1fr;
}

@media (min-width: 560px) {
    .teach-guides-grid--related .teach-guide-card {
        grid-template-columns: minmax(120px, 36%) minmax(0, 1fr);
    }
}

.teach-guide-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
    margin: 0 0 0.5rem;
    padding: 1.15rem 1.1rem 1.2rem;
    border: 1px solid var(--afyra-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

.teach-guide-actions .pub-btn {
    flex: 0 1 auto;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
}

.teach-guide-actions .pub-btn-primary {
    flex: 1 1 100%;
    width: 100%;
    min-width: 100%;
    order: 10;
    margin-top: 0.15rem;
}

.teach-guides-article.teach-page {
    padding-bottom: 4.75rem;
}

@media (max-width: 991.98px) {
    .teach-guide-layout {
        gap: 1rem;
    }
    .teach-guide-toc {
        position: static;
    }
    .teach-guide-toc ol {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

@media (max-width: 640px) {
    .teach-page.teach-visual-section,
    .teach-guides-article.teach-page {
        padding: calc(var(--pub-nav-h) + 1.15rem) 0 3rem;
    }
    .teach-guide-hero {
        gap: 1rem;
        margin-bottom: 1.15rem;
    }
    .teach-guide-hero__media {
        border-radius: 14px;
        max-height: 200px;
    }
    .teach-guide-hero__media img {
        max-height: 200px;
        object-fit: cover;
    }
    .teach-guide-takeaways {
        padding: 1rem;
    }
    .teach-guide-block {
        padding: 1rem 0.95rem 1.1rem;
        border-radius: 14px;
    }
    .teach-guide-table {
        min-width: 340px;
        font-size: 0.84rem;
    }
    .teach-guide-actions {
        padding: 1rem 0.85rem;
    }
    .teach-guide-actions .pub-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
    .teach-guide-end {
        margin-top: 1.75rem;
        padding-top: 1.25rem;
    }
    .teach-guides-hero {
        gap: 1.15rem;
        margin-bottom: 1.35rem;
    }
    .teach-seo-strip {
        padding: 1.25rem 0 1.4rem;
    }
    .teach-seo-strip__lead,
    .teach-seo-strip__queries {
        font-size: 0.82rem;
    }
}

.etudes-hero.teach-visual-section {
    background: var(--afyra-navy-deep);
}

/* Page index /guides */
.teach-guides-index .pub-section-sub {
    max-width: 36rem;
}

.teach-guides-hero {
    display: grid;
    gap: 1.75rem;
    align-items: center;
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .teach-guides-hero {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
        gap: clamp(1.5rem, 3vw, 2.5rem);
        padding-bottom: 0.5rem;
    }
}

.teach-guides-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.35rem;
}

.teach-guides-hero__visual {
    margin: 0;
    max-width: 22rem;
    width: 100%;
    justify-self: center;
}

@media (min-width: 992px) {
    .teach-guides-hero__visual {
        justify-self: end;
        max-width: 100%;
    }
}

.teach-guides-poster.etudes-poster-frame {
    max-height: min(440px, 58vh);
}

.teach-guides-grid {
    display: grid;
    gap: 1.15rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .teach-guides-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.teach-guide-card {
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid var(--afyra-border);
    border-radius: var(--radius-md, 18px);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease, ease), box-shadow 0.25s ease;
}

@media (min-width: 640px) {
    .teach-guide-card {
        grid-template-columns: minmax(120px, 38%) minmax(0, 1fr);
    }
}

.teach-guide-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.teach-guide-card__media {
    display: block;
    position: relative;
    min-height: 160px;
    overflow: hidden;
    background: var(--afyra-navy);
}

.teach-guide-card__media img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.teach-guide-card:hover .teach-guide-card__media img {
    transform: scale(1.04);
}

.teach-guide-card__body {
    display: grid;
    gap: 0.45rem;
    padding: 1.15rem 1.2rem 1.2rem;
    align-content: start;
}

.teach-guide-card__tag {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--afyra-green-dark, #157a42);
    background: rgba(31, 138, 76, 0.12);
}

.teach-guide-card__title {
    margin: 0;
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.12rem);
    font-weight: 800;
    line-height: 1.35;
}

.teach-guide-card__title a {
    color: var(--afyra-navy);
    text-decoration: none;
}

.teach-guide-card__title a:hover {
    color: var(--afyra-green);
}

.teach-guide-card__desc {
    margin: 0;
    color: var(--afyra-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.teach-guide-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--afyra-border);
}

.teach-guide-card__time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #8a5c00;
    font-size: 0.8rem;
    font-weight: 750;
}

.teach-guide-card__link {
    color: var(--afyra-navy);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
}

.teach-guide-card__link:hover {
    color: var(--afyra-green);
}

@media (max-width: 991.98px) {
    .teach-guides-hero__visual {
        order: -1;
    }
}

.teach-guides-article .pub-section-sub {
    max-width: 42rem;
}

/* Bandeau SEO visible (Mali / villes / intentions de recherche) */
.teach-seo-strip {
    margin-top: 0;
    padding: 1.75rem 0 1.85rem;
    background: linear-gradient(180deg, #eef4fa 0%, #e6edf5 100%);
    border-top: 1px solid rgba(11, 42, 74, 0.12);
}

.teach-guides-article + .teach-seo-strip,
main.teach-page + .teach-seo-strip {
    margin-top: 0;
}

.teach-seo-strip__lead,
.teach-seo-strip__queries {
    margin: 0;
    color: #3a4d66;
    font-size: 0.88rem;
    line-height: 1.6;
}

.teach-seo-strip__queries {
    margin-top: 0.55rem;
}

.teach-seo-strip a {
    color: var(--afyra-navy);
    font-weight: 750;
    text-decoration: none;
}

.teach-seo-strip a:hover {
    color: var(--afyra-green);
    text-decoration: underline;
}