/* ====================================================
   A.D.E.L.E. — Feuille de style principale
   @ Nicolas Bellet
   ==================================================== */


/* ---- VARIABLES ---- */

:root {
    --couleur-accent: lightseagreen;
}


/* ---- GENERAL ---- */

* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
}

h1 {
    margin-bottom: 0;
}

h4 {
    margin-top: 0;
}

h2 {
    font-size: 20px;
    text-align: center;
}

h3,
p {
    background-color: white;
}

ul {
    list-style: none;
}

hr {
    border: none;
    margin: 2px;
}


/* ---- MENU PRINCIPAL ---- */

#menu-top {
    display: flex;
    align-items: center;
    max-width: 1280px;
    margin: 20px auto;
    padding: 0 20px;
    gap: 16px;
}

#menu-top img {
    margin: 0 10px;
    background: var(--couleur-accent);
    flex-shrink: 0;
}

#logo {
    flex-shrink: 0;
}

.topline {
    border-top: 12px solid var(--couleur-accent);
    border-bottom: 0;
    width: 100%;
    top: 0;
    z-index: -99;
    position: relative;
    margin: 0 auto;
}

#menu-container {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

#menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#menu li a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #444;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
    height: auto;
    line-height: normal;
    float: none;
    width: auto;
    text-align: left;
    position: static;
}

#menu li a i {
    font-size: 13px;
    opacity: .75;
}

#menu li a:hover {
    background: #f5f4f0;
    color: #111;
}

#menu li a.current {
    background: var(--couleur-accent);
    color: white;
}

#menu li a.current i {
    opacity: 1;
}


/* Masquer l'ancien dropdown */

.submenu {
    display: none !important;
}


/* ---- SOUS-BARRE PHOTOS ---- */

#sous-menu-photos {
    max-width: 1280px;
    margin: 0 auto 24px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 2px;
    border-bottom: 1px solid #e8e6e0;
}

#sous-menu-photos a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    position: relative;
    transition: color .15s;
    white-space: nowrap;
}


/* Indicateur actif via ::after — compatible Safari */

#sous-menu-photos a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background .15s;
}

#sous-menu-photos a:hover {
    color: #333;
}

#sous-menu-photos a.actif,
#sous-menu-photos a.current {
    color: var(--couleur-accent);
    font-weight: bold;
}

#sous-menu-photos a.actif::after,
#sous-menu-photos a.current::after {
    background: var(--couleur-accent);
}

#sous-menu-photos a i {
    font-size: 11px;
}


/* ---- RECHERCHE ---- */

#recherche-container {
    display: flex;
    align-items: center;
}

#recherche-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--couleur-accent);
    padding: 5px 12px;
    min-width: 180px;
    transition: box-shadow .2s;
}

#recherche-wrapper:focus-within {
    box-shadow: 3px 3px 0 var(--couleur-accent);
}

#recherche-icone {
    color: var(--couleur-accent);
    font-size: 13px;
    flex-shrink: 0;
}

#recherche-input {
    border: none;
    outline: none;
    font-family: sans-serif;
    font-size: 13px;
    width: 100%;
    background: transparent;
    color: inherit;
}

#recherche-compteur {
    font-size: 11px;
    color: var(--couleur-accent);
    white-space: nowrap;
    font-weight: bold;
    min-width: 50px;
    text-align: right;
}


/* ---- RESPONSIVE MENU ---- */

@media screen and (max-width: 800px) {
    #menu-top {
        flex-wrap: wrap;
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
        margin: 0 auto;
        gap: 12px;
    }
    /* Logo + image en ligne */
    #menu-top>img {
        position: static;
        margin: 0;
        height: 50px;
    }
    #logo {
        display: flex;
        flex-direction: column;
    }
    #logo h1 {
        font-size: 18px;
        text-align: left;
    }
    #logo h4 {
        font-size: 11px;
    }
    .topline {
        width: 100%;
        top: 0;
    }
    /* Logo + image côte à côte sur la même ligne */
    #menu-top {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    #menu-container {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
        margin-left: 0;
        justify-content: space-between;
    }
    #menu {
        gap: 2px;
    }
    #menu li a {
        padding: 7px 10px;
        font-size: 13px;
    }
    #recherche-container {
        flex: 1;
        min-width: 120px;
    }
    #recherche-wrapper {
        min-width: unset;
        width: 100%;
    }
    #sous-menu-photos {
        overflow-x: auto;
        scrollbar-width: none;
        padding: 0 10px;
        gap: 0;
    }
    #sous-menu-photos::-webkit-scrollbar {
        display: none;
    }
    #sous-menu-photos a {
        padding: 8px 10px;
        font-size: 12px;
    }
    #recherche-wrapper {
        min-width: 140px;
    }
}


