/* ==========================================================================
   Club Vosgien de la Vezouze — Galerie Piwigo
   piwigo-modernise.css
   Habillage moderne posé PAR-DESSUS styles.css (thème existant).
   Ne redéfinit pas les sprites d'icônes ni la mécanique Piwigo : se
   concentre sur la mise en page, les couleurs, les cartes et le
   responsive mobile, sans toucher au HTML existant.
   ========================================================================== */

:root {
  --green-dark: #1f3d2b;
  --green: #2c5233;
  --green-mid: #3f6b47;
  --green-tint: #eaf3ea;
  --cream: #fdfaf3;
  --orange: #dd8a2e;
  --text: #333333;
  --text-muted: #767676;
  --border: #e7e4dc;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 16px rgba(20, 40, 20, .08);
  --shadow-hover: 0 10px 26px rgba(20, 40, 20, .16);
  --sidebar-width: 300px;
}
html {
    scroll-behavior: auto;
}

* {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------
   Structure principale : sidebar + contenu
   -------------------------------------------------------------------- */

#wrapper {
  background: transparent;
}

#coeur {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

#menubar {
  float: none;
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  margin: 0;
}

#menubar dl {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  margin: 0 0 20px;
  overflow: hidden;
}

#menubar dt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-family: Georgia, serif;
  font-size: 1.1em;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-tint);
  text-align: left;
}

#menubar dt a {
  color: var(--green-dark);
  border: 0;
}

.menubarFilter {
  float: none;
  margin: 0;
  opacity: .7;
}

.menubarFilter:hover {
  opacity: 1;
}

#menubar dd {
  margin: 0;
  padding: 6px;
}

#menubar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Eléments */
#menubar li {
  position: relative;
  padding: 6px 0;
  line-height: 1.35;
}

/* Sous-listes */
#menubar ul ul {
  margin: 6px 0 0 10px;
  padding-left: 8px;
  border-left: 2px solid #e8ece8;
}

/* Liens */
#menubar li > a {
  color: #31583d;
  text-decoration: none;
  transition: .2s;
}

#menubar li > a:hover {
  color: var(--primary);
}

/* Elément sélectionné */
#menubar li.selected > a {
  font-weight: 700;
  color: var(--primary);
}

/* Badges */
#menubar .badge {
  float: right;
  display: inline-block;
  min-width: 34px;
  padding: 3px 10px;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  background: #edf7ef;
  border-radius: 999px;
}

#menubar li:hover .badge {
  background: #fff;
}

.badge::before,
.badge::after {
  content: none !important; /* on remplace les crochets par la pastille */
}

.totalImages {
  margin: 8px 18px 14px;
  font-size: .85em;
  color: var(--text-muted);
  text-align: left;
}

#menuTagCloud {
  text-align: left;
  padding: 6px 18px 14px;
}

#quickconnect {
  padding: 0 18px 14px;
}

#quickconnect fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

#quickconnect legend {
  display: none;
}

#quickconnect div {
  margin: 0 0 10px;
}

#quickconnect label {
  display: block;
  margin-bottom: 4px;
  font-size: .85em;
  color: var(--text-muted);
}

#mbIdentification dd > ul {
  padding: 4px 18px 4px;
}

#mbIdentification dd > ul li {
  padding: 6px 0;
  border: 0;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  background: #f7f6f2;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

