/*
 * Quark 2 — user customizations
 *
 * This file is safe to edit. It is loaded last so anything here overrides
 * theme.css without having to mark rules !important.
 */

/* General & Legacy Gallery styling */
.noroots-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.noroots-gallery a {
    display: block;
    overflow: hidden;
}

.noroots-gallery img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* UniteGallery uniform tiles styling */
.gallery-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.ug-tile, .ug-thumb-wrapper {
    cursor: pointer;
    border-radius: var(--q2-radius-md, 8px);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ug-tile:hover, .ug-thumb-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ug-thumb-image {
    object-fit: cover !important;
}

/* Tsulacus Logo styling */
.navbar-brand svg.tsulacus-logo,
.navbar-brand svg {
    height: 34px;
    width: auto;
}

.navbar-brand svg text {
    fill: currentColor !important;
    stroke: none !important;
}

/* ===================================================
 * Life Page Gallery (Native Grid, Uniform & Fullscreen)
 * =================================================== */
.life-page .content-item__body {
    max-width: 100%;
    margin: 0 0 2rem 0;
    font-size: 1.05rem;
    line-height: 1.75;
    text-align: left;
    color: currentColor;
}

.life-page .content-item__body p {
    margin-bottom: 1rem;
}

.life-page .content-item__body p:last-child {
    margin-bottom: 0;
}

.life-gallery-section {
    margin-top: 1.5rem;
    margin-bottom: 3.5rem;
}

.life-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 860px) {
    .life-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 520px) {
    .life-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.life-tile {
    cursor: pointer;
    border-radius: var(--q2-radius-md, 8px);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    background: rgba(128, 128, 128, 0.08);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.life-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.life-tile-hidden {
    display: none !important;
}

@keyframes lifeFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.life-tile-revealed {
    animation: lifeFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.life-tile-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.life-tile-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    transition: transform 0.35s ease;
}

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

.life-tile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    color: #ffffff;
}

.life-tile:hover .life-tile-overlay {
    opacity: 1;
}

.life-zoom-icon {
    transform: scale(0.85);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.life-tile:hover .life-zoom-icon {
    transform: scale(1);
}

/* ===================================================
 * Défilement Infini (Infinite Scroll)
 * =================================================== */
.life-infinite-sentinel {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 48px;
    margin: 2rem auto;
}

.life-infinite-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.life-infinite-spinner {
    width: 32px;
    height: 32px;
    border: 2.5px solid rgba(128, 128, 128, 0.25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: lifeSpin 0.75s linear infinite;
}

/* ===================================================
 * Lightbox Plein Écran Native (True Full Screen)
 * =================================================== */
.life-lightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    background: #000000;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.life-lightbox-active {
    opacity: 1;
    visibility: visible;
}

.life-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: #050507;
}

.life-lightbox-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 20;
    color: #ffffff;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: auto;
}

.life-lightbox-counter {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.life-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.life-lightbox-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.life-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.life-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.life-lightbox-prev {
    left: 24px;
}

.life-lightbox-next {
    right: 24px;
}

.life-lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .life-lightbox-arrow {
        width: 44px;
        height: 44px;
    }
    .life-lightbox-prev {
        left: 12px;
    }
    .life-lightbox-next {
        right: 12px;
    }
}

/* ===================================================
 * Stage & Photo Plein Écran (Occupe 100% de l'écran)
 * =================================================== */
.life-lightbox-stage {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    overflow: hidden;
    z-index: 10;
}

.life-lightbox-img {
    display: block;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain !important; /* Agrandit au maximum de l'écran sans déformation ni rognage */
    margin: auto;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity 0.2s ease;
}

.life-lightbox-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 12;
}

.life-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: lifeSpin 0.75s linear infinite;
}

@keyframes lifeSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================================
 * CV Page (Curriculum Vitæ Poétique - Paulo de Jesus)
 * =================================================== */
.cv-page .content-item {
    max-width: 860px;
    margin-inline: auto;
}

.cv-hero {
    margin-bottom: 3.5rem;
}