/* ---- BOUTONS ---- */

.button {
    display: inline-block;
    padding: 0.5em 1em;
    margin-bottom: 10px;
    background: white;
    border: 2px solid var(--couleur-accent);
    color: var(--couleur-accent);
    font-family: sans-serif;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.button:hover {
    background-color: var(--couleur-accent);
    color: white;
    border-color: white;
}

.button:active,
.button.is-checked {
    background-color: var(--couleur-accent);
    color: white;
}

.button:active {
    box-shadow: inset 0 1px 5px hsla(0, 0%, 0%, .8);
}

.button-group::after {
    content: '';
    display: block;
    clear: both;
}

.button-group {
    margin: 20px auto;
    width: fit-content;
}

.button-group .button {
    float: left;
    border-radius: 0;
    margin-left: 0;
    margin-right: 5px;
}


/* ---- GRILLE ALBUMS (Isotope) ---- */

#list {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.grid {
    margin: 0 auto;
}

.element-item {
    position: relative;
    float: left;
    width: 300px;
    height: 150px;
    padding: 10px;
    margin: 10px;
    background: #888;
    color: #000;
    background-size: 100%;
    background-position: center;
    transition: background-size .2s, opacity .2s, box-shadow .2s;
}

.element-item>* {
    margin: 0;
    padding: 0;
}

.element-item .name {
    position: absolute;
    top: 80%;
    font-size: 12px;
    font-weight: normal;
    padding: 0 1em;
}

.element-item .annee {
    position: absolute;
    top: 65%;
    font-size: 12px;
    padding: 0 1em;
}

.element-item::before {
    content: '';
    background-color: white;
    width: inherit;
    height: inherit;
    position: absolute;
    margin: -10px;
    opacity: .15;
}

.element-item:hover {
    box-shadow: 7px 7px var(--couleur-accent);
    opacity: 60%;
    background-size: 110%;
}

@media screen and (max-width: 600px) {
    .element-item {
        width: 85vw !important;
        float: none;
    }
}


/* ---- PAGE INDEX — grille par années ---- */

#albums-root {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0 60px;
}

.annee-sep {
    max-width: 1280px;
    margin: 32px auto 16px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    scroll-margin-top: 80px;
}

.annee-sep:first-child {
    margin-top: 0;
}

.annee-sep-label {
    font-size: 22px;
    font-weight: bold;
    color: #1a1a1a;
    flex-shrink: 0;
    line-height: 1;
}

.annee-sep-line {
    flex: 1;
    height: 1px;
    background: #e0ddd4;
}

.annee-sep-nb {
    font-size: 12px;
    color: #aaa;
    flex-shrink: 0;
}

.annee-grille {
    max-width: 1280px;
    margin: 0 auto;
    overflow: hidden;
}

.annee-grille>a {
    display: block;
    float: left;
    text-decoration: none;
}


/* ---- Frise d'années ---- */

#annees-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border: 1px solid #e0ddd4;
    border-radius: 20px;
    padding: 8px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    min-width: 52px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: none;
}

#annees-nav::-webkit-scrollbar {
    display: none;
}

.annee-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
}

.annee-nav-item:hover {
    background: #f5f4f0;
}

.annee-nav-item.active .annee-nav-label {
    color: var(--couleur-accent);
    font-weight: bold;
}

.annee-nav-item.active .annee-nav-dot {
    background: var(--couleur-accent);
}

.annee-nav-label {
    font-size: 12px;
    font-weight: bold;
    color: #888;
    line-height: 1;
}

.annee-nav-nb {
    font-size: 9px;
    color: #bbb;
    line-height: 1;
}

.annee-nav-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ddd;
    margin-top: 2px;
}

@media screen and (max-width: 900px) {
    #annees-nav {
        position: static;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 20px;
        padding: 6px 10px;
        margin: 0 auto 20px;
        width: fit-content;
        max-width: calc(100% - 40px);
        box-shadow: none;
    }
    .annee-nav-item {
        padding: 5px 10px;
        flex-direction: row;
        gap: 5px;
        width: auto;
    }
    .annee-nav-nb {
        font-size: 10px;
    }
    .annee-nav-dot {
        display: none;
    }
}


