/*
 * SkyToMacro - V0.1
 * Base volontairement classique, lisible et neutre.
 * Le logo, la typographie et la palette seront adaptés plus tard.
 */

:root {
    --background: #ffffff;
    --background-secondary: #f4f4f4;
    --surface: #ffffff;
    --text: #222222;
    --text-secondary: #666666;
    --border: #d6d6d6;
    --border-dark: #bcbcbc;
    --primary: #3f5360;
    --primary-dark: #2e3d46;
    --link: #2f5266;
    --max-width: 1320px;
    --radius: 4px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--background);
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: min(calc(100% - 32px), var(--max-width));
    margin-inline: auto;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.site-header__top {
    padding: 18px 0 0;
}

.site-header__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    padding-bottom: 14px;
}

.brand:hover {
    text-decoration: none;
}

.brand__logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 42px;
    border: 1px dashed var(--border-dark);
    background: var(--background-secondary);
    color: var(--text-secondary);
    font-size: 12px;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__text strong {
    font-size: 24px;
}

.brand__text small {
    margin-top: 4px;
    color: var(--text-secondary);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.main-nav a {
    display: block;
    padding: 15px 14px 13px;
    color: var(--text);
    border-bottom: 3px solid transparent;
}

.main-nav a:hover {
    background: var(--background-secondary);
    text-decoration: none;
}

.main-nav a.is-active {
    border-bottom-color: var(--primary);
    font-weight: 700;
}

.site-main {
    flex: 1 0 auto;
}

.page-intro {
    padding: 34px 0 28px;
    border-bottom: 1px solid var(--border);
    background: var(--background-secondary);
}

.page-intro--home {
    padding: 46px 0;
}

.page-intro--compact {
    padding: 24px 0;
}

.page-intro h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
}

.page-intro p {
    margin: 0;
    color: var(--text-secondary);
    max-width: 850px;
}

.breadcrumbs {
    margin-bottom: 8px !important;
    font-size: 14px;
}

.section-block {
    padding: 42px 0;
}

