/* 1. On abaisse l'ensemble de la section ou du widget contenant la recherche */
.elementor-widget-toolset-view,
.rando-mobile-search,
.rs-factory-container {
    position: relative !important;
    z-index: 1 !important;
}

/* 2. On donne une priorité absolue au header mobile et à ses menus déroulants */
#masthead,
.site-header,
.main-navigation,
.elementor-location-header {
    position: relative !important;
    z-index: 99999 !important;
}

/* 3. Sécurité spécifique pour le menu mobile et les sous-menus s'ils sont en absolute/fixed */
.nav-menu,
.sub-menu,
.toggled-on {
    z-index: 100000 !important;
}

/* Zone de recherche globale */
.randos-search-box {
    display: table;
    width: 100%;
    background-color: #f7fafc; /* Palette theme-palette8 */
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Alignement type colonnes de tableau pour respecter la grille d'origine */
.randos-search-ville,
.randos-search-parcours,
.randos-search-numeric-group,
.randos-search-actions {
    display: table-cell;
    vertical-align: middle;
    padding: 0 6px;
}

.randos-search-ville { width: 29%; }
.randos-search-parcours { width: 38%; }
.randos-search-numeric-group { width: 11%; }
.randos-search-actions { width: 11%; text-align: center; vertical-align: middle; }

/* Superposition verticale des inputs Min/Max */
.randos-search-numeric-group input {
    display: block;
    width: 100%;
    margin-bottom: 4px;
    box-sizing: border-box;
}
.randos-search-numeric-group input:last-child {
    margin-bottom: 0;
}

/* Ajustements inputs texte standards */
.randos-search-ville input,
.randos-search-parcours input {
    width: 100%;
    box-sizing: border-box;
}

/* Boutons d'action superposés à droite */
.randos-search-actions .btn-search,
.randos-search-actions .btn-reset {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 4px 8px;
    font-size: 0.9em;
}
.randos-search-actions .btn-search {
    background-color: #4a5568;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 4px;
}
.randos-search-actions .btn-reset {
    background-color: #718096;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
}

/* Tableau */
.randos-table {
    width: 100%;
    border-collapse: collapse;
}
.randos-table th, .randos-table td {
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}
.text-right { text-align: right !important; }

/* Pastilles statut */
.asso-status-dot {
    height: 10px;
    width: 10px;
    display: inline-block;
    border-radius: 50%;
}
.asso-status-ok { background-color: #48bb78; }
.asso-status-off { background-color: #a0aec0; }
.asso-status-warn { background-color: #ed8936; }

/* =========================================================
   RS - CSS GLOBAL
   Site Club Rando Soustons
   Regroupe les styles communs + admin + adhésions + randonnées.
   ========================================================= */
.ui-datepicker {
    font-size: 1.15rem !important;
}

.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
    min-width: 90px !important;
    font-size: 1rem !important;
}

.ui-datepicker-trigger {
    margin-left: 6px;
    cursor: pointer;
}
/* =========================================================
   PAGE ACCUEIL
   ========================================================= */
/* Réduire l'espace entre l'en-tête et le hero */
.home .site-main,
.home .content-area,
.home .entry-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.home .entry-content > *:first-child {
  margin-top: 0 !important;
}

.home-hero-rando {
  width: 100%;
  min-height: 430px;
  background-image: url("/wp-content/uploads/ChatGPT-Image-6-juin-2026-11_54_02.png");
  background-size: cover;
  background-position: center;
  margin-bottom: 50px;
}

@media (max-width: 768px) {
  .home-hero-rando {
    min-height: 520px;
    background-size: cover;
    background-position: 62% center;
  }

  .home-hero-overlay {
    min-height: 520px;
  }
}

.home-hero-overlay {
  min-height: 430px;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.0) 0%,
    rgba(0,0,0,.0) 45%,
    rgba(0,0,0,.0) 100%
  );
  display: flex;
  align-items: center;
} 

.home-hero-content {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 42px 28px;
  color: #fff;
}

.home-hero-content h1 {
  font-size: 32px;
  line-height: 1.08;
  margin: 0 0 22px;
  color: #fff;
  transform: translateY(-35px);
}
 
.home-hero-content p {
  max-width: 470px;
  font-size: 18px;
  line-height: 1.45;
  margin-bottom: 30px;
}

.home-hero-btn {
  display: inline-block;
  width: auto;
  max-width: 420px;
  padding: 14px 24px;
  border-radius: 34px;
  background: #3f7f2f;
  color: #fff !important;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
  margin-top: 18px;
}

.home-hero-btn:hover {
  background: #2f6523;
  color: #fff !important;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .home .entry-content-wrap,
  .home .content-wrap {
    padding: 10px !important;
  }

  .home-hero-rando {
    margin-top: 0;
    margin-bottom: 25px;
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
  }

  .home-hero-btn {
    display: block;
    text-align: center;
    max-width: 100%;
    padding: 14px 22px;
    font-size: 14px;
    margin-top: 70px;
    transform: none;
  }

  .home-hero-btn:hover,
  .home-hero-btn:focus,
  .home-hero-btn:active {
    transform: none;
  }

  .home-hero-rando,
  .home-hero-overlay {
    min-height: 520px;
  }

  .home-hero-content h1 {
    font-size: 28px;
    line-height: 0.95;
    transform: translateY(-80px);
  }

  .home-hero-content p {
    font-size: 17px;
    max-width: 240px;
    transform: translateY(40px);
  }
}
 
.home-programme-rando {
  max-width: 1180px;
  margin: 50px auto;
  padding: 0 24px;
}

.home-section-title {
  text-align: center;
  margin: 0 auto 55px;
}

.home-section-title h2 {
  font-size: clamp(30px, 4vw, 44px);
  color: #183226;
}

/* Bloc mosaïque */
.home-story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: stretch;
  margin: 80px 0;
}

/* Inversion : photo en haut gauche, texte en haut droite */
.home-story-block.reverse .text-card {
  grid-column: 2;
  grid-row: 1;
}

.home-story-block.reverse img:nth-of-type(1) {
  grid-column: 1;
  grid-row: 1;
}

.home-story-block.reverse img:nth-of-type(2) {
  grid-column: 1;
  grid-row: 2;
}

.home-story-block.reverse img:nth-of-type(3) {
  grid-column: 2;
  grid-row: 2;
}

.story-card {
  border-radius: 14px;
}

.text-card {
  padding: 30px;
  background: #f4faf2;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  position: relative;
  z-index: 3;
}

.text-card h3 {
  font-size: 26px;
  color: #183226;
  margin-bottom: 16px;
}

.text-card p,
.text-card li {
  font-size: 16px;
  line-height: 1.55;
}

.photo-card {
  width: 100%;
  height: 100%;
  min-height: 260px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: white;
  border: 10px solid white;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  position: relative;
}

/* Effet album / vacances */
.tilt-1 {
  transform: rotate(-1.5deg);
}

.tilt-2 {
  transform: rotate(2deg);
}

.tilt-3 {
  transform: rotate(-1deg);
}

/* Chevauchements légers */
.overlap-left {
  margin-left: 35px;
  margin-top: -18px;
  z-index: 2;
}

.overlap-up {
  margin-top: -30px;
  margin-left: -20px;
  z-index: 1;
}

.home-info-box {
  margin-top: 60px;
  padding: 24px 30px;
  background: #e8f2e7;
  color: #315b2f;
  border-radius: 12px;
  font-size: 17px;
  line-height: 1.55;
}

/* Mobile */
@media (max-width: 768px) {
  .home-story-block,
  .home-story-block.reverse {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 55px 0;
  }

  .home-story-block.reverse .text-card,
  .home-story-block.reverse img:nth-of-type(1),
  .home-story-block.reverse img:nth-of-type(2),
  .home-story-block.reverse img:nth-of-type(3) {
    grid-column: auto;
    grid-row: auto;
  }

  .photo-card {
    min-height: 220px;
    border-width: 7px;
  }

  .overlap-left,
  .overlap-up {
    margin-left: 0;
    margin-top: 0;
  }
}

/* =========================================================
   1. ADMIN GENERIQUE / LEGACY ASSO
   ========================================================= */

.asso-admin-toolbar {
  margin: 0 0 12px 0;
}

.asso-admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.asso-admin-table th,
.asso-admin-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #dbe3ec;
  text-align: left;
}