/* ---- Bandeau Ce mois-là ---- */

#cemois-wrap {
    max-width: 1280px;
    margin: 0 auto 28px;
    padding: 0 20px;
    display: none;
}

#cemois-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

#cemois-titre {
    font-size: 13px;
    font-weight: bold;
    color: #555;
}

#cemois-voir-tout {
    font-size: 12px;
    color: var(--couleur-accent);
    text-decoration: none;
    margin-left: auto;
    white-space: nowrap;
}

#cemois-voir-tout:hover {
    text-decoration: underline;
}

#cemois-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    padding-bottom: 6px;
    -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%);
    mask-image: linear-gradient(to right, black 88%, transparent 100%);
}

#cemois-scroll::-webkit-scrollbar {
    height: 4px;
}

#cemois-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

#cemois-liste {
    display: flex;
    gap: 10px;
    width: max-content;
}

.cemois-item {
    flex-shrink: 0;
    width: 175px;
    text-decoration: none;
    display: block;
}

.cemois-vignette {
    width: 175px;
    height: 108px;
    background-size: cover;
    background-position: center;
    background-color: #eee;
    border-radius: 6px;
    transition: transform .15s, box-shadow .15s;
}

.cemois-item:hover .cemois-vignette {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.cemois-info {
    margin-top: 6px;
    padding: 0 2px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.cemois-annee {
    flex-shrink: 0;
    background: var(--couleur-accent);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 10px;
}

.cemois-nom {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#lieumeme-wrap {
    max-width: 1280px;
    margin: 0 auto 32px;
    padding: 0 20px;
    border-top: 1px solid #f0ede6;
    padding-top: 24px;
}

#lieumeme-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

#lieumeme-titre {
    font-size: 13px;
    font-weight: bold;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

#lieumeme-count {
    font-size: 12px;
    color: #aaa;
}

#lieumeme-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    padding-bottom: 6px;
    -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%);
    mask-image: linear-gradient(to right, black 88%, transparent 100%);
}

#lieumeme-liste {
    display: flex;
    gap: 10px;
    width: max-content;
}


/* ---- TIMELINE ---- */

#tl-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: start;
}

@media screen and (max-width: 900px) {
    #tl-layout {
        grid-template-columns: 1fr;
    }
    #tl-droite {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    #tl-stats {
        grid-column: 1 / -1;
    }
}

@media screen and (max-width: 560px) {
    #tl-droite {
        grid-template-columns: 1fr;
    }
}

#tl-legende {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tl-leg-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.tl-leg-dot {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.tl-annee-row {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    align-items: flex-end;
}

.tl-annee-label {
    width: 44px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: bold;
    color: #888;
    padding-bottom: 16px;
}

.tl-mois-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    flex: 1;
    align-items: flex-end;
    overflow: hidden;
}

.tl-mois {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.tl-mois-nom {
    font-size: 9px;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
}

.tl-barre-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 80px;
    width: 100%;
}

.tl-barre {
    width: 100%;
    border-radius: 3px 3px 0 0;
    min-height: 3px;
    transition: background .15s, transform .1s;
    transform-origin: bottom;
}

.tl-nb {
    font-size: 9px;
    color: #aaa;
    min-height: 13px;
    line-height: 13px;
}

#tl-tooltip {
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #333;
    pointer-events: none;
    z-index: 9999;
    max-width: 220px;
    display: none;
    line-height: 1.6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
}

#tl-tooltip strong {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.tl-tip-evt {
    font-weight: bold;
    margin-bottom: 4px;
}

.tl-tip-alb {
    color: #666;
}

#tl-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tl-stat {
    background: #f5f4f0;
    border-radius: 8px;
    padding: 10px 14px;
    flex: 1;
    min-width: 70px;
}

.tl-stat-val {
    font-size: 22px;
    font-weight: bold;
    color: #222;
}

.tl-stat-lbl {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.tl-panel {
    background: #fafaf8;
    border: 1px solid #e8e6e0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.tl-panel-titre {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin-bottom: 12px;
}

.tl-evt-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.tl-evt-item:last-child {
    border-bottom: none;
}

.tl-evt-item:hover {
    opacity: .75;
}

.tl-evt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tl-evt-label {
    font-size: 12px;
    color: #333;
    flex: 1;
    line-height: 1.3;
}

.tl-evt-date {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
}

.tl-recent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    text-decoration: none;
}