input[type="submit"] {
  padding: 8px 18px;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

input[type="submit"]:hover {
  background: var(--green-dark);
}

/* --------------------------------------------------------------------
   Contenu principal
   -------------------------------------------------------------------- */

#content,
#content.content {
  flex: 1;
  min-width: 0;
  margin-left: 0;
  padding: 18px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.titrePage {
  position: relative;
  margin-bottom: 18px;
  padding: 0 0 14px;
  text-align: left;
}

.titrePage::before {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  margin-bottom: 14px;
  background: var(--orange);
}

.titrePage h2 {
  padding: 0;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.7em;
  color: var(--green-dark);
  text-align: left;
  background: transparent;
}

.titrePage h2 a {
  color: var(--green-dark);
  border: 0;
}

.titrePage h2 a:hover {
  color: var(--orange);
}

.titrePage h2 .badge {
  margin-left: 6px;
  color: var(--orange);
  background: none;
}

/* ===========================
   TITRE DE PAGE / FIL D'ARIANE
   =========================== */

.titrePage {
  margin: 0 0 3px;
  text-align: center;
}

.titrePage h2 {
  margin: 0;
  line-height: 1.35;
  font-weight: 400;
}

/* Fil d'Ariane */
.titrePage h2 > a:not(:last-of-type) {
  font-size: 1rem;
  font-weight: 600;
  color: #6d826d;
  text-decoration: none;
  transition: color .2s;
}

.titrePage h2 > a:not(:last-of-type):hover {
  color: #2f5b2f;
  text-decoration: underline;
}

/* Titre de l'album */
.titrePage h2 > a:last-of-type {
  display: block;
  max-width: 700px;
  margin: .7rem auto 0;
  padding-top: .6rem;
  border-top: 1px solid #d7ddd7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: #2f5b2f;
  text-decoration: none;
}

.titrePage h2 > a:last-of-type:hover {
  text-decoration: none;
}

/* Badge nombre de photos */
.titrePage .badge {
  display: inline-block;
  margin-left: .5rem;
  padding: .18rem .55rem;
  background: #5f8a52;
  color: #fff;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.titrePage h2 {
  position: relative;
  padding-bottom: 1rem;
}

.titrePage .badge {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.categoryActions {
  float: none;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 10px;
}

.additional_info {
  margin: 0 0 18px;
  padding: 10px 16px;
  color: var(--text-muted);
  background: var(--green-tint);
  border-radius: var(--radius-sm);
  text-align: left;
}

.mcs-side-results {
  margin: 0 0 18px;
}

.mcs-side-results > div {
  background: var(--green);
  border-radius: 999px;
}

.mcs-side-results > div:hover {
  background: var(--green-dark);
}

.mcs-side-results a {
  color: #fff;
  border: 0;
}

/* --------------------------------------------------------------------
   Liste des albums (page d'accueil / sous-catégories)
   -------------------------------------------------------------------- */

ul.thumbnailCategories {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}

.thumbnailCategories li {
  float: none;
  width: 100% !important;
  margin: 0 0 22px !important;
}

.thumbnailCategories li > div,
ul.thumbnailCategories > li.odd > div,
ul.thumbnailCategories > li.even > div {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}

.thumbnailCategories li > div:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.thumbnailCategory .illustration {
  float: none;
  width: 100% !important;
  margin: 0;
  text-align: center;
}

.thumbnailCategory .illustration img {
  width: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
  max-height: 200px;

}

.thumbnailCategory .description {
  height: auto !important;
  margin-right: 0 !important;
  padding: 20px 24px 24px;
  font-size: 1em;
}

.thumbnailCategory .description h3 {
  margin: 0 0 6px;

}

.thumbnailCategory .description h3 a {
  color: var(--green-dark);
  border: 0;
}

.thumbnailCategory .description h3 a:hover {
  color: var(--orange);
}

.thumbnailCategories .Nb_images {
  color: var(--orange) !important;
  font-weight: 500;
  font-size: .75em;
  text-align: center;
  margin: 0 0 6px;
}

.thumbnailCategory .description p,
.thumbnailCategory .description h3,
.thumbnailCategory .description h3 a {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.thumbnailCategories p {
  text-align: left;
}

.thumbnailCategory .description p {
  color: var(--text);
  line-height: 1.55;
}

@media (min-width: 600px) {
  ul.thumbnailCategories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .thumbnailCategories li {
    margin: 0 !important;
  }
}

/* --------------------------------------------------------------------
   Grille de miniatures (photos d'un album)
   -------------------------------------------------------------------- */

.thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
}

.thumbnails li {
  margin: 0;
  padding: 0;
}

.thumbnails li > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.thumbnails img {
  display: block;
  width: 100%;

  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #eee;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.thumbnails a:hover img {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-hover);
}

.thumbnails .thumbLegend {
  display: none;
}

/* --------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------- */

@media (max-width: 900px) {
  .thumbnails {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .thumbnails {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }
}

/* --------------------------------------------------------------------
   Visionneuse d'image
   -------------------------------------------------------------------- */

#imageHeaderBar {
  width: auto;
  padding: 0 0 10px;
  text-align: left;
}

#imageHeaderBar .browsePath {
  float: none;
  margin: 0;
  font-size: .95em;
  color: var(--text-muted);
  line-height: 1.5;
}

#imageHeaderBar .browsePath a {
  color: var(--green);
  text-decoration: none;
}

#imageHeaderBar .browsePath a:hover {
  color: var(--orange);
}

#imageHeaderBar h2 {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #486548;
  background: none;
}

/* --------------------------------------------------------------------
   Barre d'outils
   -------------------------------------------------------------------- */

#imageToolBar {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  margin: 0 0 14px;
  padding: 8px 14px;
  background: var(--green-tint);
  border-radius: var(--radius-md);
}

#imageToolBar .imageNumber {
  justify-self: start;
  margin: 0;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 600;
}

#imageToolBar .navigationButtons {
  justify-self: center;
  display: flex;
  gap: 8px;
}

#imageToolBar .navigationButtons .pwg-state-disabled {
  display: none !important;
}

#imageToolBar .actionButtons {
  justify-self: end;
  display: flex;
  gap: 8px;
}

#imageToolBar .pwg-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  transition: .18s ease;
}

#imageToolBar .pwg-button:hover {
  background: var(--green);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .16);
}

#imageToolBar .pwg-button:hover .pwg-icon {
  color: #fff;
}

/* --------------------------------------------------------------------
   Photo principale
   -------------------------------------------------------------------- */

#theImageAndInfos {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

#theImage {
  flex: 1 1 480px;
  text-align: center;
}

#theImage img#theMainImage {
  display: block;
  max-width: 96%;
  height: auto;
  margin: auto;
  border: 0 !important;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

/* --------------------------------------------------------------------
   Informations
   -------------------------------------------------------------------- */