.asso-admin-table th {
  background: #edf2f7;
  font-weight: 700;
  color: #0f1f33;
}

.asso-admin-table tbody tr:nth-child(even) {
  background: rgba(150,150,150,0.10);
}

.asso-admin-table tbody tr:nth-child(odd) {
  background: rgba(255,255,255,0.25);
}

.asso-admin-table tbody tr:hover {
  background: rgba(80,130,170,0.16);
}

.asso-admin-btn {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 5px;
  background: #e2e8f0;
  color: #1e293b !important;
  text-decoration: none !important;
  font-weight: 600;
}

.asso-admin-btn.primary {
  background: #2563eb;
  color: #fff !important;
}

.asso-admin-btn.small {
  font-size: 0.85rem;
  padding: 4px 8px;
}

.asso-admin-btn.danger {
  background: #fee2e2;
  color: #991b1b !important;
}

.asso-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.asso-badge.success {
  background: #dcfce7;
  color: #166534;
}

/* Tables associatives génériques */

.asso-table-header,
.asso-table-row {
  padding: 8px 12px;
  border-radius: 6px;
}

.asso-table-header {
  font-weight: 700;
  color: #0f1f33;
  margin-bottom: 8px;
}

.wpv-block-loop-item:nth-child(even) .asso-table-row {
  background: rgba(150,150,150,0.12);
}

.wpv-block-loop-item:nth-child(odd) .asso-table-row {
  background: rgba(255,255,255,0.25);
}

.wpv-block-loop-item .asso-table-row:hover {
  background: rgba(80,130,170,0.16);
}

.asso-table-row p,
.asso-table-header p {
  margin: 0;
}

.asso-table-row a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.asso-table-row a:hover {
  text-decoration: underline;
}

/* Statut randonnées */