.tl-recent-item:last-child {
    border-bottom: none;
}

.tl-recent-item:hover {
    opacity: .75;
}

.tl-recent-nom {
    font-size: 12px;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-recent-date {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
}

.tl-top-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.tl-top-item:last-child {
    border-bottom: none;
}

.tl-top-item:hover {
    opacity: .75;
}

.tl-top-label {
    font-size: 12px;
    color: #333;
    flex: 1;
}

.tl-top-bar-wrap {
    width: 60px;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.tl-top-bar {
    height: 100%;
    border-radius: 3px;
}

.tl-top-nb {
    font-size: 11px;
    color: #aaa;
    min-width: 20px;
    text-align: right;
}

@media screen and (max-width: 600px) {
    .tl-annee-label {
        width: 32px;
        font-size: 10px;
    }
    .tl-mois-nom {
        font-size: 8px;
    }
}


/* ---- PERSONNES ---- */


/*
#pers-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

#pers-filtres {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0 28px;
}

.pers-filtre {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e0ddd4;
    background: #fff;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all .15s;
}
.pers-filtre:hover { border-color: var(--couleur-accent); color: var(--couleur-accent); }
.pers-filtre.is-checked { background: var(--couleur-accent); color: #fff; border-color: var(--couleur-accent); }
.pers-filtre-count {
    font-size: 11px;
    opacity: .7;
}

.pers-section { margin-bottom: 40px; }

.pers-section-titre {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0ede6;
}
.pers-section-count {
    font-size: 12px;
    color: #bbb;
    font-weight: normal;
}

.pers-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

*/

.pers-carte {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: 1.5px solid transparent;
    border-radius: 10px;
    padding: 14px 8px 12px;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
}

.pers-carte:hover {
    background: #f9f8f5;
    border-color: #e8e4db;
}

.pers-carte.actif {
    background: #f0f7ff;
    border-color: var(--couleur-accent);
}

.pers-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-size: cover;
    background-position: center top;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.pers-initiales {
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    user-select: none;
}

.pers-sexe {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.pers-sexe-m {
    background: #bfdbfe;
    color: #1e40af;
}

.pers-sexe-f {
    background: #fbcfe8;
    color: #9d174d;
}

.pers-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pers-nom {
    font-size: 12px;
    font-weight: 500;
    color: #222;
    line-height: 1.3;
}

.pers-annee {
    font-size: 11px;
    color: #aaa;
}

.pers-nb {
    font-size: 11px;
    color: var(--couleur-accent);
    margin-top: 3px;
}


/*

#pers-albums-wrap {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #f0ede6;
}
#pers-albums-grille {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

@media screen and (max-width: 600px) {
    .pers-grille { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
    .pers-avatar { width: 52px; height: 52px; }
    .pers-initiales { font-size: 16px; }
    .pers-nom { font-size: 11px; }
}

*/


/* ════════════════════════════════════════════
   PERSONNES + FAMILLES (pfp)
   ════════════════════════════════════════════ */

#pfp-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 60px;
}


/* ── Pastilles ───────────────────────────── */

#pfp-filtres {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 20px 0 28px;
    padding: 0 20px;
}

#pfp-filtres-familles {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

#pfp-filtres-sep {
    width: 1px;
    height: 26px;
    background: #d0cdc6;
    margin: 0 12px;
    flex-shrink: 0;
}

#pfp-filtres-groupes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pfp-filtre {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e0ddd4;
    background: #fff;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all .15s;
    font-family: sans-serif;
}

.pfp-filtre:hover {
    border-color: var(--couleur-accent);
    color: var(--couleur-accent);
}

.pfp-filtre.is-checked {
    background: var(--couleur-accent);
    color: #fff;
    border-color: var(--couleur-accent);
}

.pfp-filtre-groupe {
    font-size: 12px;
    padding: 5px 11px;
    color: #888;
    border-color: #e8e4db;
}

.pfp-filtre-groupe.is-checked {
    background: #64748b;
    border-color: #64748b;
    color: #fff;
}


/* ── Sections ────────────────────────────── */

#pfp-sections {
    margin-bottom: 32px;
    padding: 0 20px;
}

.pfp-section {
    margin-bottom: 6px;
}

.pfp-section-titre {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    padding: 10px 0;
    border-bottom: 1px solid #f0ede6;
}


