/* Explain: Styles for various UI components including header, buttons, cards, and PDF reader. */
/* ---------- Header & navigation ---------- */
.site-header {
    background: transparent;
    transition: background-color .3s ease, box-shadow .3s ease;
}

.site-header .brand-name {
    color: #ffffff;
    transition: color .3s ease;
}

.site-header .nav-link {
    color: rgba(255, 255, 255, 0.88);
}

.site-header .icon-btn {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.45);
}

.site-header.is-scrolled {
    background: rgba(253, 248, 240, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 34px -24px rgba(43, 33, 25, 0.9);
}

.site-header.is-scrolled .brand-name {
    color: var(--text-color);
}

.site-header.is-scrolled .nav-link {
    color: var(--text-color);
}

.site-header.is-scrolled .icon-btn {
    color: var(--text-color);
    border-color: var(--border-color);
}

.nav-link {
    position: relative;
    display: inline-block;
    padding: .5rem .8rem;
    font-size: .95rem;
    font-weight: 500;
    transition: color .2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: .8rem;
    right: .8rem;
    bottom: .3rem;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.mobile-panel {
    display: none;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-link {
    display: block;
    padding: .85rem .25rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.mobile-link.is-active {
    color: var(--primary-color);
}

/* ---------- Buttons ---------- */
.btn-country {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.6rem;
    border-radius: 999px;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: #ffffff;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease, color .25s ease;
}

.btn-country:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -14px rgba(180, 83, 9, .8);
}

.btn-ghost-light {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.btn-ghost-light:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--text-color);
    box-shadow: 0 14px 26px -16px rgba(0, 0, 0, .6);
}

/* ---------- Hero quick links ---------- */
.hero-link {
    position: relative;
    display: inline-block;
    padding-bottom: .25rem;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #ffffff;
    transition: color .25s ease;
}

.hero-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.hero-link:hover {
    color: var(--accent-color);
}

.hero-link:hover::after {
    transform: scaleX(1);
}

/* ---------- Cards ---------- */
.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--surface-color);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.course-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft);
}

/* ---------- Planning ---------- */
.schedule-day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: .85rem;
    background: var(--surface-color);
}

.schedule-day.is-highlight {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

/* ---------- Gallery ---------- */
.gallery-tile {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--surface-alt);
    cursor: pointer;
    transition: border-color .3s ease, box-shadow .3s ease;
}

.gallery-tile:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft);
}

.gallery-tile:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

.gallery-tile img {
    transition: transform .6s ease;
}

.gallery-tile:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 2rem .9rem .8rem;
    background-image: linear-gradient(180deg, rgba(20, 15, 10, 0) 0%, rgba(20, 15, 10, 0.86) 100%);
    color: #ffffff;
    font-size: .85rem;
    font-weight: 600;
    text-align: left;
}

/* ---------- Aperçu plein écran ---------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(18, 13, 9, 0.93);
    backdrop-filter: blur(4px);
}

.lightbox.is-open {
    display: flex;
}

.lightbox-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 62rem;
    padding-top: 3.25rem;
}

.lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.lightbox-close:hover {
    background: #ffffff;
    color: var(--text-color);
}

.lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 12rem;
    overflow: hidden;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
}

.lightbox-img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 70svh;
    opacity: 0;
    transition: opacity .3s ease;
}

.lightbox-img.is-ready {
    opacity: 1;
}

.lightbox-loading {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: .95rem;
}

.lightbox-loading.is-visible {
    display: flex;
}

.lightbox-caption {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: .95rem;
    text-align: center;
}

/* ---------- FAQ ---------- */
.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item .faq-icon {
    flex-shrink: 0;
    color: var(--primary-color);
    transition: transform .3s ease;
}

.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

/* ---------- Lecture des fiches ---------- */
.fiche-read-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 2.25rem;
    padding: .45rem .95rem;
    border: 1px solid var(--primary-color);
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.fiche-read-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.fiche-video-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 2.25rem;
    padding: .45rem .95rem;
    border: 1px solid var(--secondary-color);
    border-radius: 999px;
    background: transparent;
    color: var(--secondary-color);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.fiche-video-btn:hover {
    background: var(--secondary-color);
    color: #ffffff;
}

.fiche-open-link {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: .8rem;
    transition: color .2s ease, border-color .2s ease;
}

.fiche-open-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.fiche-reader {
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: .85rem;
    background: var(--surface-alt);
}

.fiche-reader-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .75rem .55rem .9rem;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.fiche-reader-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-heading);
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-color);
}

.fiche-reader-ext {
    flex-shrink: 0;
    font-size: .78rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

.fiche-reader-ext:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.fiche-reader-close {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: .85rem;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.fiche-reader-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.fiche-reader-frame {
    width: 100%;
    height: 70vh;
    min-height: 20rem;
}

.fiche-reader-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
}

@media (max-width: 480px) {
    .fiche-reader-ext {
        display: none;
    }
}