.asso-col-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.asso-col-status p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.asso-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.asso-status-ok { background: #3aa655; }
.asso-status-warn { background: #d88c1f; }
.asso-status-off { background: #7a7a7a; }


/* =========================================================
   2. RS ADMIN - COMPOSANTS COMMUNS
   ========================================================= */

.rs-admin-profil-detail,
.rs-admin-adhesion-detail {
  max-width: 1100px;
  margin: 0 auto;
}

.rs-admin-profils {
  max-width: 1200px;
  margin: 0 auto;
}

.rs-admin-adhesions {
  max-width: 1290px;
  margin: 0 auto;
}

.rs-detail-header,
.rs-list-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.rs-list-header {
  align-items: center;
  margin-bottom: 14px;
}

.rs-detail-actions,
.rs-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.rs-card {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #d7dde3;
  border-radius: 8px;
  background: #ffffff;
}

.rs-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.rs-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.rs-card-header h3 {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.rs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 18px;
}

.rs-span-2 { grid-column: span 2; }
.rs-span-3 { grid-column: span 3; }

.rs-form-row {
  margin-bottom: 15px;
}

.rs-form-row label,
.rs-item-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 3px;
}

.rs-form-row input,
.rs-form-row select,
.rs-form-row textarea {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.rs-item-value {
  font-size: 14px;
  color: #111827;
  margin-top: 2px;
}

.rs-btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #9ca3af;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.2;
}

.rs-btn.primary {
  background: #166534 !important;
  color: #ffffff !important;
  border-color: #166534;
}

.rs-btn.secondary {
  background: #ffffff !important;
  color: #1f2937 !important;
}

.rs-btn.small {
  padding: 5px 9px;
  font-size: 13px;
  background: #ffffff;
  color: #1f2937;
}

.rs-statut {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #e5e7eb;
}

.rs-statut-actif,
.rs-statut-valide { background: #dcfce7; }

.rs-statut-futur,
.rs-statut-brouillon { background: #e0f2fe; }

.rs-statut-ancien { background: #e5e7eb; }

.rs-statut-suspendu,
.rs-statut-abandon { background: #fee2e2; }

.rs-statut-soumis { background: #fef3c7; }

.rs-success {
  background: #dcfce7;
  border: 1px solid #16a34a;
  color: #166534;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.rs-inline-select {
  width: 100%;
  min-width: 180px;
  min-height: 36px;
}

/* Modal admin */

.rs-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
}

.rs-modal-content {
  background: white;
  width: 90%;
  max-width: 600px;
  margin: 60px auto;
  padding: 20px;
  border-radius: 8px;
}

.rs-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.rs-check-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.rs-check-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}


/* =========================================================
   3. ADMIN PROFILS
   ========================================================= */

.rs-profile-summary {
  display: grid;
  grid-template-columns: 220px 220px 220px;
  gap: 24px;
  align-items: end;
  margin-top: 12px;
}

.rs-profile-summary .rs-item,
.rs-profile-summary .rs-form-row {
  margin: 0;
}

.rs-profile-summary .rs-item-label,
.rs-profile-summary .rs-form-row label {
  margin-bottom: 4px;
}

.rs-profile-summary .rs-item-value {
  font-weight: 600;
}

.rs-identity-layout {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 24px;
  align-items: stretch;
}

.rs-identity-info .rs-grid {
  grid-template-columns: 1fr 1fr;
}

.rs-profile-photo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.rs-profile-photo-box img,
.rs-profile-photo-placeholder {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.rs-profile-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.rs-photo-upload {
  cursor: pointer;
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
}

.rs-profils-filters {
  display: grid;
  grid-template-columns: 2fr 1fr auto auto;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #d7dde3;
  border-radius: 8px;
  background: #f8fafc;
}

.rs-profils-filters input,
.rs-profils-filters select {
  min-height: 36px;
  padding: 6px 8px;
}

.rs-profils-count {
  margin: 0 0 10px 2px;
  font-size: 14px;
  color: #475569;
  font-weight: 600;
}

.rs-profils-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #d7dde3;
  border-radius: 8px;
  overflow: hidden;
}

.rs-profils-table th,
.rs-profils-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 14px;
}

.rs-profils-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
}

.rs-profils-table tr:nth-child(even) {
  background: #f8fafc;
}

.rs-mobile-profile {
  display: none;
}


/* =========================================================
   4. ADMIN ADHESIONS
   ========================================================= */

.rs-adh-filters {
  display: grid;
  grid-template-columns: 180px 180px 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #d7dde3;
  border-radius: 8px;
}

.rs-adh-filters label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.rs-adh-filters input,
.rs-adh-filters select {
  width: 100%;
  min-height: 34px;
}

.rs-adh-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rs-adh-actions button,
.rs-adh-actions a {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #9ca3af;
  background: #ffffff !important;
  color: #1f2937 !important;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}

.rs-adh-actions button:hover,
.rs-adh-actions a:hover {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

.rs-adh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rs-adh-table th,
.rs-adh-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.rs-adh-table th {
  background: #eef2f7;
  font-weight: 700;
}

.rs-adh-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.rs-adh-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.rs-adh-table tbody tr:hover {
  background: #eef6ff !important;
}

.rs-adh-row {
  cursor: pointer;
}


/* =========================================================
   5. ADHESIONS - FORMULAIRES PUBLICS
   ========================================================= */

.adhesion-saison-banner {
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid #d7dde3;
  border-radius: 8px;
  background: #f8fafc;
}

.adhesion-saison-banner h2 {
  margin: 0 0 10px;
  color: #1f3b5c;
  font-size: 1.4rem;
}

.adhesion-saison-banner p {
  margin: 0;
  color: #666;
}

.adhesion-section {
  border: 1px solid #d7dde3;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 20px;
  background: #fff;
}

.adhesion-section legend,
.adhesion-subsection legend {
  font-weight: 700;
  padding: 0 8px;
}

.adhesion-subsection {
  border: 1px solid #d7dde3;
  border-radius: 6px;
  padding: 14px;
  margin: 16px 0;
  background: rgba(255,255,255,0.75);
}

.adhesion-row {
  display: grid;
  gap: 14px;
}

.adhesion-row.two-cols { grid-template-columns: 1fr 1fr; }
.adhesion-row.three-cols { grid-template-columns: 1fr 1fr 1fr; }
.adhesion-row.cp-ville { grid-template-columns: 180px 1fr; }

.adhesion-hidden-field {
  display: none !important;
}

.adhesion-readonly-email,
.adhesion-mail-readonly {
  background: #f3f5f7 !important;
  border: 1px solid #d7dde3;
  border-radius: 4px;
}

.adhesion-mail-readonly {
  pointer-events: none;
}

.adhesion-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.adhesion-actions .btn,
.adhesion-actions a.btn {
  min-height: 34px;
  padding: 7px 14px;
  line-height: 1.2;
  text-decoration: none;
}

.adhesion-cancel {
  background: #e5e7eb;
  color: #111;
  text-decoration: none;
}

/* Dates Toolset */

.form-group .js-wpt-field-items {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

.form-group .js-wpt-field-items input.hasDatepicker {
  width: 140px !important;
  flex: 0 0 140px !important;
}

.form-group .js-wpt-field-items img.ui-datepicker-trigger,
.form-group .js-wpt-field-items .js-wpt-date-clear {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
}

/* adhesion-start */

.adhesion-intro {
  margin: 12px 0 20px;
  color: #555;
}

.adhesion-start-form {
  max-width: 500px;
}

.adhesion-start-form .form-group {
  margin-bottom: 18px;
}

.adhesion-start-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.adhesion-start-form input[type="email"] {
  width: 100%;
  max-width: 350px;
}

/* adhesion-edit */

.adhesion-adherent-2 {
  transition: all 0.3s ease;
}

h3.adhesion-title-1 {
  color: #2f6fb3;
  margin-bottom: 8px;
}

h3.adhesion-title-2 {
  color: #2e8b57;
  margin-bottom: 8px;
}

.adhesion-section-1 {
  border: 2px solid #2f6fb3;
  background: #f5f9ff;
}

.adhesion-section-2 {
  border: 2px solid #2e8b57;
  background: #f3faf5;
}

.adhesion-info-box {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #d7dde3;
  border-radius: 6px;
  background: #f8fafc;
}

.adhesion-info-box h4 {
  margin: 0 0 8px 0;
}

.adhesion-checkbox-clean {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  margin: 10px 0 !important;
}

.adhesion-checkbox-clean .wpt-form-label {
  display: inline-flex !important;
  margin: 0 !important;
}

.adhesion-checkbox-clean input[type="checkbox"] {
  margin-top: 3px !important;
}

.adhesion-checkbox-clean ul,
.adhesion-checkbox-clean li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.adhesion-checkbox-text {
  margin: 0 !important;
  font-weight: normal !important;
}

.adhesion-type-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.adhesion-type-row .adhesion-type-field {
  max-width: 220px;
}

.adhesion-tarif {
  font-size: 1.05rem;
  padding: 6px 12px;
  border: 1px solid #d7dde3;
  border-radius: 6px;
  background: #f8fafc;
}


/* =========================================================
   6. RANDONNEES - MOBILE LISTE
   ========================================================= */

.rando-mobile-search {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #f2efe6;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(120,120,120,0.18);
}

.rando-search-wrap {
  position: relative;
}

#rando-mobile-filter {
  width: 100%;
  padding: 10px 42px 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.18);
  background: white;
  font-size: 0.95rem;
}

#clear-rando-filter {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 500;
  color: #777;
  cursor: pointer;
  z-index: 9999;
  user-select: none;
}

.rando-mobile-card,
.rando-mobile-card .rando-main,
.rando-mobile-card .rando-top,
.rando-mobile-card .rando-meta {
  background: #f2efe6 !important;
}

.rando-mobile-card {
  position: relative;
  display: block;
  padding: 8px 16px !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(120,120,120,0.18) !important;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.rando-mobile-card::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
}

.rando-mobile-card:hover,
.rando-mobile-card:active,
.rando-mobile-card-link:hover {
  background: rgba(0,0,0,0.03);
}

.rando-mobile-card-link,
.rando-mobile-card-link:visited,
.rando-mobile-card-link:hover,
.rando-mobile-card-link:active {
  display: block;
  color: inherit;
  text-decoration: none;
}

.rando-mobile-card .rando-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.rando-mobile-card .rando-location {
  line-height: 1.1;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2d2d2d;
}

.rando-distance-home {
  font-size: 1rem;
  color: #666;
  white-space: nowrap;
}

.rando-mobile-card .rando-title {
  margin: 2px 0 0 24px !important;
  padding: 0 !important;
  font-size: 1.1rem;
  line-height: 1.15;
  font-weight: 500;
}

.rando-mobile-card .rando-meta {
  margin: 4px 0 0 24px !important;
  padding: 0 !important;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  line-height: 1.1;
}

.rando-meta span {
  white-space: nowrap;
}


/* =========================================================
   7. RANDONNEES - PAGE / TABLEAU / FILTRES / CARTE
   ========================================================= */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

.randos-page-tabs {
  width: 100%;
  max-width: 1290px;
  margin: 0 auto;
  box-sizing: border-box;
}

.randos-page-tabs *,
.randos-page-tabs *::before,
.randos-page-tabs *::after {
  box-sizing: border-box;
}

.randos-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  border-bottom: 2px solid #d9d2c4;
  flex-wrap: wrap;
}

.randos-tab {
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  color: #333;
  border-bottom: 4px solid transparent;
}

.randos-tab.active {
  color: #6f9630;
  border-bottom-color: #8dbc3f;
}

.randos-tab-panel {
  display: none;
}

.randos-tab-panel.active {
  display: block;
}

.randos-tab-add {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  color: #2f6f3e !important;
}

.randos-tab-add:hover {
  color: #5b9f22 !important;
}

/* Recherche / filtres */

.randos-search-box {
  width: 100%;
  max-width: 100%;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  padding: 4px;
  margin-bottom: 10px;
  border: 1px solid #d7dde3;
  border-radius: 6px;
  background: #f8fafc;
}

.randos-search-box > .wp-block-column {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.randos-search-box input,
.randos-search-box select {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 2px 6px;
  border: 1px solid #cfd6dd;
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
}

.randos-search-dist,
.randos-search-deniv,
.randos-search-dist input,
.randos-search-deniv input {
  text-align: right;
}

.randos-search-actions {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-end !important;
  gap: 4px !important;
}

.randos-search-actions .wpv-custom-search-filter-submit,
.randos-search-actions .wpv-custom-search-filter-reset {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.randos-search-actions input[type="submit"],
.randos-search-actions .wpv-reset-trigger {
  display: block !important;
  width: 100% !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 2px 6px !important;
  line-height: 1.2 !important;
}

.randos-search-box .wpv-reset-trigger,
.randos-search-box .wpv-submit-trigger {
  display: block;
  width: 100%;
  min-width: 90px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #4a4a4a;
  color: #fff !important;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.2;
}

.randos-search-box .wpv-reset-trigger:hover,
.randos-search-box .wpv-submit-trigger:hover {
  background: #333;
  color: #fff !important;
}

/* Tableau Toolset */

.randos-page-tabs .randos-table-header,
.randos-page-tabs .randos-table-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 0 !important;
  column-gap: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.randos-page-tabs .randos-table-header > .wp-block-column,
.randos-page-tabs .randos-table-row > .wp-block-column {
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: hidden;
}

.randos-page-tabs .randos-table-header > .wp-block-column:nth-child(1),
.randos-page-tabs .randos-table-row > .wp-block-column:nth-child(1) { flex-basis: 5% !important; }

.randos-page-tabs .randos-table-header > .wp-block-column:nth-child(2),
.randos-page-tabs .randos-table-row > .wp-block-column:nth-child(2) { flex-basis: 25% !important; }

.randos-page-tabs .randos-table-header > .wp-block-column:nth-child(3),
.randos-page-tabs .randos-table-row > .wp-block-column:nth-child(3) { flex-basis: 38% !important; }

.randos-page-tabs .randos-table-header > .wp-block-column:nth-child(4),
.randos-page-tabs .randos-table-row > .wp-block-column:nth-child(4) { flex-basis: 10% !important; }

.randos-page-tabs .randos-table-header > .wp-block-column:nth-child(5),
.randos-page-tabs .randos-table-row > .wp-block-column:nth-child(5) { flex-basis: 10% !important; }

.randos-page-tabs .randos-table-header > .wp-block-column:nth-child(6),
.randos-page-tabs .randos-table-row > .wp-block-column:nth-child(6) {
  flex-basis: 12% !important;
  white-space: nowrap !important;
}

.randos-table-row p {
  margin: 0 !important;
}

.randos-table-row .wp-block-column:empty,
.randos-table-row br {
  display: none;
}

.randos-table-row:hover {
  background: #f7f9fb;
}

.randos-table-row a {
  text-decoration: none;
}

.randos-table-row a:hover {
  text-decoration: underline;
}

/* Carte */

#rando-map {
  width: 100%;
  height: 650px;
  min-height: 500px;
  border-radius: 6px;
  overflow: hidden;
}

.randos-map-point {
  display: none;
}

.randos-map-popup-link {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 170px;
}

.randos-map-popup-link strong {
  color: #1f5f3b;
  font-size: 14px;
}

.randos-map-popup-action {
  display: inline-block;
  margin-top: 8px;
  color: #1f5f3b;
  font-weight: 600;
}


/* =========================================================
   8. RANDONNEES - FORMULAIRES
   ========================================================= */

.rando-form-section {
  margin: 30px 0 18px;
  padding: 10px 16px;
  background: #eef5ea;
  border-left: 5px solid #6da832;
  border-radius: 6px;
}

.rando-form-section h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f3d1f;
}

.rando-form-row {
  display: grid;
  gap: 18px;
  margin-bottom: 14px;
}

.rando-form-row.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rando-form-row.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rando-form-col input,
.rando-form-col select,
.rando-form-col textarea {
  width: 100%;
}

.rando-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.rando-help-link,
.rando-help-link:visited {
  font-size: 0.82rem;
  font-weight: 400;
  color: #666 !important;
  text-decoration: underline;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.rando-help-link:hover {
  color: #2f6f3e !important;
}

.rando-form-actions {
  margin-top: 20px;
  display: inline-block;
  margin-right: 12px;
}

.rando-btn-cancel {
  display: inline-block;
  padding: 10px 18px;
  background: #777;
  color: white !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}

.rando-btn-cancel:hover {
  background: #555;
}

.rando-detail .rando-kicker {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2f6f3e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.rando-detail h1 {
  text-align: center;
  font-size: 1.9rem;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 22px;
}

.rando-kicker {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #2f6f3e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

@media (max-width: 768px) {
    .rando-kicker {
        font-size: 0.8rem;
    }
  .rando-detail .rando-kicker {
    font-size: 0.8rem;
  }

  .rando-detail h1 {
    font-size: 1.3rem;
    margin-bottom: 16px;
  }

  .rando-detail-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }

  .rando-detail-actions .wp-block-column {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .rando-detail-actions .rando-btn-retour {
    display: block;
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 0.95rem !important;
    min-height: 42px;
  }
}

/* Bouton Ajouter une sortie */

.rs-btn-ajouter-sortie {
    display: inline-block;
    min-width: 180px;
    text-align: center;
    padding: 10px 16px;
    background: #2f6f3e;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.rs-btn-ajouter-sortie:hover {
    background: #255a32;
    color: #fff !important;
}

/* =========================================================
   9. CONTACT
   ========================================================= */

.contact-rando {
  max-width: 1100px;
  margin: 0 auto;
}

.contact-rando h2 {
  margin-bottom: 18px;
}

.contact-card {
  background: #f4faf2;
  border: 1px solid #d8f0dd;
  border-radius: 8px;
  padding: 22px 26px;
  margin-bottom: 22px;
}

.contact-card h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 18px;
}

.contact-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.contact-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(15,47,58,0.15);
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-card a {
  color: #004f7a;
  font-weight: 600;
}


/* =========================================================
   10. RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {
  .rs-detail-header {
    flex-direction: column;
  }

  .rs-grid,
  .rs-profile-summary,
  .rs-identity-layout,
  .rs-profils-filters,
  .rs-adh-filters {
    grid-template-columns: 1fr;
  }

  .rs-span-2,
  .rs-span-3 {
    grid-column: span 1;
  }

  .rs-profile-photo-box img,
  .rs-profile-photo-placeholder {
    max-width: 180px;
  }

  .rs-mobile-profile {
    display: table-cell;
  }

  .rs-profils-table {
    font-size: 13px;
  }

  .rs-profils-table th:nth-child(1),
  .rs-profils-table td:nth-child(1),
  .rs-profils-table th:nth-child(2),
  .rs-profils-table td:nth-child(2),
  .rs-profils-table th:nth-child(3),
  .rs-profils-table td:nth-child(3),
  .rs-profils-table th:nth-child(4),
  .rs-profils-table td:nth-child(4),
  .rs-profils-table th:nth-child(5),
  .rs-profils-table td:nth-child(5),
  .rs-profils-table th:nth-child(6),
  .rs-profils-table td:nth-child(6),
  .rs-profils-table th:nth-child(7),
  .rs-profils-table td:nth-child(7) {
    display: none;
  }

  .rs-btn.small {
    white-space: nowrap;
  }

  .rs-adh-table {
    font-size: 13px;
  }

  .rs-adh-table th:nth-child(4),
  .rs-adh-table td:nth-child(4),
  .rs-adh-table th:nth-child(7),
  .rs-adh-table td:nth-child(7),
  .rs-adh-table th:nth-child(8),
  .rs-adh-table td:nth-child(8) {
    display: none;
  }
}

@media (max-width: 768px) {
  .contact-card {
    padding: 18px;
  }

  .contact-card h3 {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .rando-form-row.two-cols,
  .rando-form-row.three-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .adhesion-row.two-cols,
  .adhesion-row.three-cols,
  .adhesion-row.cp-ville {
    grid-template-columns: 1fr;
  }

  .adhesion-actions {
    flex-wrap: wrap;
  }
}

/* ==================================================
   MODALES D'AIDE RANDONNÉES
   ATTENTION :
   Ce CSS est nécessaire au fonctionnement des popups
   Effort / Technique / Risque
   ================================================== */

.rando-modal {
  display: none;
}

.rando-modal.open {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rando-modal-content {
  background: #fff;
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  border-radius: 10px;
  position: relative;
}

.rando-modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  cursor: pointer;
}

.rando-level {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 18px 0;
}

.rando-badge {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rando-modal-intro {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.rando-modal-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto 24px;
  border-radius: 8px;
}

.level-1 { background: #6abf4b; }
.level-2 { background: #1f8dd6; }
.level-3 { background: #f5a623; }
.level-4 { background: #e74c3c; }
.level-5 { background: #2c2c6c; }

/* ================================
   ACTIVITES - formulaire création
   Style cohérent randos / adhésions
   ================================ */

.rs-activite-form {
  max-width: 1100px;
  margin: 0 auto 40px auto;
  padding: 28px 28px 36px;
  background: #f8fafc;
}

.rs-activite-card {
  margin: 0 0 26px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.rs-activite-section h2 {
  margin: 0 0 18px;
  padding: 9px 14px;
  background: #edf6e9;
  border-left: 4px solid #6dbb3f;
  border-radius: 5px;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.rs-field {
  margin-bottom: 18px;
}

.rs-field label {
  display: block;
  margin-bottom: 5px;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 500;
}

.rs-field input,
.rs-field select,
.rs-field textarea {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #c7d2e2;
  border-radius: 0;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.9rem;
  box-shadow: none;
}

.rs-field textarea {
  min-height: 115px;
}

.rs-grid-2,
.rs-grid-3 {
  display: grid;
  gap: 18px;
}

.rs-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.rs-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.rs-field-wide {
  grid-column: 1 / -1;
}

.rs-inline-checks {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  margin: 2px 0 18px;
}

.rs-inline-checks label,
.rs-checkbox-line label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.rs-inline-checks input[type="checkbox"],
.rs-checkbox-line input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin: 0;
}

.rs-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.rs-btn,
.rs-form-actions input[type="submit"] {
  min-height: 38px;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.rs-btn-primary,
.rs-form-actions input[type="submit"] {
  background: #2f7d32;
  border: 1px solid #2f7d32;
  color: #ffffff !important;
}

.rs-btn-secondary {
  background: #ffffff;
  border: 1px solid #c7d2e2;
  color: #334155 !important;
}

/* masquer provisoirement la date de fin sauf séjour */
.rs-date-fin {
  display: none;
}

/* Mobile */
@media (max-width: 768px) {
  .rs-activite-form {
    padding: 18px 14px 28px;
  }

  .rs-grid-2,
  .rs-grid-3 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rs-form-actions {
    flex-direction: column;
  }

  .rs-btn,
  .rs-form-actions input[type="submit"] {
    width: 100%;
  }
}

/* ================================
   ACTIVITES - ajustements Toolset
   ================================ */

/* Date Toolset : date + heure + minute sur une ligne */
.rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"],
.rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_fin"] {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"] input[type="text"],
.rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_fin"] input[type="text"] {
  width: 150px !important;
}

.rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"] select,
.rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_fin"] select {
  width: 52px !important;
  min-height: 30px;
  padding: 3px 4px;
}

.rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"] .wpt-form-label,
.rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_fin"] .wpt-form-label {
  margin: 0 2px;
}


/* Checkboxes Toolset : label après la case, sur une ligne */
/* Checkboxes Toolset activité : case + label sur une seule ligne */
.rs-activite-form .rs-inline-checks {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rs-activite-form .rs-checkbox-line .js-wpt-field-items {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px;
}

.rs-activite-form .rs-checkbox-line input[type="checkbox"] {
  width: auto !important;
  min-height: auto !important;
  margin: 0 !important;
}

.rs-activite-form .rs-checkbox-line label.wpt-form-checkbox-label {
  display: inline !important;
  margin: 0 !important;
  line-height: 1.2;
}

.rs-euro-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rs-euro-field input {
  width: 90px !important;
  max-width: 90px !important;
}

.rs-euro-field span {
  font-weight: 600;
}

/* Nombre de places : label + champ sur une ligne */
.rs-activite-form .rs-places-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rs-activite-form .rs-places-line label {
  margin: 0;
  white-space: nowrap;
}

.rs-activite-form .rs-places-line input {
  max-width: 120px;
}

.rs-activite-form .rs-type-rando .rs-rando-picker-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 220px !important;
  gap: 20px !important;
  align-items: start !important;
  margin-bottom: 18px !important;
}

.rs-activite-form .rs-type-rando .rs-rando-picker-action {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
}
.rs-rando-picker-action .rs-btn {
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.rs-rando-picker-action .rs-btn:not([style*="display:none"]) {
  display: flex !important;
}
.rs-activite-form .rs-type-rando .rs-rando-picker-action .rs-btn {
  text-align: center !important;
  width: 220px !important;
  background: #2f6f3e !important;
  border: 1px solid #2f6f3e !important;
  color: #fff !important;
  padding: 8px 14px !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
}

@media (max-width: 768px) {
  .rs-activite-form .rs-block-rando .rs-rando-picker-row {
    grid-template-columns: 1fr !important;
  }

  .rs-activite-form .rs-block-rando .rs-rando-picker-action {
    justify-content: flex-start;
  }

  .rs-activite-form .rs-block-rando .rs-rando-picker-action .rs-btn {
    width: auto;
  }
}

/* Remplacer le gros bouton Effacer Toolset */

.rs-activite-form .js-wpt-date-clear {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 22px !important;
    text-align: center !important;
}

.rs-activite-form .js-wpt-date-clear::before {
    content: "×";
    font-size: 16px;
    font-weight: 700;
    color: #64748b;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.rs-activite-form .js-wpt-date-clear:hover::before {
    color: #dc2626;
}
/* ================================
   ACTIVITES - popup choix randonnée
   ================================ */

.rs-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.rs-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.rs-modal-box {
  position: relative;
  width: min(920px, 92vw);
  max-height: 82vh;
  margin: 6vh auto;
  background: #ffffff;
  border-radius: 8px;
  padding: 18px 20px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.rs-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.rs-modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.rs-modal-close {
  border: none;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.rs-rando-search {
  width: 100%;
  margin-bottom: 14px;
  padding: 8px 10px;
  border: 1px solid #c7d2e2;
}

.rs-rando-results {
  max-height: 58vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rs-rando-result-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #d7dde3;
  border-radius: 5px;
  padding: 9px 11px;
  cursor: pointer;
}

.rs-rando-result-item:hover {
  background: #edf6e9;
  border-color: #6dbb3f;
}

.rs-rando-result-item strong {
  display: block;
  color: #0f5f2f;
}

.rs-rando-result-item span {
  display: block;
  font-size: 0.85rem;
  color: #475569;
  margin-top: 2px;
}

/* ================================
   ACTIVITES - Liste Admin
   ================================ */
.rs-activites-month-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 18px 0 24px;
}

.rs-btn-new-activity {
  margin-right: auto;
}

.rs-activites-month-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rs-activites-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.rs-activites-table th,
.rs-activites-table td {
  border-bottom: 1px solid #d7dde3;
  padding: 8px 10px;
  vertical-align: top;
}

.rs-activites-table th {
  background: #edf6e9;
  color: #0f172a;
  text-align: left;
}

.rs-activites-table tr.rs-statut-annule {
  opacity: 0.55;
}

.rs-activites-table tr.rs-statut-brouillon {
  background: #fffdf3;
}

.rs-table-action {
  font-weight: 600;
  color: #2f6f3e;
  text-decoration: none;
}

.rs-empty {
  text-align: center;
  color: #64748b;
  padding: 18px;
}

.rs-activite-etat {
  white-space: nowrap;
  text-align: center;
}

.rs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  margin-right: 4px;
  border-radius: 4px;
  background: #f1f5f9;
  font-size: 0.95rem;
}

.rs-activites-legende {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.rs-activites-legende strong {
    color: #334155;
}

.rs-activites-legende .rs-separateur {
    color: #cbd5e1;
}

.rs-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.rs-dot-yellow { background: #facc15; }
.rs-dot-green  { background: #22c55e; }
.rs-dot-red    { background: #ef4444; }
.rs-dot-blue   { background: #3b82f6; }

.rs-visibilite-icon {
    font-size: 1rem;
}

/* ================================
   ACTIVITES - Liste Adhérents
   ================================ */
.rs-activites-adherents {
  max-width: 760px;
  margin: 0 auto;
}

.rs-activites-public-nav {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  margin: 12px 0 18px;
}

.rs-activites-public-title {
  margin: 0;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.2;
}

.rs-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  text-decoration: none;
  background: #eef3f7;
  font-size: 1.25rem;
  font-weight: 700;
}

.rs-activites-public-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rs-activite-public-item {
  display: grid;
  grid-template-columns: 58px 1fr 18px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #cfe0f2;
  border-radius: 10px;
  background: #f7fbff;
  text-decoration: none;
  color: inherit;
}

.rs-activite-public-item:hover {
  background: #eef7ff;
}

.rs-activite-public-main {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  align-items: start;
}

.rs-activite-public-date {
  text-align: right;
  white-space: nowrap;
  color: #0055a4;
}

.rs-date-icon {
  font-size: 1rem;
  line-height: 1;
  margin-bottom: 2px;
}

.rs-date-day {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
}

.rs-date-time {
  font-size: 0.80rem;
  font-weight: 700;
  line-height: 1.1;
}

.rs-activite-public-content {
  min-width: 0;
  border-left: 1px solid #d7e3ee;
  padding-left: 10px;
}

.rs-activite-public-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.25;
}

.rs-activite-public-title-line strong {
  min-width: 0;
}

.rs-activite-public-infos {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #44515c;
  line-height: 1.35;
}

.rs-activite-public-arrow {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0055a4;
}

.rs-activite-badge {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 7px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.rs-badge-annule {
  background: #d93025;
}

.rs-badge-reporte {
  background: #f57c00;
}

.rs-empty {
  padding: 14px;
  text-align: center;
  color: #667;
}

.rs-activite-type-rando {
  background: #f7fbff;
  border-left: 4px solid #8bbce8;
}

.rs-activite-type-montagne {
  background: #f6fbf7;
  border-left: 4px solid #7fbe8a;
}

.rs-activite-type-social {
  background: #fff8f1;
  border-left: 4px solid #e2a76f;
}

.rs-activite-type-sejour {
  background: #f8f5ff;
  border-left: 4px solid #a793d8;
}

.rs-activite-type-admin {
  background: #f5f5f5;
  border-left: 4px solid #999;
}

.rs-activite-status-reporte .rs-activite-public-date,
.rs-activite-status-reporte .rs-activite-public-arrow {
  color: #d96c00;
}

.rs-activite-status-annule {
  background: #fff3f3;
  border-color: #e6a0a0;
  border-left-color: #d93025;
}

.rs-activite-status-reporte {
  background: #fff7e8;
  border-color: #e5bd7a;
  border-left-color: #f57c00;
}

.rs-activite-status-annule .rs-activite-public-date,
.rs-activite-status-annule .rs-activite-public-arrow {
  color: #c62828;
}
@media (max-width: 420px) {
  .rs-activite-public-item {
    grid-template-columns: 30px 68px 1fr 14px;
    gap: 6px;
    padding: 9px 8px;
  }

  .rs-activite-public-title-line {
    font-size: 0.88rem;
  }

  .rs-activite-public-infos {
    font-size: 0.8rem;
  }

  .rs-activite-badge {
    font-size: 0.65rem;
    padding: 2px 5px;
  }
}

/* ================================
   ACTIVITES - Détail
   ================================ */
.rs-activite-rando-card {
  padding: 16px;
}

.rs-rando-main {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.rs-rando-main h1 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.rs-rando-infos {
  font-size: 0.95rem;
  opacity: 0.85;
}

.rs-rando-detail-btn {
  white-space: nowrap;
  padding: 8px 12px;
}

.rs-rando-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.rs-rando-options span {
  background: #eef7e9;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.rs-rando-practical {
  margin-top: 14px;
  background: #f8f8f8;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.rs-muted {
  opacity: 0.7;
}

.rs-section-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.rs-animateurs-list {
  display: grid;
  gap: 8px;
}

.rs-animateur-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #f8f8f8;
  border-radius: 10px;
  padding: 10px 12px;
}

.rs-animateur-name {
  font-weight: 400;
}

.rs-animateur-phone {
  text-decoration: none;
  font-weight: 400;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .rs-rando-main {
    display: block;
  }

  .rs-rando-detail-btn {
    display: block;
    margin-top: 10px;
    text-align: center;
  }

  .rs-animateur-row {
    display: block;
  }

  .rs-animateur-phone {
    display: inline-block;
    margin-top: 4px;
  }
}

.rs-activite-nav-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.rs-activite-nav-actions .rs-btn {
  text-align: center;
}

.rs-btn-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

@media (max-width: 480px) {
  .rs-activite-nav-actions {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .rs-activite-nav-actions .rs-btn {
    padding: 9px 6px;
    font-size: 0.85rem;
  }
}

/* ================================
   Modal niveau de randonnée
   ================================ */
.rando-help-link {
  display: inline-block;
  margin: 0 0 6px 8px;
  font-size: 0.9em;
  text-decoration: underline;
}

.rando-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
}


.rando-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.rando-modal-box {
  position: relative;
  max-width: 520px;
  margin: 12vh auto;
  background: #fff;
  padding: 24px;
  border-radius: 10px;
  z-index: 1;
}

.rando-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 28px;
  text-decoration: none;
}

/* =========================================================
   ARTICLES : liste, éditeur simplifié, aperçu, mailing
   (anciennement en <style> dans includes/articles.php)
   ========================================================= */

.rs-articles-admin,
.rs-article-edition,
.rs-article-apercu {
  max-width: 1100px;
  margin: 1.5rem auto;
}

/* Onglets de catégorie */
.rs-articles-onglets {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 2px solid #d7dde3;
  margin-bottom: 1rem;
}

.rs-articles-onglets a {
  padding: 8px 16px;
  border: 1px solid #d7dde3;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #f5f5f5;
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
}

.rs-articles-onglets a.actif {
  background: #166534;
  border-color: #166534;
  color: #ffffff;
}

.rs-articles-filtres {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.rs-articles-filtres select,
.rs-articles-filtres input[type="search"] {
  padding: .35rem .5rem;
  min-height: 36px;
}

.rs-articles-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.rs-articles-table th,
.rs-articles-table td {
  padding: .55rem .6rem;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

.rs-articles-table th {
  text-align: left;
  background: #f5f5f5;
}

.rs-articles-table .rs-col-date {
  white-space: nowrap;
  width: 90px;
}

.rs-articles-table .rs-col-actions {
  white-space: nowrap;
}

.rs-inline-form {
  display: inline;
  margin: 0;
}

.rs-btn.rs-btn-mail {
  background: #4f7f3f;
  border-color: #4f7f3f;
  color: #ffffff;
}

.rs-btn.rs-btn-danger {
  background: #ffffff;
  border-color: #b91c1c;
  color: #b91c1c;
}

.rs-pagination {
  margin-top: 1rem;
}

.rs-pagination a,
.rs-pagination span {
  display: inline-block;
  padding: .3rem .55rem;
  margin-right: .2rem;
  border: 1px solid #ccc;
  text-decoration: none;
}

.rs-pagination .current {
  background: #333;
  color: #fff;
  border-color: #333;
}

@media (max-width: 760px) {
  .rs-articles-table,
  .rs-articles-table thead,
  .rs-articles-table tbody,
  .rs-articles-table th,
  .rs-articles-table td,
  .rs-articles-table tr {
    display: block;
  }

  .rs-articles-table thead {
    display: none;
  }

  .rs-articles-table tr {
    border: 1px solid #ddd;
    margin-bottom: .8rem;
    padding: .5rem;
  }

  .rs-articles-table td {
    border: none;
    padding: .3rem 0;
  }

  .rs-articles-table td::before {
    content: attr(data-label) " : ";
    font-weight: bold;
  }

  .rs-articles-table .rs-col-actions::before {
    content: "";
  }
}

/* Éditeur */
.rs-article-edition .rs-form-row small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.rs-featured-apercu img {
  max-width: 320px;
  height: auto;
  border-radius: 6px;
}

.rs-article-champs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.rs-article-edition .rs-form-actions .rs-btn-gauche {
  margin-right: auto;
}

@media (max-width: 760px) {
  .rs-article-edition .rs-grid {
    grid-template-columns: 1fr;
  }
  .rs-article-edition .rs-form-actions {
    flex-wrap: wrap;
  }
}

/* Aperçu */
.rs-article-apercu-bandeau {
  padding: 10px 14px;
  margin-bottom: 1rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  font-weight: 600;
}

.rs-article-apercu-image img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  border-radius: 6px;
}

.rs-article-apercu-contenu::after {
  content: "";
  display: table;
  clear: both;
}

/* Envoi par mailing */
.rs-article-mailing {
  max-width: 960px;
  margin: 1.5rem 0;
}

.rs-article-mailing fieldset {
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 1rem;
}

.rs-article-mailing legend {
  font-weight: 700;
  padding: 0 .4rem;
}

.rs-article-mailing label {
  display: inline-block;
  margin-right: 1.2rem;
  margin-bottom: .5rem;
}

.rs-article-mailing .rs-btn {
  display: inline-block;
  padding: .45rem .75rem;
  border-radius: 4px;
  border: 1px solid #999;
  background: #eee;
  color: #222;
  text-decoration: none;
  cursor: pointer;
  margin-right: .4rem;
}

.rs-article-mailing .rs-btn-primary {
  background: #2f6f9f;
  color: #fff;
  border-color: #2f6f9f;
}

.rs-article-mailing .rs-btn-mail {
  background: #4f7f3f;
  color: #fff;
  border-color: #4f7f3f;
}

.rs-mailing-ok {
  padding: .8rem;
  margin-bottom: 1rem;
  background: #e7f6e7;
  border-left: 4px solid #4f7f3f;
}

.rs-mailing-error {
  padding: .8rem;
  margin-bottom: 1rem;
  background: #fdecec;
  border-left: 4px solid #b00020;
}

.rs-article-mailing table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: .95rem;
}

.rs-article-mailing th,
.rs-article-mailing td {
  border-bottom: 1px solid #ddd;
  padding: .45rem .5rem;
  text-align: left;
}

.rs-article-mailing th {
  background: #f5f5f5;
}

/* Liste de cases à cocher (ex. rôles asso de la fiche profil) */
.rs-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  min-height: 36px;
  align-items: center;
}

.rs-checkbox-list label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  color: #111827;
}

.rs-checkbox-list input {
  width: auto;
  min-height: 0;
}


/* =========================================================
   RANDONNÉES : page Liste + Carte, carte d'une rando, outils admin
   (anciennement en <style> dans includes/randos.php ; préfixés par
   .randos-page-tabs pour primer sur les règles générales ci-dessus)
   ========================================================= */

.randos-page-tabs { margin: 15px 0; font-family: inherit; width: 100%; box-sizing: border-box; }
.randos-page-tabs .rando-search-box { margin-bottom: 15px; width: 100%; max-width: 800px; margin-left: auto; margin-right: auto; }
.randos-page-tabs .rando-search-input { width: 100%; padding: 12px 16px; font-size: 1rem; border: 1px solid #cbd5e1; border-radius: 8px; box-sizing: border-box; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.randos-page-tabs .rando-search-input:focus { outline: none; border-color: #2a6a4e; box-shadow: 0 0 0 3px rgba(42, 106, 78, 0.15); }

.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: rgba(43, 127, 255, 0.25) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: #2b7fff !important; color: #ffffff !important; font-weight: bold !important; }

.randos-page-tabs .randos-tabs { display: flex; gap: 10px; margin-bottom: 15px; max-width: 800px; margin-left: auto; margin-right: auto; }
.randos-page-tabs .randos-tab { padding: 10px 20px; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; font-weight: bold; color: #334155; }
.randos-page-tabs .randos-tab.active { background: #2a6a4e; color: #fff; border-color: #2a6a4e; }
.randos-page-tabs .randos-tab-panel { display: none; width: 100%; }
.randos-page-tabs .randos-tab-panel.active { display: block; }

.randos-page-tabs .rando-card-list { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 800px; margin: 0 auto; }
.randos-page-tabs .rando-card { border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; background: #f8fafc; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: all 0.2s ease; cursor: pointer; box-sizing: border-box; }
.randos-page-tabs .rando-card:hover { background: #f1f5f9; border-color: #2a6a4e; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.08); }
.randos-page-tabs .rando-card h3 { margin: 0 0 6px 0; font-size: 1.05em; line-height: 1.3; color: #1e293b; }
.randos-page-tabs .rando-card h3 a { color: #1e293b; text-decoration: none; font-weight: 700; pointer-events: none; }
.randos-page-tabs .rando-card:hover h3 a { color: #2a6a4e; }
.randos-page-tabs .rando-meta { font-size: 0.88em; color: #64748b; margin: 0; line-height: 1.5; }
.randos-page-tabs .rando-ibp-badge { display: inline-block; background: #e2e8f0; color: #334155; font-weight: bold; padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }

#rando-map { height: 600px; width: 100%; border-radius: 8px; overflow: hidden; background: #eee; }

/* Carte d'une randonnée */
.rs-map-wrapper { margin: 20px 0; border: 1px solid var(--preset-color-theme-palette-6, #ccc); border-radius: 6px; overflow: hidden; background: #fff; }
#rs-leaflet-map { width: 100%; height: 400px; }
.rs-elevation-profile { padding: 15px; border-top: 1px solid var(--preset-color-theme-palette-6, #eee); background-color: #fafafa; }
.elevation-title { margin: 0 0 10px 0 !important; font-size: 0.9em; color: var(--preset-color-theme-palette-11, #333); }
.elevation-canvas-container { position: relative; width: 100%; height: 120px; }
#rs-elevation-chart { width: 100%; height: 100%; display: block; }
.elevation-stats { display: flex; justify-content: space-around; margin-top: 8px; font-size: 0.85em; color: #666; }
.rs-rando-map-absente { padding: 12px 15px; background: #fef3c7; border: 1px solid #f59e0b; border-radius: 4px; }

/* Outils admin (import GPX, export des ID) */
.rs-outil-admin { background: #fff; border: 1px solid #cbd5e1; padding: 20px; border-radius: 8px; max-width: 650px; margin: 20px auto; font-family: sans-serif; }
.rs-outil-admin h3 { margin-top: 0; }
.rs-outil-admin-btn { background: #2a6a4e; color: #fff; border: none; padding: 10px 18px; font-weight: bold; border-radius: 5px; cursor: pointer; }
.rs-outil-admin-barre { background: #e2e8f0; border-radius: 10px; height: 20px; width: 100%; overflow: hidden; }
#import-bar { background: #2a6a4e; width: 0%; height: 100%; transition: width 0.3s ease; }
#import-status { font-size: 13px; color: #475569; margin-top: 8px; }
#import-log { margin-top: 15px; max-height: 200px; overflow-y: auto; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; font-size: 12px; font-family: monospace; }
.rs-outil-admin textarea { width: 100%; height: 120px; font-family: monospace; font-size: 12px; padding: 8px; }

/* =========================================================
   LISTE ADMIN DES RANDONNÉES [rs-randonnees-table] : filtres et affichage mobile
   (sélecteurs préfixés par .rs-randos-container pour primer sur le thème)
   ========================================================= */

.rs-randos-container .rs-randos-filtres {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

/* Même police que la liste */
.rs-randos-container .rs-randos-filtres input {
  font: inherit;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
  background: #fff;
  color: #1f2937;
}

.rs-randos-container .rs-randos-filtres .rs-randos-recherche {
  flex: 1 1 260px;
  min-width: 0;
}

/* Plage min / max : libellé + deux champs */
.rs-randos-container .rs-randos-filtres .rs-randos-plage {
  display: grid;
  grid-template-columns: auto 80px 80px;
  align-items: center;
  gap: 6px;
}

.rs-randos-container .rs-randos-filtres .rs-randos-plage span {
  white-space: nowrap;
  color: #475569;
}

.rs-randos-container .rs-randos-filtres .rs-randos-plage input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.rs-randos-container .rs-randos-filtres .rs-randos-reinit {
  font: inherit;
  min-height: 40px;
  padding: 6px 14px;
  background: #718096 !important;
  color: #fff !important;
  border: 1px solid #718096;
  border-radius: 6px;
  cursor: pointer;
}

.rs-randos-container .rs-randos-filtres .rs-randos-reinit:hover {
  background: #4a5568 !important;
}

/* Ligne entière cliquable (ouvre la fiche) */
.rs-randos-container .randos-table tr.randos-table-row {
  cursor: pointer;
}

.rs-randos-container .randos-table tr.randos-table-row:hover {
  background: #f1f5f9;
}

/* Écran étroit : filtres sur toute la largeur, une randonnée sur trois lignes */
@media (max-width: 700px) {

  .rs-randos-container .rs-randos-filtres .rs-randos-recherche,
  .rs-randos-container .rs-randos-filtres .rs-randos-plage,
  .rs-randos-container .rs-randos-filtres .rs-randos-reinit {
    flex: 1 1 100%;
  }

  /* Libellé à largeur fixe, min et max se partagent le reste */
  .rs-randos-container .rs-randos-filtres .rs-randos-plage {
    grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr);
  }

  .rs-randos-container .randos-table,
  .rs-randos-container .randos-table tbody {
    display: block;
  }

  .rs-randos-container .randos-table thead {
    display: none;
  }

  /* 1 : statut + parcours ; 2 : ville de départ ; 3 : distance, dénivelé, dernière sortie */
  .rs-randos-container .randos-table tr.randos-table-row {
    display: grid;
    grid-template-columns: 18px auto auto 1fr;
    grid-template-areas:
      "statut parcours parcours parcours"
      ".      ville    ville    ville"
      ".      dist     deniv    date";
    column-gap: 14px;
    row-gap: 2px;
    padding: 8px 4px;
    border-bottom: 1px solid #e2e8f0;
  }

  .rs-randos-container .randos-table tr.randos-table-row td {
    display: block;
    padding: 0;
    border: none;
    text-align: left !important;
  }

  .rs-randos-container .randos-table .asso-col-status { grid-area: statut; align-self: center; }
  .rs-randos-container .randos-table .col-parcours    { grid-area: parcours; font-weight: 600; }
  .rs-randos-container .randos-table .col-ville       { grid-area: ville; color: #475569; }
  .rs-randos-container .randos-table .col-dist        { grid-area: dist; }
  .rs-randos-container .randos-table .col-deniv       { grid-area: deniv; }
  .rs-randos-container .randos-table .col-date        { grid-area: date; color: #64748b; }

  .rs-randos-container .randos-table tr.js-no-results td {
    display: block;
  }
}

/* =========================================================
   FORMULAIRES TOOLSET « RANDO CREATE / EDIT » SUR TÉLÉPHONE
   Leurs lignes rs-grid-2 / rs-grid-3 ont un style intégré « display: flex »
   (qui l'emporte sur les règles .rs-grid-* ci-dessus) : on le neutralise
   sur écran étroit. Seules les lignes avec ce style intégré sont visées
   (le formulaire Activité n'est pas concerné).
   ========================================================= */

@media (max-width: 768px) {

  /* Une colonne : libellé au-dessus du champ, pleine largeur */
  .rs-activite-form .rs-grid-2[style*="display: flex"],
  .rs-activite-form .rs-grid-3[style*="display: flex"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px !important;
    margin-bottom: 14px !important;
  }

  /* Libellé + lien « Explication / Instructions » sur une seule ligne */
  .rs-activite-form .rs-grid-3 div[style*="space-between"] {
    align-items: baseline;
    gap: 10px;
  }

  .rs-activite-form .rs-grid-3 div[style*="space-between"] label {
    margin-right: auto;
  }

  .rs-activite-form .rando-help-link {
    white-space: nowrap;
  }

  /* Champs en pleine largeur ; police de 16 px (évite le zoom automatique de l'iPhone) */
  .rs-activite-form .rs-grid-2[style*="display: flex"] input:not([type="checkbox"]):not([type="radio"]),
  .rs-activite-form .rs-grid-2[style*="display: flex"] select,
  .rs-activite-form .rs-grid-3[style*="display: flex"] input:not([type="checkbox"]):not([type="radio"]),
  .rs-activite-form .rs-grid-3[style*="display: flex"] select,
  .rs-activite-form .rs-grid-1 input,
  .rs-activite-form textarea {
    width: 100% !important;
    max-width: 100%;
    font-size: 16px;
  }

  /* Cases à cocher (Pique-nique, Restaurant) : case à sa taille, libellé à gauche */
  .rs-activite-form .rs-grid-2[style*="display: flex"] input[type="checkbox"] {
    width: auto !important;
    margin: 0 8px 0 0;
  }

  .rs-activite-form .rs-grid-2[style*="display: flex"] label,
  .rs-activite-form .rs-grid-2[style*="display: flex"] .form-group,
  .rs-activite-form .rs-grid-2[style*="display: flex"] [class*="col-"] {
    float: none !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: left !important;
  }

  /* Bloc OpenRunner : boutons l'un sous l'autre, en pleine largeur */
  .rs-activite-form div:has(> #btn-sync-openrunner) {
    flex: 1 1 100% !important;
    margin-bottom: 0 !important;
  }

  .rs-activite-form #btn-sync-openrunner,
  .rs-activite-form #btn-openrunner-link,
  .rs-activite-form #btn-openrunner-find {
    display: block !important;
    width: 100%;
    margin: 0 0 8px 0 !important;
    text-align: center;
    box-sizing: border-box;
  }

  /* Titres de section moins espacés */
  .rs-activite-form h2[style] {
    font-size: 1.3rem;
    margin-bottom: 15px !important;
  }
}

/* Fiche rando : texte du bloc Parcours aligné comme celui du bloc Départ (décalé de 30 px) */
.rando-detail .rs-rando-texte {
  margin-left: 30px;
}

/* [rs_rando_repas] : sur téléphone, pique-nique et restaurant chacun sur une ligne */
@media (max-width: 600px) {
  .rs-rando-repas span {
    display: block;
  }

  .rs-rando-repas .rs-rando-repas-sep {
    display: none;
  }
}

/* =========================================================
   PLANNING ADMIN DES ACTIVITÉS [rs-activites-liste-admin] : boutons de mois et téléphone
   ========================================================= */

.rs-activites-month-nav .rs-activites-mois-btns {
  display: flex;
  gap: 10px;
}

@media (max-width: 700px) {

  /* Bandeau : « Ajouter » ; précédent / courant / suivant sur une ligne ; choix du mois */
  .rs-activites-month-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .rs-activites-month-nav .rs-btn-new-activity {
    margin-right: 0;
    text-align: center;
  }

  .rs-activites-month-nav .rs-activites-mois-btns .rs-btn {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
    text-align: center;
    white-space: nowrap;
  }

  .rs-activites-month-nav .rs-long {
    display: none;
  }

  .rs-activites-month-form input[type="month"] {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* Une activité sur quatre lignes :
     1 date / état ; 2 activité ; 3 infos ; 4 Modifier / Supprimer (lignes 2 à 4 en retrait) */
  .rs-activites-table,
  .rs-activites-table tbody {
    display: block;
  }

  .rs-activites-table thead {
    display: none;
  }

  .rs-activites-table tr[class^="rs-statut-"] {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    grid-template-areas:
      "date     date     etat"
      ".        activite activite"
      ".        infos    infos"
      ".        actions  actions";
    row-gap: 4px;
    padding: 10px 6px;
    border-bottom: 1px solid #d7dde3;
  }

  .rs-activites-table tr[class^="rs-statut-"] td {
    display: block;
    padding: 0;
    border: none;
  }

  .rs-activites-table .rs-col-date     { grid-area: date; font-weight: 700; color: #0f172a; }
  .rs-activites-table .rs-activite-etat { grid-area: etat; text-align: right; }
  .rs-activites-table .rs-col-activite { grid-area: activite; }
  .rs-activites-table .rs-col-infos    { grid-area: infos; color: #475569; }
  .rs-activites-table .rs-col-actions  { grid-area: actions; padding-top: 4px; }

  .rs-activites-table .rs-activite-etat .rs-dot {
    margin-right: 0;
  }

  /* Modifier / Supprimer en boutons */
  .rs-activites-table .rs-col-actions .rs-action-sep {
    display: none;
  }

  .rs-activites-table .rs-col-actions .rs-table-action {
    display: inline-block;
    margin-right: 8px;
    padding: 5px 14px;
    border: 1px solid #c7d2e2;
    border-radius: 4px;
    background: #fff;
  }
}

/* Formulaire Activité : bloc de choix de la rando sur une colonne sur téléphone
   (l'ancienne règle visait .rs-block-rando, classe inexistante) */
@media (max-width: 768px) {
  .rs-activite-form .rs-type-rando .rs-rando-picker-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .rs-activite-form .rs-type-rando .rs-rando-picker-action .rs-btn {
    width: 100% !important;
  }
}

/* =========================================================
   FORMULAIRES TOOLSET ACTIVITÉ (création / modification) SUR TÉLÉPHONE
   ========================================================= */

@media (max-width: 768px) {

  /* Date : 1re ligne date + calendrier + ✕ ; 2e ligne Heure / Minute */
  .rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"] > input[type="text"] {
    order: 1;
    flex: 1 1 130px;
    width: auto !important;
    min-width: 0;
  }

  .rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"] > img {
    order: 2;
  }

  .rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"] > .js-wpt-date-clear {
    order: 3;
  }

  /* Saut de ligne forcé */
  .rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"]::after {
    content: "";
    order: 4;
    flex-basis: 100%;
    height: 0;
  }

  .rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"] > .wpt-form-label,
  .rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"] > label,
  .rs-activite-form .js-wpt-field-items[data-item_name*="activite_date_debut"] > select {
    order: 5;
  }

  /* Bloc rando : Montagne, Pique-nique, Restaurant, puis Coût covoiturage
     (sur ordinateur : deux lignes de deux colonnes, inchangées) */
  .rs-activite-form .rs-type-rando .rs-activite-section {
    display: flex;
    flex-direction: column;
  }

  .rs-activite-form .rs-type-rando .rs-activite-section > .rs-grid-2 {
    display: contents;
  }

  .rs-activite-form .rs-type-rando .rs-inline-checks {
    order: 1;
    margin-bottom: 10px;
  }

  .rs-activite-form .rs-type-rando .rs-places-line {
    order: 2;
    margin-top: 6px;
  }

  /* Champs de saisie : police de 16 px (évite le zoom automatique de l'iPhone) */
  .rs-activite-form input[type="text"],
  .rs-activite-form input[type="number"],
  .rs-activite-form select,
  .rs-activite-form textarea {
    font-size: 16px;
  }
}

/* Planning admin : titre « Planning admin — mois » réduit sur téléphone */
@media (max-width: 700px) {
  .rs-activites-admin h1.rando-title {
    font-size: 1.35rem;
    line-height: 1.25;
    margin-bottom: 4px;
  }
}