/* ── Bouton accordéon ────────────────────── */

.pfp-accord-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #e8e4db;
    border-radius: 20px;
    padding: 4px 12px 4px 10px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    transition: all .15s;
    font-family: sans-serif;
}

.pfp-accord-btn:hover {
    border-color: var(--couleur-accent);
    color: var(--couleur-accent);
}

.pfp-accord-btn.open {
    background: #f0f7ff;
    border-color: var(--couleur-accent);
    color: var(--couleur-accent);
}

.pfp-accord-chevron {
    transition: transform .2s;
    flex-shrink: 0;
}

.pfp-accord-btn.open .pfp-accord-chevron {
    transform: rotate(180deg);
}


/* ── Grille membres ──────────────────────── */

.pfp-membres {
    background: #fafaf8;
    border: 1px solid #f0ede6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 14px 14px 16px;
    margin-bottom: 6px;
}

.pfp-membres-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}


/* ── Bandeau sélection ───────────────────── */

#pfp-sel-wrap {
    margin: 16px 0 8px;
    padding: 10px 14px;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

#pfp-sel-titre {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#pfp-sel-nom {
    font-size: 13px;
    font-weight: bold;
    color: #1e40af;
}

#pfp-sel-count {
    font-size: 12px;
    color: #64748b;
}

#pfp-sel-arbre {
    margin-left: auto;
    font-size: 12px;
    color: var(--couleur-accent);
    text-decoration: none;
}

#pfp-sel-reset {
    font-size: 11px;
    padding: 3px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    color: #64748b;
    font-family: sans-serif;
}


/* ── Titre grille albums ─────────────────── */

#pfp-albums-titre {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0ede6;
    padding: 0 20px;
}

#pfp-albums-nb {
    font-size: 12px;
    color: #bbb;
    font-weight: normal;
}


/* ---- CARTE (Leaflet) ---- */

#map {
    height: 70vh;
    width: 80vw;
    margin: 0 auto;
}

#map a {
    text-decoration: none;
}

.lb-popup strong {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.lb-popup ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lb-popup li {
    padding: 3px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.lb-popup li:last-child {
    border-bottom: none;
}

.lb-popup a {
    color: var(--couleur-accent);
    text-decoration: none;
}

.lb-popup a:hover {
    text-decoration: underline;
}


/* ---- ARBRE GÉNÉALOGIQUE ---- */

.row {
    content: "";
    display: table;
    clear: both;
}

.column {
    float: left;
    margin: 0 5em;
}

.tree li .male:hover {
    background-color: lightblue;
    width: fit-content;
    transition: .3s;
}

.tree li .female:hover {
    background-color: lightpink;
    width: fit-content;
    transition: .3s;
}

.dates {
    color: gray;
    font-size: 10px;
    margin-left: .5em;
}

button,
label {
    font-size: 12px;
}


/* ---- VIDÉOS ---- */

#list-videos {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

#videos-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.video-card {
    border: 1px solid #e8e6e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fafaf8;
}

.video-player-wrap {
    background: #111;
    aspect-ratio: 16/9;
}

.video-player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.video-info {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.video-titre {
    font-size: 13px;
    font-weight: bold;
    color: #1a1a1a;
    flex: 1;
}

.video-date {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.video-dl {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--couleur-accent);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 8px;
    border: 1px solid var(--couleur-accent);
    border-radius: 20px;
    transition: all .15s;
}

.video-dl:hover {
    background: var(--couleur-accent);
    color: white;
}

@media screen and (max-width: 600px) {
    #videos-grille {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}


/* ---- AUDIO ---- */

#list-audio {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

#audio-player-wrap {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 28px;
    padding: 20px;
    background: #fafaf8;
    border: 1px solid #e8e6e0;
    border-radius: 12px;
}

#audio-cover {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

#audio-controls {
    flex: 1;
    min-width: 0;
}

#audio-titre-en-cours {
    font-size: 14px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#lecteur {
    width: 100%;
    accent-color: var(--couleur-accent);
}

#audio-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #e8e6e0;
}

.audio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-bottom: 1px solid #e8e6e0;
    cursor: pointer;
    transition: background .15s;
    border-radius: 4px;
}

.audio-item:hover {
    background: #f5f4f0;
}

.audio-item.en-cours {
    background: #e8f7ff;
    color: var(--couleur-accent);
}