.section-block--muted {
    background: var(--background-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.section-heading h2 {
    margin: 0;
    font-size: 26px;
}

.eyebrow {
    margin: 0 0 3px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.home-feature {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 32px;
    align-items: center;
    padding-top: 42px;
}

.feature-photo {
    min-height: 430px;
}

.feature-photo__text h2 {
    margin-top: 0;
    font-size: 30px;
    line-height: 1.2;
}

.placeholder-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border: 1px solid var(--border-dark);
    background:
        linear-gradient(135deg, #dadada 0%, #f2f2f2 50%, #d0d0d0 100%);
    color: #666;
    text-align: center;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.photo-card {
    min-width: 0;
}

.photo-card__image {
    aspect-ratio: 3 / 2;
    min-height: 0;
    overflow: hidden;
    color: var(--text-secondary);
}

.photo-card__image:hover {
    text-decoration: none;
    outline: 2px solid var(--border-dark);
    outline-offset: -2px;
}

.photo-card__body {
    padding: 10px 2px 0;
}

.photo-card__body h2,
.photo-card__body h3 {
    margin: 0 0 3px;
    font-size: 18px;
    line-height: 1.3;
}

.photo-card__body p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.collection-grid--large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collection-card {
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.collection-card > h3,
.collection-card > p,
.collection-card > a {
    margin-left: 16px;
    margin-right: 16px;
}

.collection-card > h3 {
    margin-top: 16px;
    margin-bottom: 6px;
}

.collection-card > p {
    min-height: 48px;
    margin-top: 0;
    color: var(--text-secondary);
}

.collection-card > a {
    display: inline-block;
    margin-bottom: 16px;
}

.collection-card__cover {
    aspect-ratio: 16 / 7;
    min-height: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
}

.collection-card__body {
    padding: 18px;
}

.collection-card__body h2 {
    margin-top: 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 28px;
    padding-top: 34px;
    padding-bottom: 48px;
}

.filters-panel {
    align-self: start;
    border: 1px solid var(--border);
    background: var(--background-secondary);
    padding: 16px;
}

.filters-panel h2 {
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-size: 20px;
}

.filters-panel form {
    display: grid;
    gap: 14px;
}

.filters-panel label {
    display: grid;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
}

select,
input[type="search"],
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font: inherit;
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.gallery-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-toolbar select {
    width: auto;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.pagination a,
.pagination strong,
.pagination span {
    min-width: 38px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    background: #fff;
    text-align: center;
}

.pagination strong {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.pagination .is-disabled {
    color: #999;
    background: var(--background-secondary);
}

.button {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid var(--primary-dark);
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.button--secondary {
    border-color: var(--border-dark);
    background: #fff;
    color: var(--text);
}

.button--secondary:hover {
    background: var(--background-secondary);
}

.photo-detail {
    padding-top: 32px;
    padding-bottom: 50px;
}

.photo-detail__image {
    min-height: 640px;
}

.photo-detail__description {
    max-width: 950px;
    padding: 26px 0;
}

.photo-detail__description h2 {
    margin-top: 0;
}

.info-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.info-box {
    border: 1px solid var(--border);
    background: var(--surface);
}

.info-box h2 {
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--background-secondary);
    font-size: 20px;
}

.info-box dl {
    margin: 0;
}

.info-box dl > div {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) 2fr;
    border-bottom: 1px solid var(--border);
}

.info-box dl > div:last-child {
    border-bottom: 0;
}

.info-box dt,
.info-box dd {
    margin: 0;
    padding: 9px 14px;
}

.info-box dt {
    font-weight: 700;
    background: #fafafa;
}

.photo-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.photo-navigation a:last-child {
    text-align: right;
}

.narrow-content {
    max-width: 900px;
}

.text-panel {
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.text-panel h2 {
    margin-top: 0;
}

.site-footer {
    flex-shrink: 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-dark);
    background: #efefef;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding-top: 28px;
    padding-bottom: 24px;
}

.site-footer__grid p {
    margin: 4px 0 0;
    color: var(--text-secondary);
}

.site-footer__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 16px;
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 12px;
    padding-bottom: 14px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
}

@media (max-width: 980px) {
    .site-header__inner {
        align-items: stretch;
        flex-direction: column;
        gap: 0;
    }

    .brand {
        padding-bottom: 10px;
    }

    .main-nav {
        border-top: 1px solid var(--border);
    }

    .home-feature {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-layout {
        grid-template-columns: 1fr;
    }

    .filters-panel form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-detail__image {
        min-height: 420px;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(calc(100% - 20px), var(--max-width));
    }

    .main-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-nav a {
        padding: 10px;
        border-bottom-width: 2px;
    }

    .page-intro,
    .page-intro--home {
        padding: 26px 0;
    }

    .photo-grid,
    .collection-grid,
    .collection-grid--large,
    .info-columns {
        grid-template-columns: 1fr;
    }

    .filters-panel form {
        grid-template-columns: 1fr;
    }

    .gallery-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-toolbar label {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-toolbar select {
        width: 100%;
    }

    .photo-detail__image,
    .feature-photo {
        min-height: 300px;
    }

    .info-box dl > div {
        grid-template-columns: 1fr;
    }

    .info-box dt {
        padding-bottom: 3px;
    }

    .info-box dd {
        padding-top: 3px;
    }

    .photo-navigation {
        grid-template-columns: 1fr;
    }

    .photo-navigation a,
    .photo-navigation a:last-child {
        text-align: left;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .site-footer__bottom {
        flex-direction: column;
        gap: 3px;
    }
}

/* V0.2 - affichage des vraies photographies */
.real-photo {
    display: block;
    position: relative;
    overflow: hidden;
    background: #111;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.real-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.photo-detail__image.real-photo img {
    object-fit: contain;
}

.feature-photo.real-photo img {
    object-fit: cover;
}

.collection-card__cover.real-photo {
    min-height: 0;
    aspect-ratio: 16 / 7;
    border-bottom: 1px solid var(--border);
}


/* V0.4 - page matériel */
.equipment-public-list {
    margin: 0;
    padding-left: 22px;
}

.equipment-public-list li + li {
    margin-top: 6px;
}
