/* Explain: Styles for site components including video cards and modal. */
.site-header {
    background: linear-gradient(180deg, rgba(250, 249, 246, 0.92), rgba(250, 249, 246, 0.62));
    backdrop-filter: blur(18px);
    transition: background 300ms ease, box-shadow 300ms ease;
}

.site-header.is-scrolled {
    background: rgba(250, 249, 246, 0.97);
    box-shadow: 0 18px 44px rgba(31, 46, 35, 0.08);
}

.nav-link {
    color: var(--text-color);
    transition: color 300ms ease;
}

.nav-link:hover {
    color: var(--sage-dark);
}

/* Nom du cabinet : en anglais, « LAW OFFICE JING QIAO » tient sur une seule ligne */
@media (min-width: 1024px) {
    .brand-logo {
        max-width: none;
    }

    html[data-lang="en"] .brand-name {
        white-space: nowrap;
    }
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(250, 249, 246, 0.6);
    padding: 0.3rem 0.7rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.lang-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-muted);
    font: inherit;
    letter-spacing: inherit;
    transition: color 250ms ease;
}

.lang-btn.lang-active {
    color: var(--primary-color);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--sage-dark);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-kicker::before {
    display: inline-block;
    width: 2.4rem;
    height: 1px;
    background: var(--accent-color);
    content: "";
}