.audio-num {
    font-size: 11px;
    color: #bbb;
    min-width: 22px;
    font-family: monospace;
}

.audio-item-titre {
    flex: 1;
    font-size: 13px;
    color: #333;
}

.audio-item.en-cours .audio-item-titre {
    color: var(--couleur-accent);
    font-weight: bold;
}

.audio-item-date {
    font-size: 11px;
    color: #bbb;
    white-space: nowrap;
}

.audio-play-icon {
    color: #ccc;
    flex-shrink: 0;
    transition: color .15s;
}

.audio-item:hover .audio-play-icon,
.audio-item.en-cours .audio-play-icon {
    color: var(--couleur-accent);
}

@media screen and (max-width: 480px) {
    #audio-player-wrap {
        flex-direction: column;
    }
    #audio-cover {
        width: 100%;
        height: 160px;
    }
}


/* ---- PAGE AJOUTER ---- */

#aj-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

#aj-header {
    margin-bottom: 24px;
}

#aj-header h2 {
    margin-bottom: 14px;
}

#aj-steps {
    display: flex;
    align-items: center;
}

.aj-step {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #bbb;
    white-space: nowrap;
}

.aj-step span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8e6e0;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    transition: all .2s;
}

.aj-step.active {
    color: #333;
}

.aj-step.active span {
    background: var(--couleur-accent);
    color: white;
}

.aj-step.done span {
    background: #22c55e;
    color: white;
}

.aj-step.done {
    color: #22c55e;
}

.aj-step-sep {
    flex: 1;
    height: 1px;
    background: #e0ddd4;
    margin: 0 8px;
    min-width: 16px;
    max-width: 50px;
}

.aj-panel {
    display: none;
    animation: ajFade .2s ease;
}

.aj-panel.active {
    display: block;
}

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

.aj-panel-inner {
    border: 1px solid #e8e6e0;
    border-radius: 12px;
    padding: 24px 26px;
    background: #fafaf8;
}

.aj-desc {
    font-size: 13px;
    color: #888;
    margin: 0 0 18px;
    line-height: 1.6;
}

.aj-field {
    margin-bottom: 16px;
}

.aj-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 560px) {
    .aj-field-row {
        grid-template-columns: 1fr;
    }
}

.aj-field label,
.aj-field-big label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.aj-opt {
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    color: #bbb;
    font-size: 11px;
}

.aj-req {
    color: var(--couleur-accent);
}

.aj-field input[type=text],
#aj-adresse1,
#aj-adresse2 {
    width: 100%;
    border: 1.5px solid #e0ddd4;
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: sans-serif;
    outline: none;
    background: white;
    transition: border-color .15s, box-shadow .15s;
}

.aj-field input:focus,
#aj-adresse1:focus,
#aj-adresse2:focus {
    border-color: var(--couleur-accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .1);
}

.aj-field-big {
    margin-bottom: 0;
}

#aj-dossier-wrap {
    display: flex;
    gap: 8px;
}

#aj-dossier-wrap input {
    flex: 1;
    border: 1.5px solid #e0ddd4;
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: monospace;
    outline: none;
    background: white;
    transition: border-color .15s, box-shadow .15s;
}

#aj-dossier-wrap input:focus {
    border-color: var(--couleur-accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .1);
}

.aj-hint {
    display: block;
    font-size: 11px;
    color: #bbb;
    margin-top: 4px;
}

#aj-parsed {
    background: white;
    border: 1.5px solid #e0ddd4;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 16px;
    animation: ajFade .2s ease;
}

.aj-parsed-grid {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.aj-parsed-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aj-parsed-sep {
    width: 1px;
    height: 36px;
    background: #e8e6e0;
    margin: 0 20px;
}

.aj-parsed-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #bbb;
    font-weight: bold;
}

.aj-parsed-val {
    font-size: 17px;
    font-weight: bold;
    color: #1a1a1a;
    font-family: monospace;
}

.aj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.aj-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border: 1.5px solid #e8e6e0;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
    background: white;
    user-select: none;
    color: #444;
}

.aj-tag:hover {
    border-color: var(--couleur-accent);
    color: #111;
}

.aj-tag input[type=checkbox] {
    width: 12px;
    height: 12px;
    accent-color: var(--couleur-accent);
    flex-shrink: 0;
}

.aj-tag:has(input:checked) {
    background: var(--couleur-accent);
    border-color: var(--couleur-accent);
    color: white;
    font-weight: bold;
}