#imageInfos {
  flex: 1 1 280px;
  min-height: 0;
  padding: 18px;
  background: #fafbf8;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.navThumbs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.navThumb {
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  transition: .2s;
}

.navThumb:hover {
  border-color: var(--green) !important;
  transform: translateY(-2px);
}

div.thumbHover {
  width: auto;
  height: auto;
  padding: 14px 8px;
  border: 0;
  font-size: .85em;
  color: var(--text-muted);
  line-height: 1.4;
}

.imageInfoTable {
  display: block;
  width: 100%;
  margin: 0;
}

.imageInfo {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #ecefe8;
}

.imageInfo:last-child {
  border-bottom: 0;
}

.imageInfo dt {
  font-weight: 600;
  color: var(--text-muted);
}

.imageInfo dd {
  text-align: right;
  color: var(--text);
}

.imageInfo ul {
  padding: 0;
  list-style: none;
  text-align: right;
}

/* --------------------------------------------------------------------
   Commentaires
   -------------------------------------------------------------------- */

#comments {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

#comments h3 {
  color: var(--green-dark);
  font-size: 1.1rem;
}

.commentElement {
  background: #fafaf7;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------
   Icônes visionneuse
   -------------------------------------------------------------------- */

.pwg-button-text {
  display: none !important;
}

.pwg-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.pwg-icon {
  position: relative;
  display: block;
  width: 17px;
  height: 17px;
  box-sizing: border-box;
  background: none !important;
  color: inherit;
}

/* --------------------------------------------------------------------
   Retour aux miniatures
   -------------------------------------------------------------------- */

.pwg-icon-arrow-n::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid currentColor;
  transform: translate(-50%, -35%);
}

/* --------------------------------------------------------------------
   Précédente
   -------------------------------------------------------------------- */

.pwg-icon-arrow-w::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 8px solid currentColor;
  transform: translate(-35%, -50%);
}

/* --------------------------------------------------------------------
   Suivante
   -------------------------------------------------------------------- */

.pwg-icon-arrow-e::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  transform: translate(-65%, -50%);
}

/* --------------------------------------------------------------------
   Diaporama
   -------------------------------------------------------------------- */

.pwg-icon-slideshow {
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.pwg-icon-slideshow::before {
  content: "";
  position: absolute;
  left: 57%;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  transform: translate(-50%, -50%);
}

/* --------------------------------------------------------------------
   Télécharger
   -------------------------------------------------------------------- */

.pwg-icon-save {
  border-bottom: 1.8px solid currentColor;
}

.pwg-icon-save::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1px;
  width: 2px;
  height: 8px;
  background: currentColor;
  transform: translateX(-50%);
}

.pwg-icon-save::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transform: translateX(-50%);
}

/* --------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------- */

#pied {
  margin-top: 30px;
}

#copyright {
  padding: 18px 0;
  color: var(--text-muted);
  font-size: .8em;
  border-top: 1px solid var(--border);
}

#copyright a {
  color: var(--green);
}

/* --------------------------------------------------------------------
   Responsive mobile
   -------------------------------------------------------------------- */

@media (max-width: 900px) {
  #coeur {
    display: flex;
    flex-direction: column;
  }

  #content {
    order: 1;
  }

  #menubar {
    order: 2;
    width: 100%;
    flex-basis: auto;
    margin-top: 20px;
  }

  #content,
  #content.content {
    padding: 16px;
  }

  .thumbnailCategory .illustration img {
    height: 200px;
  }
}

@media (max-width: 600px) {
  #menu ul {
    justify-content: flex-start;
    overflow-x: auto;
  }

  #menu a {
    padding: 12px 14px;
    font-size: .88em;
    white-space: nowrap;
  }

  #coeur {
    padding: 0 12px;
    gap: 16px;
    margin: 16px auto;
  }

  #content,
  #content.content {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .titrePage h2 {
    font-size: 1.35em;
  }

  #theImageAndInfos {
    flex-direction: column;
  }

  .imageInfo {
    flex-direction: column;
    gap: 2px;
  }

  .imageInfo dd {
    text-align: left;
  }

  .imageInfo ul {
    text-align: left;
  }

  .fancybox__nav .f-button {
    opacity: .35;
  }

  .fancybox__nav .f-button:hover,
  .fancybox__nav .f-button:focus {
    opacity: .9;
  }
}

.switchBox {
  display: none;
}

.switchBox.switchBoxOpened {
  display: block;
}
/* Masque les flèches pendant le diaporama */
@media (max-width: 768px) {
    .has-autoplay .f-button.is-prev,
    .has-autoplay .f-button.is-next {
        display: none;
    }
}


.navigationBar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .2rem;
    line-height: 1.6;
    text-align: center;
}

.navigationBar a,
.navigationBar span {
    white-space: nowrap;
}

.navigationBar a {
    padding: .15em .35em;
    border-radius: 4px;
}

.navigationBar .pageNumberSelected {
    display: inline-block;
    min-width: 1.8em;
    padding: .15em .45em;
    border-radius: 4px;
    background: #edf3fb;
    border: 1px solid #d3deef;
    font-weight: bold;
    color: #2d5aa7;
}