:root {
    --gap: 6px;
    --gap-radius: 8px;
    --cream-1: #eef1de;
    --cream-2: #ffffff;
    --green-dark: #364227;
    --green-sage: #7c9a55;
    --terracotta: #c1583b;
    --text-main: #3a3a3a;
}
* { box-sizing: border-box; }
.height-auto {
  height: auto !important;
}
.w-100 {
  width: 100% !important;
}
body {
    padding: 80px 0 0 0;
}
body .top-bar {
    box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
    background-color: var(--header_background);
}
.page_layout {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    gap: 20px;
}
.top-bar {
    margin: 0;
    background-color: var(--header_background);
}
.border-red {
    border-left: 5px solid var(--primary-red);   
}
.border-green {
    border-left: 5px solid var(--primary-green);
}
.presentation h3 {
    font-size: calc(1.3rem + .4vw);
}


.activite-section {
    margin-bottom: 3rem;
}
section.activite-section {
    scroll-margin-top: 200px;
}
.activite-section h2 {
    font-family: var(--font-heading);
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 600;
    margin-bottom: 1rem;
}
.activite-body {
    margin-top: 50px;   
}
.activite-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "description"
        "sidebar"
        "photos"
        "horaires"
        "map";
    gap: 0;
}
.activite-content,
.activite-sidebar{
    display:contents;
    padding-right: 12px;
}
.description  { 
    grid-area: description; 
}
.photos       { grid-area: photos; }
.horaires     { grid-area: horaires; }
.map          { grid-area: map; }
.coordonnees  { 
    grid-area: sidebar;
    margin-bottom: calc(40px - 1rem); 
}
aside ul {
    padding-left:0;
}
aside li {
    list-style-type: none;
    font-size: 1.125rem;
}
article p, article li {
    font-family: var(--font-body);
}
.short_desc {
    z-index: 1; 
    padding: 0 2rem 0 2rem;
    display: none;
}
.summary {
    background-color: white;
    margin: 0px 15px 40px 0;
    padding: 15px 10px 15px 15px;
    border-radius: 12px;
    box-shadow: 2px 2px 6px 2px #0000001c;
}
.summary p {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 2rem;
    border-bottom: 4px solid var(--primary-green);
    display: inline-block;
    line-height: 2.5rem;
    padding-right: 5px;
}
.summary ul {
    list-style: decimal;
    margin: 0;
    padding: 0 5px 0 15px
}   
.summary li {
    font-size: 1rem;
    margin-bottom: 10px;
}
.activite-media {
    margin:30px 0;
}
.activite-media-img {
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    background: #fff;
    transition: transform .3s,box-shadow .3s;
    overflow: hidden
}
.activite-media-img img {
    width: 100%;
}
.activite-media-legend {
    margin:10px 0;
    font-size: 1.2rem;
}
#map_canvas {
    height: 350px;
    margin: 0;
}
.carousel-wrap {
    position: relative
}
.carousel {
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding-bottom: 4px;
    display: flex;
    overflow-x: auto
}
.carousel::-webkit-scrollbar {
    display: none
}
.carousel-card {
    scroll-snap-align: start;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    background: #fff;
    flex: 0 0 280px;
    transition: transform .3s,box-shadow .3s;
    overflow: hidden
}
.carousel-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px)
}
h4.card-title {
    margin-top:10px;
    font-weight: 300;
    font-size: 1.1rem;;
}
.carousel-card img {
    object-fit: cover;
    width: 100%;
    height: 180px;
    transition: transform .4s;
    display: block;
}
.carousel-card:hover img {
    transform: scale(1.05);
}
.carousel-nav {
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    display: flex
}
.carousel-btn {
    cursor: pointer;
    width: 40px;
    height: 40px;
    color: var(--brand-dark);
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    transition: all .2s;
    display: flex
}
.carousel-btn svg {
    width: 16px;
    height: 16px
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq-section {
    padding: 52px 0;
    border-top: 1px solid #f0f0f0;
}
.faq-section h2 {
    font-family: var(--font-heading);
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 600;
    margin-bottom: 28px;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 860px;
}
.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: white;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    gap: 16px;
    transition: background 0.2s;
}
.faq-question:hover {
    background: var(--primary-green-pale);
}
.faq-question.open {
    background: var(--primary-green-pale);
    color: var(--primary-green);
}
.faq-answer {
    padding: 0 22px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    font-size: 1.125rem;
    line-height: 1.75;
    color: #374151;
}
.faq-answer.open {
    max-height: 300px;
    padding: 0 22px 18px;
}