.aj-tag-star:has(input:checked) {
    background: #0ea5e9;
    border-color: #0ea5e9;
}

.aj-personnes-grp {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

@media (max-width: 560px) {
    .aj-personnes-grp {
        grid-template-columns: 1fr;
    }
}

.aj-groupe-titre {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #bbb;
    font-weight: bold;
    margin-bottom: 5px;
}

#vignette-liste {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-height: 300px;
    overflow-y: auto;
    padding: 2px;
    margin-bottom: 10px;
}

.vignette-item {
    width: 105px;
    height: 68px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    transition: all .15s;
    flex-shrink: 0;
    background: #eee;
}

.vignette-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vignette-item:hover {
    border-color: var(--couleur-accent);
    transform: scale(1.05);
}

.vignette-item.selected {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .2);
}

#vignette-choisie {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #22c55e;
    padding: 6px 0;
    font-weight: bold;
}

.aj-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
    padding: 20px 0;
}

.aj-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e0ddd4;
    border-top-color: var(--couleur-accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

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

#aj-recap {
    background: #1a1b26;
    color: #c0caf5;
    border-radius: 8px;
    padding: 16px 18px;
    font-size: 12px;
    font-family: monospace;
    line-height: 1.75;
    overflow-x: auto;
    white-space: pre-wrap;
    margin: 0 0 18px;
}

.aj-btn-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.aj-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--couleur-accent);
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: sans-serif;
}

.aj-btn-primary:hover {
    background: #0ea5e9;
}

.aj-btn-primary:active {
    transform: scale(.98);
}

.aj-btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 9px 15px;
    background: white;
    color: #555;
    border: 1.5px solid #e0ddd4;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
    font-family: sans-serif;
}

.aj-btn-ghost:hover {
    background: #f5f4f0;
}

.aj-btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #15803d;
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background .15s;
    font-family: sans-serif;
}

.aj-btn-save:hover {
    background: #166534;
}

.aj-btn-save:disabled {
    background: #aaa;
    cursor: not-allowed;
}

#aj-msg {
    font-size: 13px;
    font-weight: bold;
}

.aj-warn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 14px;
}

.aj-warn svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.aj-warn-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.aj-warn-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}


/* Lieux */

#lieux-sep {
    border: none;
    border-top: 2px solid #e8e6e0;
    margin: 40px 0 32px;
}

#lieux-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

#lieux-titre {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 6px;
}

#lieux-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

@media (max-width: 640px) {
    #lieux-grid {
        grid-template-columns: 1fr;
    }
}

#lieux-carte-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#lieux-carte {
    height: 280px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #e0ddd4;
}

#lieux-coords {
    font-size: 12px;
    color: #999;
    text-align: center;
    font-family: monospace;
}

#lieux-form {
    display: flex;
    flex-direction: column;
}

#lieumeme-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

#lieumeme-rayon-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #888;
}

#lieumeme-rayon {
    width: 100px;
}

#lieumeme-rayon-val {
    min-width: 60px;
    font-size: 12px;
    color: var(--couleur-accent);
    font-weight: 500;
}

.lieumeme-dist {
    font-size: 10px;
    color: #bbb;
    display: block;
    margin-top: 1px;
}


/* ---- PARSE.PHP — galerie album ---- */

#parse-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

#parse-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0 28px;
    flex-wrap: wrap;
}

#parse-retour {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #e0ddd4;
    border-radius: 20px;
    transition: all .15s;
    white-space: nowrap;
    flex-shrink: 0;
    order: 0;
}

#parse-retour:hover {
    border-color: var(--couleur-accent);
    color: var(--couleur-accent);
}

#parse-titre-wrap {
    flex: 1;
    order: 1;
}

#parse-titre {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: #1a1a1a;
    text-align: left;
}

#parse-date {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 2px;
}

#parse-meta {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    order: 2;
    align-self: flex-start;
}

.parse-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #f5f4f0;
    border-radius: 20px;
    font-size: 12px;
    color: #555;
}

.parse-section-titre {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #aaa;
    font-weight: bold;
    margin-bottom: 14px;
    border-bottom: 1px solid #e8e6e0;
    padding-bottom: 8px;
}

#parse-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.parse-photo-item {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: #f0efeb;
    aspect-ratio: 4/3;
}

.parse-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
}

.parse-photo-item:hover img {
    transform: scale(1.03);
}