.cv-profile-grid {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 680px) {
    .cv-profile-grid {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}

.cv-portrait-container {
    flex-shrink: 0;
}

.cv-portrait-image {
    width: 170px;
    height: 195px;
    object-fit: cover;
    border-radius: var(--q2-radius-md, 10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(128, 128, 128, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cv-portrait-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.cv-identity {
    flex-grow: 1;
}

.cv-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    opacity: 0.55;
    margin-bottom: 0.25rem;
}

.cv-headline {
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.cv-birth {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.7;
    margin: 0 0 0.75rem 0;
}

.cv-lead {
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.6;
    opacity: 0.85;
    margin: 0 0 1.25rem 0;
}

.cv-download-wrap {
    margin-top: 0.5rem;
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: currentColor !important;
    text-decoration: none !important;
    border: 1.5px solid currentColor;
    border-radius: 9999px;
    background: transparent;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-download-btn:hover {
    background: currentColor;
    color: var(--q2-body-bg, #ffffff) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.cv-download-icon {
    display: block;
    transition: transform 0.2s ease;
}

.cv-download-btn:hover .cv-download-icon {
    transform: translateY(1px);
}

/* Quick PDF download bar */
.cv-pdf-pills-bar {
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cv-pdf-pills-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.65;
    font-weight: 600;
}

.cv-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: currentColor !important;
    text-decoration: none !important;
    border: 1px solid rgba(128, 128, 128, 0.35);
    border-radius: 9999px;
    background: rgba(128, 128, 128, 0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-btn-pill:hover {
    background: currentColor;
    color: var(--q2-body-bg, #ffffff) !important;
    border-color: currentColor;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* Language Switcher Bar */
.cv-lang-switcher-wrap {
    margin: 1.25rem 0 0.85rem 0;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.cv-lang-switcher-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.65;
    font-weight: 600;
}

.cv-lang-switcher {
    display: inline-flex !important;
    padding: 3px !important;
    background: rgba(128, 128, 128, 0.08) !important;
    border: 1px solid rgba(128, 128, 128, 0.2) !important;
    border-radius: 9999px !important;
    gap: 4px !important;
    margin: 0 !important;
    width: auto !important;
}

button.cv-lang-tab,
.cv-lang-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 6px 18px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: currentColor !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 9999px !important;
    cursor: pointer !important;
    opacity: 0.65 !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    width: auto !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    font-family: inherit !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

button.cv-lang-tab:hover,
.cv-lang-tab:hover {
    opacity: 1 !important;
    background: rgba(128, 128, 128, 0.14) !important;
    background-color: rgba(128, 128, 128, 0.14) !important;
    color: currentColor !important;
    border: none !important;
    box-shadow: none !important;
}

button.cv-lang-tab.is-active,
.cv-lang-tab.is-active {
    opacity: 1 !important;
    background: #1d2129 !important;
    background-color: #1d2129 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] button.cv-lang-tab.is-active,
[data-theme="dark"] .cv-lang-tab.is-active {
    background: #f0f2f5 !important;
    background-color: #f0f2f5 !important;
    color: #121417 !important;
}

button.cv-lang-tab:focus,
button.cv-lang-tab:focus-visible,
.cv-lang-tab:focus,
.cv-lang-tab:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.cv-lang-panel {
    animation: cvFadeIn 0.25s ease-out;
}

@keyframes cvFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.cv-epigraph-box {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    text-align: center;
}

.cv-epigraph-quote {
    font-size: 1.12rem;
    line-height: 1.8;
    font-style: italic;
    opacity: 0.9;
}

.cv-highlight {
    display: inline-block;
    margin-top: 0.35rem;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.02em;
}

.cv-sections-stream {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    margin-top: 3rem;
}

.cv-chapter {
    position: relative;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}

.cv-chapter:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.cv-chapter-header {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.cv-chapter-num {
    font-family: var(--pico-font-family-display, serif);
    font-size: 1.9rem;
    font-weight: 700;
    opacity: 0.35;
    min-width: 2.2rem;
    line-height: 1;
}

.cv-chapter-titles h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.25;
}

.cv-timeframe {
    font-size: 0.85em;
    font-weight: 400;
    opacity: 0.65;
}

.cv-subtitle {
    font-size: 0.95rem;
    font-style: italic;
    opacity: 0.75;
    margin: 0;
}

.cv-chapter-body {
    padding-left: 3.5rem;
}

@media (max-width: 680px) {
    .cv-chapter-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    .cv-chapter-body {
        padding-left: 0;
    }
}

.cv-journey-intro,
.cv-intro-lead {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.cv-stations-pill {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    padding: 0.85rem 1.25rem;
    background: rgba(128, 128, 128, 0.08);
    border-radius: var(--q2-radius-md, 8px);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1.75rem;
    border: 1px solid rgba(128, 128, 128, 0.12);
}

.cv-stations-pill em {
    font-size: 0.85em;
    opacity: 0.75;
}

.cv-points-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cv-points-list li {
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.75;
    font-size: 1rem;
}

.cv-points-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
    opacity: 0.45;
}

.cv-points-list li strong {
    color: var(--q2-text-strong, currentColor);
}

.cv-cardinal-list {
    padding-left: 1.4rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.cv-cardinal-list li {
    line-height: 1.75;
    font-size: 1rem;
}

.cv-cardinal-list li strong {
    color: var(--q2-text-strong, currentColor);
}

/* Coda Signature */
.cv-coda {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    text-align: center;
}

.cv-coda-quote {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-style: italic;
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cv-coda-signature {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    opacity: 0.65;
}