.gyg {
  overflow: hidden;
  display: none;
}

/* ── AVIS ────────────────────────────────────────────────────────── */
.avis-summary-card {
  --c-green:      var(--color-primary, #80A020);
  --c-green-dark: var(--color-primary-dark, #4B6B12);
  --c-red:        var(--color-secondary, #C02000);
  --c-gold:       var(--color-star, #E2A63C);
  --c-cream:      #f9f9f4; 
  --c-sage-100:   var(--color-surface-alt, #EEF1E4);
  --c-border:     var(--color-border, #E1E4D6);
  --c-text:       var(--color-text, #5B5B50);
  --c-text-dark:  var(--color-heading, #2B3320);
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-cream);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 0 0 3rem;
}
 
.avis-summary-card .section-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.avis-summary-card h2 {
  margin: 0 0 0 -6px;
}
 
.avis-summary-card__empty {
  font-style: italic;
  color: var(--c-text);
}
 
/* --- mise en page : mobile = colonne unique, priorité au score --- */
.avis-summary-card__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
/* --- bloc score --- */
.avis-summary-card__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}
.avis-score-ring {
  --ring-size: 84px;
  width: var(--ring-size);
  height: var(--ring-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(closed-circle, var(--c-cream) 62%, transparent 63%),
    conic-gradient(var(--c-green) calc(var(--pct) * 1%), var(--c-sage-100) 0);
}
.avis-score-ring__value {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 600;
  color: var(--c-text-dark);
}
.avis-score-ring__max {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--c-text);
}
.avis-summary-card__count {
  font-size: 0.85rem;
  color: var(--c-text);
  margin: 0;
}
/* --- étoiles (glyphe unicode superposé, pas de SVG externe) --- */
.avis-stars {
  position: relative;
  display: inline-block;
  font-size: var(--star-size, 1rem);
  line-height: 1;
  letter-spacing: 2px;
}
.avis-stars__track,
.avis-stars__fill {
  display: block;
  white-space: nowrap;
}
.avis-stars__track { color: var(--c-sage-100); }
.avis-stars__fill {
  position: absolute;
  inset: 0;
  width: var(--rating, 0%);
  overflow: hidden;
  color: var(--c-gold);
}
/* --- histogramme --- */
.avis-histogram {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.avis-histogram__row {
  display: grid;
  grid-template-columns: 2.4rem 1fr 1.8rem;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}
.avis-histogram__label { color: var(--c-text-dark); }
.avis-histogram__track {
  height: 8px;
  border-radius: 4px;
  background: var(--c-sage-100);
  overflow: hidden;
}
.avis-histogram__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--c-green);
  border-radius: 4px;
  transition: width 0.6s ease;
}
.avis-histogram__count {
  text-align: right;
  color: var(--c-text);
}
/* --- dernier avis --- */
.avis-latest {
  border-top: 1px solid var(--c-border);
  padding-top: 1.25rem;
}
/* --- CTA --- */
.avis-cta {
    align-self: start;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--c-green);
    background: #f9f9f4;
    border: 1px solid var(--c-green);
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    cursor: pointer;
    transition: background 0.2s ease;
    justify-self: end;   /* aligné à droite dans la grid area "cta" */
    width: fit-content;  /* largeur = celle du texte, jamais étirée par le container */
    min-width: max-content;
}
.avis-cta:hover,
.avis-cta:focus-visible {
  background: var(--c-green-dark);
}
.avis-cta:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 2px;
}
.avis-list {
  position: relative;
  margin-top: 1.5rem;
  border-top: 1px solid var(--c-border);
  padding-top: 1.25rem;
}
.avis-list__close {
  position: absolute;
  top: 1.25rem;
  right: 0;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--c-text);
  background: var(--c-sage-100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.avis-list__close:hover,
.avis-list__close:focus-visible {
  background: var(--c-red);
  color: #fff;
}
.avis-list__close:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 2px;
}
.avis-list__page {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.avis-item {
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 1.1rem;
}
.avis-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
} 
.avis-item__header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}
.avis-item__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--c-sage-100);
  color: var(--c-green-dark);
  font-family: var(--font-heading); 
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
  display: grid;          /* grid centre mieux une lettre seule que flex ici */
  place-items: center;
  line-height: 1;         /* neutralise l'espace ascendant/descendant de la police */
}
.avis-item__avatar span {
  transform: translateY(0.1em); /* à ajuster selon la police (essaie -0.05em à 0.1em) */
}
.avis-item__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.avis-item__date {
  font-size: 0.78rem;
  color: var(--c-text);
}
.avis-item__author {
  margin: 0;
  font-weight: 700;
  color: var(--c-text-dark);
}
.avis-item__title {
  margin: 0 0 0.3rem;
  font-weight: 700;
  color: var(--c-text-dark);
}
.avis-item__text {
  margin: 0;
  line-height: 1.5;
}
.avis-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}
.avis-pagination__status {
  font-size: 0.85rem;
  color: var(--c-text);
}
.avis-pagination__btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-green-dark);
  background: var(--c-sage-100);
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.avis-pagination__btn:hover:not(:disabled),
.avis-pagination__btn:focus-visible:not(:disabled) {
  background: var(--c-green);
  color: #fff;
}
.avis-pagination__btn:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 2px;
}
.avis-pagination__btn:disabled {
  opacity: 0.45;
  cursor: default;
}
/* ============ BOUTON RECHERCHE (loupe) ============ */
.search-toggle{
    background:none;
    border:none;
    cursor:pointer;
    padding:6px;
    margin-left:6px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#333;
    transition: background .15s ease, color .15s ease;
}
.search-toggle:hover,
.search-toggle[aria-expanded="true"]{
    background: rgba(124,154,85,.15);
    color: var(--green-dark);
}
.search-toggle svg{ width:20px; height:20px; display:block; }
.search-toggle:focus-visible{
    outline:2px solid var(--green-sage);
    outline-offset:2px;
}
/* ============ POPUP RECHERCHE ============ */
.search-overlay{
    position:fixed;
    inset:0;
    background: rgba(54,66,39,.25);
    opacity:0;
    visibility:hidden;
    transition: opacity .25s ease;
    z-index:1100;
}
.search-overlay.is-open{
    opacity:1;
    visibility:visible;
}
.search-panel{
    position:fixed;
    top:0;
    left:0;
    right:0;
    background: linear-gradient(180deg, var(--header_background) 0%, #fbfaf4 100%);
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
    transform: translateY(-100%);
    transition: transform .3s cubic-bezier(.2,.8,.2,1);
    z-index:1101;
    overflow:hidden;
}
.search-overlay.is-open .search-panel{
    transform: translateY(0);
}
/* effet graphique discret : cercle estompé façon "clairière" */
.search-panel::before{
    content:"";
    position:absolute;
    top:-140px;
    right:-100px;
    width:420px;
    height:420px;
    border-radius:50%;
    background: radial-gradient(circle, rgba(124,154,85,.28) 0%, rgba(124,154,85,0) 70%);
    pointer-events:none;
}
.search-panel::after{
    content:"";
    position:absolute;
    bottom:-160px;
    left:-80px;
    width:320px;
    height:320px;
    border-radius:50%;
    background: radial-gradient(circle, rgba(193,88,59,.12) 0%, rgba(193,88,59,0) 70%);
    pointer-events:none;
}
.search-panel-inner{
    position:relative;
    max-width:720px;
    margin:0 auto;
    padding:56px 32px 48px;
    text-align:center;
}
.search-panel-inner h2{
    font-family: Georgia, serif;
    color: var(--green-dark);
    font-size:1.5rem;
    margin:0 0 6px;
}
.search-panel-inner p.hint{
    font-family: Arial, Helvetica, sans-serif;
    color:#6b6b5f;
    font-size:.9rem;
    margin:0 0 26px;
}
form.search-form{
    display:flex;
    gap:10px;
    background:#fff;
    border:1px solid rgba(54,66,39,.15);
    border-radius:999px;
    padding:6px 6px 6px 22px;
    box-shadow: 0 4px 14px rgba(54,66,39,.08);
}
form.search-form input[type="search"]{
    flex:1;
    border:none;
    outline:none;
    font-family: Arial, Helvetica, sans-serif;
    font-size:1rem;
    color: var(--text-main);
    background:transparent;
}
form.search-form input[type="search"]::placeholder{ color:#a3a396; }
form.search-form button[type="submit"]{
    border:none;
    background: var(--green-dark);
    color:#fff;
    font-family: Arial, Helvetica, sans-serif;
    font-weight:600;
    font-size:.9rem;
    letter-spacing:.02em;
    padding:12px 26px;
    border-radius:999px;
    cursor:pointer;
    transition: background .15s ease;
    display:flex;
    align-items:center;
    gap:8px;
}
form.search-form button[type="submit"]:hover{ background: var(--green-sage); }
form.search-form button[type="submit"] svg{ width:16px; height:16px; }
.search-close{
    position:absolute;
    top:18px;
    right:22px;
    background:none;
    border:none;
    cursor:pointer;
    color:#6b6b5f;
    padding:6px;
    border-radius:50%;
    transition: background .15s ease, color .15s ease;
}
.search-close:hover{ background:rgba(54,66,39,.08); color:var(--green-dark); }
.search-close svg{ width:18px; height:18px; display:block; }
/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (min-width: 640px) {
    .avis-summary-card__body {
    grid-template-columns: 200px 1fr;
    grid-template-areas:
        "score histo"
        "latest latest"
        "cta cta";
    }
    .avis-summary-card__score  { grid-area: score; }
    .avis-histogram            { grid-area: histo; align-self: center; }
    .avis-latest               { grid-area: latest; }
    .avis-cta                  { grid-area: cta; }    
}

@media (min-width: 768px) {
    body {
        padding-top: 95px;
    }
    .top-bar {
        background: none;
    }   
    .short_desc {
        display: block;    
    }
}
@media (min-width: 992px) { 
    aside h2 {
        padding-left:0;
        border: none !important; 
    }
    .activite-sidebar h2.red-green{
        border-left: none;
        padding-left: 0;
    }  
    .activite-layout{
      grid-template-columns: minmax(0, 9fr) minmax(280px, 3fr);
      grid-template-areas: "content sidebar";
      gap:0;
      align-items:start;
    }
    .activite-section {
      margin-bottom: 4rem;
    }
    .activite-content,
    .activite-sidebar{
        display:block;
    }
    .activite-content{ 
        grid-area: content;
        border-right: 1px solid #eeeeee;
        padding-right: 12px;
    }
    .activite-sidebar{ 
        grid-area: sidebar;
        padding-left: 12px;
    }  
    .coordonnees {
        background-color: #f8f8f8;
        border-radius: 16px;
        padding: 12px;
        border: 1px solid #ddd;
        margin-bottom: 0; 
    }
}
@media (min-width: 1400px) {

    .page_layout {
        max-width: 1360px;
        margin-right: auto;
        margin-left: auto; 
    }   
}
@media (prefers-reduced-motion: reduce){
    .search-panel, .search-overlay{ transition:none; }
}

@media (prefers-reduced-motion: reduce) {
    .avis-histogram__fill { transition: none; }
}


/*================================================================================*/
 
  .gallery-wrapper {
    max-width: 1100px;
    margin: 0 auto;
  }
  .gallery {
    display: flex;
    flex-direction: column;
    gap: var(--gap-radius);
    height: auto;
  }
 
  .gallery-cell {
    position: relative;
    overflow: hidden;
    cursor: pointer;
  }
 
  .gallery-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
  }
 
  .gallery-cell:hover img {
    transform: scale(1.04);
  }
 
  /* ---- 1 photo : pleine largeur, coins arrondis complets ---- */
  .gallery.count-1 .gallery-cell {
    flex: 1 1 100%;
    height: 240px;
    border-radius: var(--radius);
  }
 
  /* ---- 2 photos : empilées, arrondi haut/bas ---- */
  .gallery.count-2 .gallery-cell {
    flex: 1 1 auto;
    height: 250px;
  }
  .gallery.count-2 .gallery-cell:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .gallery.count-2 .gallery-cell:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
  }
 
  /* ---- 3+ photos : grande photo en haut, 2 vignettes côte à côte en dessous ---- */
  .gallery.count-3plus .gallery-main {
    height: 220px;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .gallery.count-3plus .gallery-side {
    display: flex;
    flex-direction: row;
    gap: var(--gap-radius);
    height: 130px;
  }
  .gallery.count-3plus .gallery-side .gallery-cell {
    flex: 1 1 50%;
  }
  .gallery.count-3plus .gallery-side .gallery-cell:first-child {
    border-radius: 0 0 0 var(--radius);
  }
  .gallery.count-3plus .gallery-side .gallery-cell:last-child {
    border-radius: 0 0 var(--radius) 0;
  }
 
  /* ---- Badge total photos ---- */
  .gallery-count-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(rgba(14, 38, 33, 0.88));
    color: #fff;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(2px);
    pointer-events: none;
    letter-spacing: 0.2px;
  }
 
  .gallery-count-badge svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }
 
  /* ---- Lightbox plein écran (déjà adapté au mobile par défaut) ---- */
  .lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
  }
 
  .lightbox-overlay.active {
    display: flex;
  }
 
  .lightbox-img {
    max-width: 92vw;
    max-height: 80vh;
    border-radius: 4px;
    object-fit: contain;
    user-select: none;
  }
 
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
  }
 
  .lightbox-close:hover,
  .lightbox-prev:hover,
  .lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
  }
 
  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
  }
 
  .lightbox-prev,
  .lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
  }
 
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
 
  .lightbox-counter {
    margin-top: 10px;
    color: #fff;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 12px;
    border-radius: 999px;
  }
 
  /* ---- Légende + crédits sous l'image ---- */
  .lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 92vw;
  }
 
  .lightbox-caption {
    margin: 12px 0 4px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    max-width: 80ch;
  }
 
  .lightbox-credit {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-style: italic;
    text-align: center;
  }
 
  .lightbox-caption:empty,
  .lightbox-credit:empty {
    display: none;
  }
 
  /* =========================================================
     TABLETTE / DESKTOP : à partir de 641px, on passe en
     agencement horizontal (60/40, 2 colonnes, etc.)
     ========================================================= */
  @media (min-width: 641px) {
    body {
      padding: 40px 20px;
    }
 
    .gallery {
      flex-direction: row;
      height: 380px;
    }
 
    /* ---- 1 photo : déjà 100%, on agrandit juste la hauteur ---- */
    .gallery.count-1 .gallery-cell {
      height: auto;
    }
 
    /* ---- 2 photos : 50/50 côte à côte ---- */
    .gallery.count-2 .gallery-cell {
      flex: 1 1 50%;
      height: auto;
    }
    .gallery.count-2 .gallery-cell:first-child {
      border-radius: var(--radius) 0 0 var(--radius);
    }
    .gallery.count-2 .gallery-cell:last-child {
      border-radius: 0 var(--radius) var(--radius) 0;
    }
 
    /* ---- 3+ photos : grande photo à gauche (60%), 2 vignettes empilées à droite (40%) ---- */
    .gallery.count-3plus .gallery-main {
      flex: 0 0 60%;
      height: auto;
      border-radius: var(--radius) 0 0 var(--radius);
    }
    .gallery.count-3plus .gallery-side {
      flex: 0 0 calc(40% - var(--gap-radius));
      flex-direction: column;
      height: auto;
    }
    .gallery.count-3plus .gallery-side .gallery-cell {
      flex: 1 1 50%;
    }
    .gallery.count-3plus .gallery-side .gallery-cell:first-child {
      border-radius: 0 var(--radius) 0 0;
    }
    .gallery.count-3plus .gallery-side .gallery-cell:last-child {
      border-radius: 0 0 var(--radius) 0;
    }
 
    /* ---- Badge plus grand sur écran large ---- */
    .gallery-count-badge {
      bottom: 16px;
      right: 16px;
      padding: 8px 16px;
      font-size: 15px;
      gap: 8px;
    }
    .gallery-count-badge svg {
      width: 17px;
      height: 17px;
    }
 
    /* ---- Lightbox : boutons et textes plus grands ---- */
    .lightbox-overlay {
      padding: 24px;
    }
    .lightbox-img {
      max-height: 88vh;
    }
    .lightbox-close {
      top: 20px;
      right: 20px;
      width: 40px;
      height: 40px;
      font-size: 20px;
    }
    .lightbox-prev,
    .lightbox-next {
      width: 48px;
      height: 48px;
      font-size: 22px;
    }
    .lightbox-prev { left: 20px; }
    .lightbox-next { right: 20px; }
    .lightbox-counter {
      margin-top: 12px;
      font-size: 13px;
      padding: 5px 13px;
    }
    .lightbox-caption {
      margin: 16px 0 4px;
      font-size: 17px;
    }
    .lightbox-credit {
      font-size: 13px;
    }
  }
