/* events-responsive.css
   Mobile-first responsive overrides (v1)
   Objectif : lisibilité mobile, grilles cohérentes, WCAG touch targets, iOS inputs, impression.
*/


/* Lisibilité iPhone / mobile (base) */
.events-module{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  font-size:16px;
  line-height:1.6;
}

/* Boost typographie sur mobile (les rem du thème hôte peuvent être trop petits) */
@media (max-width: 768px){
  .events-module .events-toolbar h2{ font-size:20px; }
  .events-module .event-title{ font-size:18px; }
  .events-module .event-loc,
  .events-module .event-excerpt{ font-size:15px; }
  .events-module .pill{ font-size:13px; padding:.2rem .75rem; }
  .events-module .events-btn,
  .events-module button,
  .events-module a.button,
  .events-module .btn{ font-size:15px; }
  .events-module .events-alert{ font-size:15px; }
  .events-module .detail-loc{ font-size:15px; }
}



.events-module .events-grid{
  grid-template-columns:1fr;
}

/* Tablettes */
@media (min-width:640px){
  .events-module .events-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Petits desktops */
@media (min-width:768px){
  .events-module .events-grid{
    gap:1.1rem;
  }
}

/* Desktop complet */
@media (min-width:1024px){
  .events-module .events-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

/* Grands écrans */
@media (min-width:1440px){
  .events-module .events-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

/* Touch targets 44x44 (WCAG) */
.events-module .btn,
.events-module button,
.events-module input,
.events-module select,
.events-module textarea{
  min-height:44px;
}

/* iOS : éviter le zoom automatique sur les inputs */
@media (max-width:1024px){
  .events-module input,
  .events-module select,
  .events-module textarea{
    font-size:16px;
    line-height:1.2;
  }
}

/* Formulaires : stack mobile -> inline desktop */
.events-module .reg-grid{
  grid-template-columns:1fr !important;
}

@media (min-width:768px){
  .events-module .reg-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

/* Archive filters : confort mobile (évite les pillules trop hautes) */
@media (max-width:640px){
  .events-module .archive-filters-modern{
    border-radius:18px;
  }
}

/* Tableaux : scroll horizontal tactile sur mobile */
@media (max-width:768px){
  .events-module .admin-table{
    display:block;
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .events-module .admin-table th,
  .events-module .admin-table td{
    white-space:nowrap;
  }
}

/* Performance/UX : accélération matérielle sur les éléments animés */
.events-module .event-card,
.events-module .events-modal,
.events-module .detail-cover img{
  transform:translateZ(0);
  backface-visibility:hidden;
}

/* Accessibilité : respect de prefers-reduced-motion */
@media (prefers-reduced-motion: reduce){
  .events-module *{
    animation-duration:0.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.001ms !important;
    scroll-behavior:auto !important;
  }
}

/* Impression */
@media print{
  .events-module .theme-toggle,
  .events-module .events-toolbar,
  .events-module .events-actions,
  .events-module .events-map-links,
  .events-module .btn{
    display:none !important;
  }
  .events-module .widget-wrap,
  .events-module .detail-wrap,
  .events-module .archive-wrap{
    box-shadow:none !important;
    border:1px solid #ddd !important;
    background:#fff !important;
    color:#000 !important;
  }
  .events-module .event-card{
    break-inside:avoid;
  }
}


@media (max-width: 640px){
  .events-module{ font-size:16px; }
  .events-module .archive-title,
  .events-module .event-title,
  .events-module .verify-title{ font-size:1.35rem; }
  .events-module .archive-sub,
  .events-module .event-sub,
  .events-module .verify-sub{ font-size:1rem; }
  .events-module .btn,
  .events-module button,
  .events-module input,
  .events-module select{ font-size:16px; }
}