.glass-panel {
    border: 1px solid var(--glass-border);
    background: linear-gradient(145deg, rgba(250, 249, 246, 0.8), rgba(255, 255, 255, 0.5));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.arch-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(88, 129, 87, 0.38);
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.arch-frame::after {
    position: absolute;
    inset: 1.1rem;
    border: 1px solid rgba(250, 249, 246, 0.6);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.arch-frame-large {
    height: min(72vh, 700px);
    min-height: 480px;
    border-radius: 999px 999px 2.4rem 2.4rem;
}

/* Portrait photo turned a quarter turn to the right, still filling the arch frame */
.arch-photo-rotated {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(480px, min(72vh, 700px));
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Homepage hero portrait raised about 4 cm inside the arch frame */
.arch-photo-raised {
    top: calc(50% - 4cm);
    width: calc(max(480px, min(72vh, 700px)) + 8cm);
}

.floating-note {
    position: absolute;
    right: -1.1rem;
    bottom: 3rem;
    display: flex;
    max-width: 245px;
    align-items: center;
    gap: 0.7rem;
    border-radius: 1.4rem;
    padding: 0.95rem 1.15rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
}

.portrait-wrap {
    height: 600px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 999px 999px 2.4rem 2.4rem;
    box-shadow: var(--shadow-soft);
}

.practice-card {
    min-height: 320px;
    border-radius: 2rem;
    padding: 1.9rem;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.practice-card:hover {
    border-color: rgba(88, 129, 87, 0.55);
    box-shadow: 0 26px 70px rgba(31, 46, 35, 0.1);
    transform: translateY(-6px);
}

.practice-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: var(--sage-soft);
    color: var(--sage-dark);
    font-size: 1.05rem;
}

.team-card {
    overflow: hidden;
    border-radius: 2rem;
    padding: 1.15rem 1.15rem 1.7rem;
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.team-card:hover {
    box-shadow: 0 26px 70px rgba(31, 46, 35, 0.1);
    transform: translateY(-5px);
}

/* Portrait fourni à l'horizontale : remis debout et recadré dans la vignette 4:5 */
.team-photo-rotated {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Photo fournie au format paysage (16:9) : remise debout, visage dégagé et vignette 4:5 entièrement remplie */
.team-photo-upright {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.8%;
    height: 80%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    transform: translate(-50%, -50%) translateY(20%) rotate(90deg);
}

/* Grille équipe : le premier portrait descend d'1 cm et rejoint le bas du cadre pour s'aligner sur les autres photos */
.team-card:first-child .team-photo-rotated {
    top: calc(50% - 1cm);
    width: calc(125% + 2.5cm);
}

.news-card {
    border-radius: 2rem;
    padding: 1.25rem;
}

.detail-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 1.4rem;
    background: rgba(250, 249, 246, 0.6);
    padding: 1.1rem 1.2rem;
}

.detail-number {
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.quote-panel {
    border-left: 2px solid var(--accent-color);
    padding-left: 1.4rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Date field: the native date input shows a plain format hint and opens the calendar picker */
input[type="date"] {
    color-scheme: light;
    min-height: 3rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.8;
}

/* Formulaire de rendez-vous : champ date avec un bouton calendrier toujours visible */
.date-field {
    position: relative;
}

.date-field input[type="date"].has-custom-picker::-webkit-calendar-picker-indicator {
    width: 0;
    margin: 0;
    opacity: 0;
}

.date-picker-button {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--sage-dark);
    font-size: 1rem;
    transform: translateY(-50%);
    transition: background 250ms ease, border-color 250ms ease, color 250ms ease;
}

.date-picker-button:hover,
.date-picker-button:focus-visible {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #ffffff;
    outline: none;
}

.form-status.success {
    color: #4A6B53;
}

.form-status.error {
    color: #9B4A3D;
}

.is-hidden {
    display: none !important;
}

.mobile-cta-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: flex;
    gap: 0.6rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(250, 249, 246, 0.9);
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    backdrop-filter: blur(18px);
}

.article-body p {
    margin-bottom: 1.15rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.9;
}

.article-body h2,
.article-body h3 {
    margin: 1.8rem 0 0.8rem;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
}

@media (max-width: 767px) {
    .section-kicker::before {
        width: 1.6rem;
    }

    .arch-frame-large,
    .portrait-wrap {
        height: 480px;
        min-height: 0;
    }

    .arch-frame-large {
        width: min(100%, 440px);
        margin-right: auto;
        margin-left: auto;
    }

    .floating-note {
        position: relative;
        right: auto;
        bottom: auto;
        max-width: none;
        margin: -2.2rem auto 0;
    }
}

.faq-item {
    border-radius: 1.4rem;
    padding: 0;
}

.faq-item > summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.6;
    list-style: none;
}

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

.faq-chevron {
    margin-top: 0.2rem;
    color: var(--accent-color);
    transition: transform 300ms ease;
}

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

.faq-answer {
    padding: 0 1.35rem 1.35rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.85;
}

.faq-answer p {
    margin: 0 0 0.6rem;
    white-space: pre-line;
}

.search-result {
    display: block;
    border-radius: 1.6rem;
    padding: 1.2rem 1.4rem;
    transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.search-result:hover {
    border-color: rgba(88, 129, 87, 0.55);
    box-shadow: 0 26px 70px rgba(31, 46, 35, 0.1);
    transform: translateY(-4px);
}

.search-result-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--sage-dark);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.search-result-title {
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
}

.search-result-snippet {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(250, 249, 246, 0.7);
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 300ms ease;
}

.cat-chip:hover {
    border-color: var(--accent-color);
    color: var(--text-color);
}

.cat-chip.is-active {
    border-color: var(--accent-color);
    background: var(--primary-color);
    color: #ffffff;
}

/* Plan interactif : repères du cabinet et des stations de métro et RER alentour */
.map-frame {
    position: relative;
    z-index: 0;
    isolation: isolate;
}

.map-marker {
    border: 0;
    background: none;
}

.map-pin {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(250, 249, 246, 0.92);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(31, 46, 35, 0.28);
    color: #ffffff;
    font-size: 0.78rem;
}

.map-pin-firm {
    background: var(--primary-color);
    font-size: 0.95rem;
}

.map-pin-metro {
    background: var(--accent-color);
}

.map-legend-dot {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.65rem;
}

.map-legend-dot-firm {
    background: var(--primary-color);
}

.map-legend-dot-metro {
    background: var(--accent-color);
}

.leaflet-container {
    background: var(--surface-color);
    font-family: var(--font-body);
}

.leaflet-popup-content-wrapper {
    border-radius: 1rem;
    color: var(--text-color);
    box-shadow: var(--shadow-soft);
}

.leaflet-popup-content {
    margin: 0.85rem 1rem;
    font-size: 0.82rem;
    line-height: 1.6;
}

.map-popup-title {
    display: block;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
}

.map-popup-detail {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* Vidéos : carte avec vignette et bouton de lecture, panneau de présentation, fenêtre modale */
.video-card {
    display: flex;
    width: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.8rem;
    padding: 0.85rem;
    text-align: left;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.video-card:hover,
.video-card:focus-visible {
    border-color: rgba(88, 129, 87, 0.55);
    box-shadow: 0 26px 70px rgba(31, 46, 35, 0.1);
    transform: translateY(-5px);
    outline: none;
}

.video-card-media {
    position: relative;
    display: block;
    min-height: 8rem;
    overflow: hidden;
    border-radius: 1.3rem;
    background: var(--surface-color);
}

.video-card-media img {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    width: 3.4rem;
    height: 3.4rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(250, 249, 246, 0.85);
    border-radius: 999px;
    background: rgba(31, 46, 35, 0.55);
    color: #ffffff;
    font-size: 1rem;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(6px);
    transition: background 300ms ease, transform 300ms ease;
}

.video-card:hover .video-play,
.video-card:focus-visible .video-play {
    background: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.06);
}

.video-card-title {
    display: block;
    margin-top: 1rem;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.45;
}

.video-card-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.75;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.1rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--sage-dark);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    transition: color 300ms ease;
}

.video-link:hover,
.video-link:focus-visible {
    color: var(--primary-color);
    outline: none;
}

.video-feature {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: var(--surface-color);
}

.video-feature-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-feature-button {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(31, 46, 35, 0.25), rgba(31, 46, 35, 0.62));
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: background 300ms ease;
}

.video-feature-button:hover,
.video-feature-button:focus-visible {
    background: linear-gradient(180deg, rgba(31, 46, 35, 0.15), rgba(31, 46, 35, 0.72));
    outline: none;
}

.video-feature-play {
    display: inline-flex;
    width: 4.4rem;
    height: 4.4rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(250, 249, 246, 0.9);
    border-radius: 999px;
    background: rgba(250, 249, 246, 0.18);
    font-size: 1.3rem;
    backdrop-filter: blur(8px);
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.video-modal.is-open {
    display: flex;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 30, 24, 0.82);
    backdrop-filter: blur(6px);
}

.video-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 62rem);
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: var(--background-color);
    padding: 1rem;
    box-shadow: 0 30px 90px rgba(16, 24, 19, 0.4);
}

.video-modal-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 1.1rem;
    background: #101812;
}

.video-modal-iframe,
.video-modal-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-modal-close {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-color);
    transition: background 250ms ease, color 250ms ease;
}

.video-modal-close:hover,
.video-modal-close:focus-visible {
    background: var(--primary-color);
    color: #ffffff;
    outline: none;
}

@media (max-width: 767px) {
    .video-modal-panel {
        padding: 0.7rem;
    }
}