/* Tours dans le temps — charte et timeline verticale */

:root {
    --color-bg: #1a1920;
    --color-surface: #24222a;
    --color-card: #2d2b34;
    --color-text: #e8e6e1;
    --color-text-muted: #9a958a;
    --color-accent: #c9a227;
    --color-accent-soft: rgba(201, 162, 39, 0.25);
    --color-line: #3d3a45;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', system-ui, sans-serif;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Navbar */
.navbar {
    background: var(--color-surface) !important;
    padding: 0.75rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand-logo {
    height: 36px;
    width: auto;
    vertical-align: middle;
}

.nav-link {
    color: var(--color-text-muted) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent) !important;
}

.nav-link.active {
    background: var(--color-accent-soft);
}

/* Page hero */
.page-hero {
    padding: 4rem 0 3rem;
    text-align: center;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.page-lead {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    margin-top: 4rem;
    background: var(--color-surface);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.site-footer__credit {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.site-footer__link {
    color: var(--color-accent);
    text-decoration: none;
}

.site-footer__link:hover {
    text-decoration: underline;
}

/* Documentation */
.doc-content {
    max-width: 720px;
}

.doc-nav {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.1));
}

.doc-nav a {
    color: var(--color-accent);
    text-decoration: none;
}

.doc-nav a:hover {
    text-decoration: underline;
}

.doc-section {
    margin-bottom: 2.5rem;
}

.doc-section h2 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    padding-top: 0.25rem;
    scroll-margin-top: 1rem;
}

.doc-section ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.doc-section li {
    margin-bottom: 0.35rem;
}

.doc-section p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* ——— Timeline verticale (style type CodePen) ——— */
.timeline-wrap {
    padding: 2rem 0 4rem;
}

.container--timeline {
    position: relative;
    max-width: 960px;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-line);
    border-radius: 2px;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-top: 0.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item--left {
    flex-direction: row;
}

.timeline-item--right {
    flex-direction: row-reverse;
}

.timeline-marker {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    width: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timeline-year {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--color-accent);
    color: var(--color-bg);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    border-radius: 50%;
    box-shadow: var(--shadow), 0 0 0 4px var(--color-bg);
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.timeline-item--left .timeline-content {
    padding-right: calc(40px + 1rem);
}

.timeline-item--right .timeline-content {
    padding-left: calc(40px + 1rem);
}

.timeline-card {
    display: block;
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.timeline-card__img-wrap {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--color-surface);
    overflow: hidden;
}

.timeline-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: top;
}

.timeline-card__body {
    display: block;
    padding: 1rem;
}

.timeline-card__place {
    font-weight: 600;
    color: var(--color-text);
    display: block;
    margin-bottom: 0.25rem;
}

.timeline-card__caption {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline-empty {
    background: var(--color-card);
    padding: 2rem;
    border-radius: var(--radius);
    color: var(--color-text-muted);
    margin: 0;
}

/* Responsive timeline : en dessous de 768px, ligne à gauche, contenu à droite */
@media (max-width: 767px) {
    .timeline-line {
        left: 32px;
        transform: none;
    }

    .timeline-item,
    .timeline-item--right {
        flex-direction: row;
        gap: 1rem;
    }

    .timeline-marker {
        width: 64px;
    }

    .timeline-year {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    .timeline-item--left .timeline-content,
    .timeline-item--right .timeline-content {
        padding-left: 0;
        padding-right: 0;
    }

    .timeline-cards {
        grid-template-columns: 1fr;
    }
}

/* ——— Accueil ——— */
.home-intro {
    padding: 3rem 0 4rem;
    text-align: center;
}

.home-intro .page-title {
    margin-bottom: 1rem;
}

.home-intro .page-lead {
    max-width: 36em;
    margin-left: auto;
    margin-right: auto;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.home-actions .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.home-actions .btn:hover {
    transform: translateY(-2px);
}

.btn-timeline {
    background: var(--color-accent);
    color: var(--color-bg);
    border: none;
}

.btn-timeline:hover {
    background: #d4af37;
    color: var(--color-bg);
    box-shadow: 0 6px 24px var(--color-accent-soft);
}

.btn-outline-light {
    border: 2px solid var(--color-line);
    color: var(--color-text);
}

.btn-outline-light:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.alert-db {
    max-width: 28em;
    margin: 1.5rem auto 0;
    padding: 0.75rem 1rem;
    background: rgba(201, 162, 39, 0.12);
    border: 1px solid var(--color-accent-soft);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.alert-db strong {
    color: var(--color-accent);
}

/* Formulaires auth + admin */
.auth-form-wrap {
    max-width: 400px;
    margin: 0 auto;
}

.auth-form {
    background: var(--color-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.06);
}

.auth-form__footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.auth-form__footer a {
    color: var(--color-accent);
}

.form-control--dark,
.form-select--dark {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    color: var(--color-text);
}

.form-control--dark:focus,
.form-select--dark:focus {
    background: var(--color-surface);
    border-color: var(--color-accent);
    color: var(--color-text);
    box-shadow: 0 0 0 0.2rem var(--color-accent-soft);
}

.form-control--dark::placeholder {
    color: var(--color-text-muted);
}

.form-label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
    color: #f8a0a8;
}

.alert-success {
    background: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.4);
    color: #8dd5a8;
}

.alert-success a {
    color: var(--color-accent);
}

.alert-info {
    background: rgba(13, 202, 240, 0.12);
    border-color: rgba(13, 202, 240, 0.4);
    color: #9dd9e8;
}

.alert-info code {
    background: rgba(0,0,0,0.2);
    padding: 0.1em 0.4em;
    border-radius: 4px;
}

/* ——— Landing page ——— */
.landing-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    overflow: hidden;
}

.landing-hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 50%, #16141a 100%);
    background-image:
        linear-gradient(135deg, rgba(201, 162, 39, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 70%);
}

.landing-hero__inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.landing-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.landing-hero__lead {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 32em;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.landing-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.landing-hero__actions .btn-lg {
    padding: 0.9rem 1.75rem;
    font-size: 1.05rem;
}

.landing-section {
    padding: 4rem 1rem;
}

.landing-section--alt {
    background: var(--color-surface);
}

.landing-section__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.landing-section__text {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 40em;
    margin: 0 auto;
    line-height: 1.7;
}

.landing-section__text--small {
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.landing-feature {
    display: block;
    padding: 2rem;
    background: var(--color-card);
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255,255,255,0.06);
}

.landing-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.landing-feature__icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.landing-feature__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.landing-feature__text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.landing-feature__link {
    font-size: 0.9rem;
    color: var(--color-accent);
    font-weight: 500;
}

.landing-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

.landing-photo-card {
    display: block;
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-photo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.landing-photo-card__img-wrap {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--color-surface);
    overflow: hidden;
}

.landing-photo-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-photo-card__body {
    display: block;
    padding: 0.75rem 1rem;
}

.landing-photo-card__place {
    font-weight: 600;
    color: var(--color-text);
    display: block;
}

.landing-photo-card__year {
    font-size: 0.85rem;
    color: var(--color-accent);
}

.landing-cta {
    padding: 4rem 1rem;
    background: var(--color-surface);
}

.landing-cta__title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.landing-cta__text {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* ——— Admin ——— */
.admin-content .container {
    max-width: 1100px;
}

.admin-card {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.06);
    height: 100%;
}

.admin-card--highlight {
    border-color: var(--color-accent-soft);
    background: rgba(201, 162, 39, 0.08);
}

.admin-card__title {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.admin-card__value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.admin-table-wrap {
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}

.admin-table-wrap .table {
    margin-bottom: 0;
}

.admin-table-wrap .table th,
.admin-table-wrap .table td {
    border-color: rgba(255,255,255,0.06);
    padding: 0.75rem 1rem;
}

.admin-form-wrap {
    max-width: 560px;
}

.admin-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.admin-photo-card {
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}

.admin-photo-card__img-link {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--color-surface);
    overflow: hidden;
}

.admin-photo-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-photo-card__body {
    padding: 1rem;
}

.admin-photo-card__year {
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.admin-photo-card__caption {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.5rem 0;
}

.admin-contrib-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-contrib-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 576px) {
    .admin-contrib-card {
        grid-template-columns: 1fr;
    }
}

.admin-contrib-card__img-wrap {
    aspect-ratio: 4 / 3;
    background: var(--color-surface);
    border-radius: 8px;
    overflow: hidden;
}

.admin-contrib-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-contrib-card__meta {
    margin: 0 0 0.25rem;
}

.admin-contrib-card__date {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.admin-contrib-card__caption {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.place-edit-map {
    height: 320px;
    border-radius: var(--radius);
    background: var(--color-surface);
}

.page-hero--compact {
    padding: 2rem 0 1.5rem;
}

.map-page-wrap {
    height: calc(100vh - 200px);
    min-height: 400px;
}

.map-full {
    height: 100%;
    width: 100%;
}

.lieu-description {
    color: var(--color-text-muted);
    max-width: 50em;
}

.photo-single-wrap {
    max-width: 800px;
}

.photo-single__main {
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.06);
}

.photo-single__img {
    width: 100%;
    height: auto;
    display: block;
}

.photo-single__caption {
    padding: 1rem 1.25rem;
    margin: 0;
    color: var(--color-text-muted);
}
