/*
Theme Name: Kadence Child – JPO IUT Évry
Template: kadence
Description: Thème enfant pour le site JPO IUT Évry
Version: 1.0
*/

/* ======================================================
   VARIABLES & BASE
====================================================== */

:root {
  --gap: 2rem;
}

.site-main.filiere {
  max-width: 1200px;
  margin: 0 auto;
}

/* ======================================================
   GRILLES GÉNÉRALES
====================================================== */

.filiere-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin: 3rem 0;
  align-items: start;
}

@media (max-width: 900px) {
  .filiere-grid {
    grid-template-columns: 1fr;
  }
}

.filiere-col {
  min-width: 0;
  max-width: 100%;
}

/* ======================================================
   VIDÉOS + SESSIONS — FORÇAGE 50 %
====================================================== */

.filiere-video-sessions {
  display: grid !important;
  grid-template-columns: 50% 50% !important;
  gap: var(--gap);
  align-items: start;
}

.filiere-video-sessions > .filiere-col {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 900px) {
  .filiere-video-sessions {
    grid-template-columns: 1fr !important;
  }
}

/* ======================================================
   HERO
====================================================== */

.filiere-hero {
  margin-bottom: 3rem;
}

.filiere-hero h1 {
  margin-bottom: 0.5rem;
}

/* ======================================================
   BLOCS
====================================================== */

.filiere-box {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  height: 100%;
}

/* ======================================================
   VIDEO SLIDER
====================================================== */

.video-slider {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
}

.video-track {
  display: flex;
  width: 100%;
  max-width: 100%;
  transition: transform 0.4s ease;
}

.video-slide {
  flex: 0 0 100%;
  max-width: 100%;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

/* ======================================================
   FLÈCHES DANS LA VIDÉO — SANS RONDS
====================================================== */

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;

  background: none !important;
  border: none;
  border-radius: 0 !important;

  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;

  font-size: 2.5rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;

  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

.slider-arrow.prev { left: 1rem; }
.slider-arrow.next { right: 1rem; }

.slider-arrow:hover {
  opacity: 0.8;
}

.slider-arrow:focus {
  outline: none;
  text-decoration: underline;
}

/* ======================================================
   DOTS
====================================================== */

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
}

.slider-dots button.is-active {
  background: var(--global-palette1);
}

/* ======================================================
   MINIATURES — SCROLL STRICT
====================================================== */

.slider-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding-bottom: 0.5rem;
  box-sizing: border-box;
}

.slider-thumbs::-webkit-scrollbar {
  height: 6px;
}

.slider-thumbs::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.3);
  border-radius: 3px;
}

.thumb {
  flex: 0 0 auto;
  width: 120px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  opacity: 0.6;
}

.thumb img {
  display: block;
  width: 100%;
  border-radius: 4px;
}

.thumb.is-active {
  opacity: 1;
  outline: 2px solid var(--global-palette1);
  outline-offset: 2px;
}

/* ======================================================
   SESSIONS
====================================================== */

.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.session-card {
  background: #f7f7f7;
  padding: 1rem;
  border-radius: 6px;
}

.session-card h3 {
  margin-top: 0;
}

/* ======================================================
   CARTE JPO
====================================================== */

.osm-map {
  width: 100%;
  height: 300px;
  border-radius: 8px;
}

.coordonnees {
  display: flex;
  flex-direction: column;
}

/* ======================================================
   LISTES
====================================================== */

.contenu-formation ul,
.filiere-projets ul {
  padding-left: 1.2rem;
}

.contenu-formation li,
.filiere-projets li {
  margin-bottom: 0.5rem;
}

/* ======================================================
   CONTACT & MODALE
====================================================== */

.filiere-contact {
  margin: 4rem 0;
  text-align: center;
}

.filiere-contact-btn {
  background: var(--global-palette1);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

.filiere-contact-btn:hover {
  opacity: 0.9;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal.is-open {
  display: flex;
}

.modal-content {
  background: #fff;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 8px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ======================================================
   TYPOGRAPHIE
====================================================== */

h2 {
  margin-top: 0;
}

h3 {
  margin-top: 1.5rem;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 600px) {
  .slider-arrow {
    font-size: 2rem;
  }

  .thumb {
    width: 90px;
  }
}
/* ======================================================
  carousel
====================================================== */
.acf-scroll-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(80%, 1fr);
    gap: 1rem;

    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.acf-scroll-item {
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
}

.acf-scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .acf-scroll-carousel {
        grid-auto-columns: minmax(30%, 1fr);
    }
}
/* ======================================================
   PAGE FORMATIONS
====================================================== */


.formations-grid {
  display: grid;
  gap: var(--gap);
  justify-items: center; /* clé */
}

/* Grille avec UNE seule carte : aligner à gauche */
.formations-grid:has(> .formation-card:only-child) {
  justify-items: start;
}

/* Espace entre l’image et la bordure de la carte */
.formation-thumb {
  padding: 0.75rem; /* ajuste : 0.5rem / 1rem selon ton goût */
}

@media (max-width: 639px) {
  .formations-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .formations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .formations-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.formation-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 420px; /* LA clé */
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.formation-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}

.formation-link {
  margin-top: auto;
}
.formations-type-title {
  margin-bottom: 1.5rem;
}