#parse-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    margin-bottom: 12px;
}

.parse-video-wrap video {
    width: 100%;
    border-radius: 8px;
    background: #000;
    display: block;
}

.parse-media-nom {
    font-size: 11px;
    color: #bbb;
    margin-top: 4px;
    text-align: center;
    font-family: monospace;
}

@media screen and (max-width: 600px) {
    #parse-grille {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 4px;
    }
    #parse-header {
        gap: 10px;
    }
    #parse-titre {
        font-size: 16px;
    }
}

#parse-note {
    order: 2;
    color: #999;
    font-style: italic;
    font-size: 13px;
    margin-top: 4px;
    align-self: flex-start;
}

#parse-tags {
    order: 4;
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.parse-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}

.parse-tag-famille {
    background: #e8f0fb;
    color: #2c5282;
    font-weight: 500;
}

.parse-tag-personne {
    background: #f5f4f0;
    color: #555;
}

.parse-tag:hover {
    opacity: .8;
}

#parse-popover {
    position: fixed;
    z-index: 100;
    background: #fff;
    border: 1px solid #e0ddd4;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    display: flex;
    flex-direction: column;
    min-width: 180px;
    overflow: hidden;
}

#parse-popover a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
}

#parse-popover a:hover {
    background: #f5f4f0;
}


/* ---- LIGHTBOX ---- */

#lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .92);
    align-items: center;
    justify-content: center;
}

#lightbox[style*="none"] {
    display: none !important;
}

#lb-img-wrap {
    position: relative;
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#lb-img {
    max-width: 100%;
    max-height: calc(100vh - 80px);
    object-fit: contain;
    border-radius: 4px;
    display: block;
    transition: opacity .15s;
}

#lb-img.loading {
    opacity: 0;
}

#lb-loader {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, .2);
    border-top-color: white;
    border-radius: 50%;
    animation: lb-spin .7s linear infinite;
    display: none;
}

#lb-loader.visible {
    display: block;
}

@keyframes lb-spin {
    to {
        transform: rotate(360deg);
    }
}

#lb-fermer {
    position: fixed;
    top: 16px;
    right: 20px;
}

#lb-prev {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

#lb-next {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

#lb-fermer,
#lb-prev,
#lb-next {
    background: rgba(255, 255, 255, .12);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 10000;
}

#lb-fermer:hover,
#lb-prev:hover,
#lb-next:hover {
    background: rgba(255, 255, 255, .25);
}

#lb-compteur {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .5);
    font-size: 12px;
    font-family: sans-serif;
    pointer-events: none;
}

@media (max-width: 600px) {
    #lb-img-wrap {
        max-width: 100vw;
    }
    #lb-prev {
        left: 4px;
    }
    #lb-next {
        right: 4px;
    }
}


/* ---- PAGE CONNEXION ---- */

#login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 20px;
}

#login-card {
    background: white;
    border: 1px solid #e8e6e0;
    border-radius: 16px;
    padding: 40px 48px;
    text-align: center;
    max-width: 380px;
    width: 100%;
}

#login-icon {
    margin-bottom: 20px;
}

#login-titre {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
    margin: 0 0 6px;
}

#login-desc {
    font-size: 13px;
    color: #999;
    margin: 0 0 28px;
}

.login-field {
    text-align: left;
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #666;
    margin-bottom: 6px;
}

.login-field input[type=password] {
    width: 100%;
    border: 1.5px solid #e0ddd4;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 16px;
    font-family: sans-serif;
    outline: none;
    background: #fafaf8;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    letter-spacing: .1em;
}

.login-field input[type=password]:focus {
    border-color: var(--couleur-accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .12);
    background: white;
}

#login-erreur {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    margin-bottom: 14px;
    text-align: left;
}

#login-btn {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    font-weight: bold;
    margin-top: 4px;
    border-radius: 8px;
}

@media screen and (max-width: 480px) {
    #login-card {
        padding: 28px 24px;
    }
}


/* ---- FOOTER ---- */

footer {
    margin: 50px;
    text-align: center;
}

.copyright {
    display: inline-block;
    text-decoration: none;
    color: black;
}

a.copyright .icone {
    display: block;
}

a.copyright:hover .icone {
    display: none;
}

a.copyright .titre {
    display: none;
    color: gray;
    font-size: 12px;
}

a.copyright:hover .titre {
    display: block;
}

.fa-skull-crossbones:before {
    content: "\f714";
}