/* ============================================================
   gallery-styles.css — Pages galeries photo (index + galeries MSP1/N3PP/FFP3)
   Réutilise les styles supervision pour links-grid / link-card
   ============================================================ */

/* Wrapper galerie — #main est dans #wrapper ; les templates ajoutent wrapper_class */
#wrapper.gallery-landing-wrapper #main,
#wrapper.gallery-page-wrapper #main,
#wrapper.gallery-timelapse-wrapper #main {
    background-color: #ffffff !important;
}

#wrapper.gallery-landing-wrapper .section-header,
#wrapper.gallery-page-wrapper .section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #008B74;
}
#wrapper.gallery-landing-wrapper .section-header h2,
#wrapper.gallery-page-wrapper .section-header h2 {
    margin: 0;
    color: #008B74;
    font-size: 2em;
}
#wrapper.gallery-landing-wrapper .section-header i,
#wrapper.gallery-page-wrapper .section-header i {
    font-size: 2em;
    color: #008B74;
}

#wrapper.gallery-landing-wrapper .links-grid,
#wrapper.gallery-page-wrapper .links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

#wrapper.gallery-landing-wrapper .link-card,
#wrapper.gallery-page-wrapper .link-card {
    display: block;
    padding: 18px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,139,116,0.15);
    border-left: 4px solid #008B74;
    text-decoration: none;
    color: #2c3e50;
    transition: transform 0.2s, box-shadow 0.2s;
}
#wrapper.gallery-landing-wrapper .link-card:hover,
#wrapper.gallery-page-wrapper .link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,139,116,0.25);
    color: #008B74;
}
#wrapper.gallery-landing-wrapper .link-card .label,
#wrapper.gallery-page-wrapper .link-card .label {
    font-weight: 600;
    font-size: 1.1em;
    display: block;
    margin-bottom: 4px;
}
#wrapper.gallery-landing-wrapper .link-card .hint,
#wrapper.gallery-page-wrapper .link-card .hint {
    font-size: 0.9em;
    color: #6c757d;
}

/* Grille photos */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
.gallery-item a:hover img {
    opacity: 0.9;
}

/* Pagination */
.gallery-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: wrap;
}
.gallery-pagination a,
.gallery-pagination span {
    padding: 8px 12px;
    text-decoration: none;
    color: #008B74;
}
.gallery-pagination .current {
    font-weight: 700;
}
.gallery-empty {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
}
.gallery-empty i {
    font-size: 3em;
    margin-bottom: 16px;
    color: #008B74;
}
.gallery-back {
    display: inline-block;
    margin: 8px 8px 8px 0;
    padding: 8px 16px;
    background: #008B74;
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
}
.gallery-back:hover {
    background: #00B794;
}

/* Landing page galeries : 3 cartes avec dernière photo + texte */
.gallery-landing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}
.gallery-landing-header {
    margin-bottom: 36px;
    text-align: center;
}
.gallery-landing-header h1 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 2em;
}
.gallery-landing-header h1 i {
    margin-right: 10px;
    color: #008B74;
}
.gallery-landing-header p {
    margin: 0;
    color: #6c757d;
    font-size: 1.05em;
    line-height: 1.5;
}
.gallery-landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.gallery-landing-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,139,116,0.12);
    border: 1px solid rgba(0,139,116,0.2);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-landing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,139,116,0.2);
}
.gallery-landing-card-image {
    aspect-ratio: 4/3;
    background: #f0f4f3;
    overflow: hidden;
}
.gallery-landing-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-landing-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3a8;
}
.gallery-landing-placeholder i {
    font-size: 3em;
    margin-bottom: 8px;
}
.gallery-landing-card-body {
    padding: 20px;
}
.gallery-landing-card-body h2 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #008B74;
}
.gallery-landing-card-body p {
    margin: 0 0 12px 0;
    font-size: 0.95em;
    line-height: 1.5;
    color: #4a5568;
}
.gallery-landing-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #008B74;
    font-size: 0.9em;
}
.gallery-landing-card:hover .gallery-landing-cta {
    color: #00B794;
}
