/* VidéoSync — styles communs (mobile-first) */

:root {
    --vs-navy: #002b53;
    --vs-white: #ffffff;
    --vs-text: #1a1a1a;
    --vs-text-muted: #4a5568;
    --vs-radius: 12px;
    --vs-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --vs-max-width: 480px;
    --vs-header-height: 56px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--vs-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--vs-text);
    background: var(--vs-white);
}

/* ── Header ── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--vs-header-height);
    padding: 0 1rem;
    background: var(--vs-navy);
    color: var(--vs-white);
}

.site-header__brand {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: inherit;
}

.lang-switcher {
    display: flex;
    gap: 0.25rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.lang-btn {
    min-width: 2.25rem;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--vs-white);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 150ms ease;
}

.lang-btn.is-active {
    background: var(--vs-white);
    color: var(--vs-navy);
}

.lang-btn:focus-visible {
    outline: 2px solid var(--vs-white);
    outline-offset: 2px;
}

/* ── Layout ── */

.page {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.page__main {
    flex: 1;
    width: 100%;
    max-width: var(--vs-max-width);
    margin: 0 auto;
    padding: 2rem 1.25rem 2.5rem;
}

/* ── Accueil ── */

.home-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 0.5rem;
}

.home-hero__title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--vs-navy);
    line-height: 1.2;
}

.home-hero__intro {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--vs-text-muted);
}

/* ── Boutons ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--vs-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: opacity 150ms ease, transform 100ms ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    background: var(--vs-navy);
    color: var(--vs-white);
}

.btn--primary:hover {
    opacity: 0.9;
}

.btn:focus-visible {
    outline: 2px solid var(--vs-navy);
    outline-offset: 3px;
}

.btn--secondary {
    background: transparent;
    color: var(--vs-navy);
    border: 2px solid var(--vs-navy);
}

.btn--secondary:hover {
    opacity: 0.85;
}

/* ── Titres de page ── */

.page-title {
    margin: 0 0 1.5rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--vs-navy);
    line-height: 1.3;
}

/* ── Thématiques ── */

.themes {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.themes-grid {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.theme-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--vs-radius);
    text-decoration: none;
    color: var(--vs-white);
    transition: opacity 150ms ease, transform 100ms ease;
}

.theme-card:active {
    transform: scale(0.98);
}

.theme-card:hover {
    opacity: 0.92;
}

.theme-card:focus-visible {
    outline: 2px solid var(--vs-navy);
    outline-offset: 3px;
}

.theme-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}

/* ── Retour ── */

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--vs-navy);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.back-link:focus-visible {
    outline: 2px solid var(--vs-navy);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Secteur / capsules ── */

.sector {
    display: flex;
    flex-direction: column;
}

.page-title--sector {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--vs-sector-color, var(--vs-navy));
}

.capsules-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.capsule-card {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--vs-sector-color, var(--vs-navy));
    border-radius: var(--vs-radius);
    text-decoration: none;
    color: var(--vs-text);
    background: var(--vs-white);
    transition: background 150ms ease, transform 100ms ease;
}

.capsule-card:active {
    transform: scale(0.98);
}

.capsule-card:hover {
    background: rgba(0, 43, 83, 0.04);
}

.capsule-card:focus-visible {
    outline: 2px solid var(--vs-navy);
    outline-offset: 3px;
}

.capsule-card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.empty-message {
    margin: 0;
    color: var(--vs-text-muted);
    font-size: 0.9375rem;
}

/* ── Lecture vidéo ── */

.page-watch {
    background: #000;
}

.watch-layout {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.watch-player {
    position: relative;
    flex: 1;
    display: flex;
    min-height: 45dvh;
    background: #000;
}

.watch-iframe-wrap {
    flex: 1;
    position: relative;
    width: 100%;
}

.watch-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.watch-back {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: var(--vs-white);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
}

.watch-back:hover {
    background: rgba(0, 0, 0, 0.75);
}

.watch-back:focus-visible {
    outline: 2px solid var(--vs-white);
    outline-offset: 2px;
}

.watch-flags {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    transform: translateY(-50%);
}

.watch-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}

.watch-flag.is-active {
    border-color: var(--vs-white);
    background: rgba(0, 0, 0, 0.8);
}

.watch-flag:focus-visible {
    outline: 2px solid var(--vs-white);
    outline-offset: 2px;
}

.watch-actions {
    flex-shrink: 0;
    width: 100%;
    max-width: var(--vs-max-width);
    margin: 0 auto;
    padding: 1.25rem;
    background: var(--vs-white);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.watch-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--vs-navy);
    line-height: 1.35;
}

.watch-download {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.watch-download__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vs-text-muted);
}

.watch-download__actions {
    display: flex;
    gap: 0.75rem;
}

.watch-download__link {
    flex: 1;
    padding: 0.625rem 0.75rem;
    border: 2px solid var(--vs-navy);
    border-radius: var(--vs-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: var(--vs-navy);
}

.watch-download__link:hover {
    background: rgba(0, 43, 83, 0.05);
}

.watch-share-feedback {
    margin: 0;
    font-size: 0.875rem;
    color: var(--vs-text-muted);
    text-align: center;
}

/* ── Crédits ── */

.credits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.credits-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.credits-section__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--vs-navy);
}

.credits-text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--vs-text-muted);
}

.credits-text--placeholder {
    font-style: italic;
}

.credits-partners {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.credits-partner__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4rem;
    padding: 1rem;
    border: 2px dashed rgba(0, 43, 83, 0.25);
    border-radius: var(--vs-radius);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--vs-navy);
    text-align: center;
}

.credits-partner__logo {
    display: block;
    max-width: 100%;
    max-height: 5rem;
    margin: 0 auto;
    object-fit: contain;
}

.credits-partner--logo {
    padding: 0.5rem 0;
}

.credits-partner--logo .credits-partner__logo {
    max-height: 7rem;
}

/* ── Mentions légales ── */

.legal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.legal-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legal-section__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--vs-navy);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 43, 83, 0.12);
}

.legal-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-block__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--vs-text);
}

.legal-block__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-block__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--vs-text-muted);
}

.legal-block__text--placeholder {
    font-style: italic;
}
