/*
Theme Name: Twentytwentyfive Enfant
Description: Theme enfant de Twentytwentyfive. Vous pouvez maintenant effectuer vos modifications en toute sécurité.
Author: WPMarmite
Author URI: https://wpmarmite.com
Template: twentytwentyfive
Version: 1.0
*/

/* ------------------------------------------------ */
/* General settings                 */
/* ------------------------------------------------ */
.wp-block-navigation.tw-nav-active-thick-border li.current-menu-item > a, .wp-block-navigation.tw-nav-hover-thick-border li a:hover {
  text-decoration-color: #01FF01;
}

.wp-block-search:not(.wp-block-search__button-inside).is-style-tw-underline .wp-block-search__input {
  border-top:  none !important;
}

/* ------------------------------------------------ */
/* Homepage                  */
/* ------------------------------------------------ */


/* ------------------------------------------------ */
/* Carte "Présentation"                              */
/* ------------------------------------------------ */

.a-propos {
  font-weight: 600;
}

.a-propos-homepage {
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #ffffff;
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out;
  transition: background-color 0.3s ease-out, transform 0.3s ease-out;
  text-decoration: none;
  max-width: 340px;
  margin: 1.5rem auto 0;  /* mobile + tablette */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.a-propos-homepage h2 {
  font-size: 1.2rem;
}

.a-propos-homepage a {
  text-decoration: none;
  font-size: 0.875rem;
}

.a-propos-homepage__content .link {
  color: #01FF01;
  font-size: 0.875rem;
}

/* Desktop large seulement — on garde EXACTEMENT ton layout */
@media (min-width: 1200px) {
  .a-propos-homepage {
    width: 250px;
    height: 320px;
    z-index: 5;
    margin-left: -60% !important;
    margin-right: 0;
    margin-top: 10px;
  }
}

/* Hover */
.a-propos-homepage:hover {
  box-shadow: rgba(0, 0, 0, 0.25) 0 8px 20px 0;
  background-color: #01FF01;
}


/* ------------------------------------------------ */
/* Titre "Actualité"                                */
/* ------------------------------------------------ */

.title-agenda {
  white-space: nowrap;
  display: inline-block;
}

@media (max-width: 900px) {
  .title-agenda {
    font-size: 1.4rem;
    text-align: center;
  }
}


/* ------------------------------------------------ */
/* Décos carte Présentation                         */
/* ------------------------------------------------ */

.a-propos-homepage-block {
  position: relative;
  width: max-content;
}

.a-propos-homepage-deco {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}

.a-propos-homepage-deco--top {
  top: -40px;
  right: -55px;
  width: 80px;
  height: 120px;
}

/* formes */
.a-propos-homepage-deco__square,
.a-propos-homepage-deco__rect {
  box-sizing: border-box;
  border: 3px solid #000;
  background: transparent;
  display: block;
}

.a-propos-homepage-deco__square--green {
  width: 22px;
  height: 22px;
  background: #01FF01;
  border-color: #01FF01;
  position: absolute;
  top: -35px;
  left: -505px;
}

.a-propos-homepage-deco__rect {
  width: 32px;
  height: 110px;
  position: absolute;
  top: -15px;
  left: -485px;
}

/* On masque en dessous de 1200px */
@media (max-width: 1200px) {
  .a-propos-homepage-deco {
    display: none !important;
  }
}


/* ------------------------------------------------ */
/* Carte "Next Event"                               */
/* ------------------------------------------------ */

.em-item.homepage {
  padding: 0 !important;
  border: 2px solid #01FF01;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #ffffff;
  box-shadow: rgba(0, 0, 0, 0.15) 0 5px 15px 0;
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out;
  max-width: 340px;
  margin: 1.5rem auto 0;
}

/* Desktop large */
@media (min-width: 1200px) {
  .em-item.homepage {
    width: 300px;
    height: 350px;
    z-index: 5;
    margin-left: 60%;
    margin-top: 19px !important;
  }

  .title-agenda {
    margin-left: 60%;
    margin-top: 100px !important;
  }
}

.em-item.homepage:hover {
  box-shadow: rgba(0, 0, 0, 0.25) 0 8px 20px 0;
}

/* IMAGE */

.em-item.homepage .em-item-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0 !important;
  margin: 0;
}

.em-item.homepage .em-item-image img {
  width: 110%;
  height: 100%;
  display: block;
  transition: transform 0.3s ease;
}

/* Overlay */
.em-item.homepage .em-item-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #01FF01;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.em-item.homepage:hover .em-item-image::after {
  opacity: 0.45;
}

/* TEXTE */

.em-item.homepage .em-item-info {
  padding: 0.45rem 0.75rem;
  margin: 0;
  min-height: auto !important;
}

.em-item.homepage .em-item-info > * {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.em-item.homepage .em-item-info > *:last-child {
  margin-bottom: 0;
}

.em-event-date {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  color: #111;
  margin: 0 0 0.35rem 0 !important;
}

/* Titre event */
.em-item.homepage .em-item-info h3,
.em-item.homepage .em-item-info h3 a {
  font-family: "Inter", sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.1 !important;
  color: #01FF01 !important;
  letter-spacing: 1px !important;
  text-decoration: none !important;
}

/* enlever marges P */
.em-item.homepage p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0;
}


/* ------------------------------------------------ */
/* Décos sous la carte Event                        */
/* ------------------------------------------------ */

.homepage-deco {
  position: relative;
  width: 100%;
  height: 55px;
  margin-top: 0.2rem;
  will-change: transform;
  transform: translateZ(0);
}

.homepage-deco-square--big {
  position: absolute;
  right: -103px;
  top: -20px;
  width: 53px;
  height: 53px;
  background: #01FF01;
}

.homepage-deco-square--outline {
  position: absolute;
  left: 329px;
  bottom: -15px;
  width: 32px;
  height: 32px;
  border: 3px solid #000;
  background: transparent;
}

/* masque tablette + mobile */
@media (max-width: 1200px) {
  .homepage-deco {
    display: none !important;
  }
}


/* ------------------------------------------------ */
/* ANIMATIONS                                       */
/* ------------------------------------------------ */

@keyframes homepage-card-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes homepage-deco-pop {
  from {
    opacity: 0;
    transform: scale(0) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.a-propos-homepage,
.em-item.homepage {
  opacity: 0;
  transform: translateY(20px);
  animation: homepage-card-in 0.8s ease-out forwards;
}

.a-propos-homepage { animation-delay: 0.15s; }
.em-item.homepage { animation-delay: 0.35s; }

.a-propos-homepage-deco__square--green,
.a-propos-homepage-deco__rect,
.homepage-deco-square--big,
.homepage-deco-square--outline {
  opacity: 0;
  transform-origin: center;
  animation: homepage-deco-pop 0.55s ease-out forwards;
}

.a-propos-homepage-deco__square--green { animation-delay: 0.55s; }
.a-propos-homepage-deco__rect { animation-delay: 0.7s; }
.homepage-deco-square--big { animation-delay: 0.85s; }
.homepage-deco-square--outline { animation-delay: 1s; }

@media (prefers-reduced-motion: reduce) {
  .a-propos-homepage,
  .em-item.homepage,
  .a-propos-homepage-deco__square--green,
  .a-propos-homepage-deco__rect,
  .homepage-deco-square--big,
  .homepage-deco-square--outline {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ------------------------------------------------ */
/* RESPONSIVE — TABLETTES                           */
/* ------------------------------------------------ */

@media (max-width: 1199px) {

  /* Les trois colonnes redeviennent verticales */
  .wp-block-columns.alignfull.wp-block-columns-is-layout-flex {
    flex-wrap: wrap !important;
  }

  .homepage-colonne1,
  .homepage-colonne2,
  .homepage-colonne3 {
    flex-basis: 100% !important;
    max-width: 700px;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* ORDRE : Actualité → Présentation → Vidéo */
  .homepage-colonne1 { order: 1; }
  .homepage-colonne3 { order: 2; }
  .homepage-colonne2 { order: 3; }

  /* Titre Actualité */
  .title-agenda {
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 1rem !important;
    white-space: normal !important;
  }

  /* Vidéo centrée */
  .homepage-colonne2 .wp-block-video,
  .homepage-colonne2 figure.wp-block-video video {
    width: 100% !important;
    max-width: 700px;
    margin: 2rem auto 0 !important;
    display: block !important;
  }

  /* Décos masquées */
  .a-propos-homepage-deco,
  .homepage-deco {
    display: none !important;
  }
}


/* ------------------------------------------------ */
/* RESPONSIVE — MOBILE (<768px)                     */
/* ------------------------------------------------ */

@media (max-width: 768px) {

  /* Largeur des cartes */
  .em-item.homepage,
  .a-propos-homepage {
    width: 92vw !important;
    max-width: 92vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Titre Actualité */
  .title-agenda {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    width: 100% !important;
  }

  /* Vidéo */
  .homepage-colonne2 .wp-block-video {
    margin: 2rem auto !important;
    max-width: 92vw !important;
  }

  /* Toujours masquer les décos */
  .a-propos-homepage-deco,
  .homepage-deco {
    display: none !important;
  }
}


/* ------------------------------------------------ */
/* Pages                  */
/* ------------------------------------------------ */

/*page ordinaire */
/* Mise en page desktop : thumbnail plus haute que le contenu */
@media (min-width: 1024px) {
    .attachment-post-thumbnail {
        max-height: 120%; /* → dépasse légèrement la hauteur du contenu */
        object-fit: cover;
        margin-top: -220px; /* → la fait dépasser vers le haut, ajuster selon la maquette */
        height: 100vh;
        object-fit: cover;
        z-index: 5;
    }
}

/* --- Desktop uniquement --- */
@media (min-width: 1024px) {
    /* Conteneur global de mise en page */
    .page-presentation {
        flex-direction: row;
             
    }

    /* Teaser : reste fixe */
    .teaser {
        top: 0;
        align-self: flex-start;
        height: auto;
        z-index: 10;
    }

    /* TEXTE CENTRAL : seul élément scrollable */
    .central {         
        padding-right: 2rem;
        padding-left: 2rem;
    }
}
/*------------------------------*/
/* events grid */
/*change line color events list*/
.em.em-list.em-grid .em-item .em-item-info, .em.em-list.size-small .em-item .em-item-info {
  border-top: 4px solid #01FF01 !important;
}

/* Titre des événements dans la grille */
/* Force la font + taille du titre dans Events Manager */
.em.em-list.em-grid .em-item .em-item-info h2.events-grid-title,
.em.em-list.em-grid .em-item .em-item-info h2.events-grid-title a {
    font-family: "Inter", sans-serif !important;
    font-size: 1rem !important; /* force la taille */
    line-height: 1.1 !important;
    color: #01FF01 !important;
    text-decoration: none !important;
	letter-spacing: 1px !important;
}

.em.em-list.em-grid > div.em-item .em-item-info .em-item-meta .em-item-meta-line {
  grid-template-columns: 250px 1fr !important;
  font-size: 1em !important;
	color: #111111 !important;
}.em.em-list.em-grid .em-item {
    border: 3px solid #01FF01;        /* Bordure verte corporate */
    padding: 0;
    overflow: hidden;                  /* Cache le débordement lors du hover */
    transition: border-color 0.3s ease;
}

/* --- CARTE --- */
.em.em-list.em-grid .em-item {
    border: 3px solid #01FF01 !important;
    overflow: hidden;
    position: relative;
}

/* --- WRAPPER IMAGE --- */
.em.em-list.em-grid .em-item .em-item-image {
    position: relative;
    overflow: hidden;
}

/* --- IMAGE NORMALE --- */
.em.em-list.em-grid .em-item .em-item-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* --- OVERLAY VERT AU SURVOL --- */
.em.em-list.em-grid .em-item .em-item-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #01FF01;     /* ton vert corporate */
    opacity: 0;              /* transparent au repos */
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* --- SURVOL : overlay vert semi-transparent --- */
.em.em-list.em-grid .em-item:hover .em-item-image::after {
    opacity: 0.45;          /* ← 45% de vert, image visible dessous */
}

/*--------------------------------*/
/* ------------------------------------------------ */
/* Single event */
/* ------------------------------------------------ */

.single-event-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;      /* colonne image / colonne texte */
  grid-template-rows: auto auto;          /* ligne 1 = header, ligne 2 = image+texte */
  grid-template-areas:
    "header header"
    "image  content";
  column-gap: 3rem;
  row-gap: 2.5rem;
  margin-top: 2rem;
}

/* header occupe la première ligne entière */
.single-event-layout > .em-item-header {
  grid-area: header;
}

.single-event-title {
  line-height: 1rem;
  color: #111111 !important;	
}

.em.pixelbones h1{
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  margin-top: 20px !important;
}

.single-event-layout .em-item-header .em-event-date {
  font-size: 1.75rem !important; 
  font-weight: 700;
  line-height: 1rem;
  color: #111111 !important;
  white-space: nowrap;
}

.em.em-item.em-item-single .em-item-meta > section section {
  margin-bottom: -30px;
}

/* image = colonne gauche, ligne 2 */
.single-event-layout > .em-item-image {
  grid-area: image;
}

.single-event-layout > .em-item-image img {
  width: 100%;
  height: auto;
  display: block;
}

.em.em-item.em-item-single .em-item-image img {
  border-left: 4px solid #01FF01 !important;
}

/* texte = colonne droite, ligne 2, centré verticalement par rapport à l’image */
.single-event-layout > .em-event-content {
  grid-area: content;
  align-self: center;
  font-size: 1rem;
  line-height: 1.6;
}

.single-event-layout > .em-event-content p {
  margin-bottom: 1.2rem;
}

.single-event-layout > .em-event-content h2 {
  font-size: 1.38rem !important;
  color: #01FF01 !important;
}

/* Responsive */
@media (max-width: 960px) {
  .single-event-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "image"
      "content";
    column-gap: 0;
  }

  .single-event-layout > .em-event-content {
    align-self: start;
  }
}


/* ------------------------------------------------ */
/* Deco - single post agenda */
/* ------------------------------------------------ */
/* Colonne de droite : pile de décos */
.agenda-deco {
  display: flex;
  flex-direction: column;
  align-items: flex-end;   /* colle tout au bord droit de la colonne */
  padding-top: 1.5rem;
}

/* Chaque groupe correspond à une "zone" de la maquette */
.agenda-deco__group {
  width: 190px;            /* largeur de la composition */
  margin-bottom: 2.5rem;
}

/* Formes de base */
.agenda-deco__square,
.agenda-deco__rect {
  box-sizing: border-box;
  border: 3px solid #000;
  background: transparent;
}

/* Vert plein */
.agenda-deco__square--filled,
.agenda-deco__rect--filled {
  background: #01FF01;
  border-color: #01FF01;
}

/* Tailles */
.agenda-deco__square--small {
  width: 24px;
  height: 24px;
}

.agenda-deco__square--medium {
  width: 72px;
  height: 72px;
}

.agenda-deco__square--large {
  width: 150px;
  height: 150px;
}

.agenda-deco__rect--tall {
  width: 42px;
  height: 150px;
}

/* --- Placement pour coller à la maquette --- */

/* Groupe haut : petit carré vert collé au carré contour */
.agenda-deco__group--top .agenda-deco__square--small {
  margin-left: -124px;      /* un peu à gauche */
  margin-top: 30px;       /* plus bas */
}

.agenda-deco__group--top .agenda-deco__square--medium {
  margin-left: -100px;      /* à droite du petit vert */
  margin-top: -94px;      /* chevauche pour être quasi au-dessus */
}

/* Groupe milieu : grand carré vert + rectangle vertical qui "mange" le carré */
.agenda-deco__group--middle .agenda-deco__square--large {
  margin-left: 40px;      /* centré horizontalement dans le groupe */
  margin-top: 40px; 
}

.agenda-deco__group--middle .agenda-deco__rect--tall {
  margin-left: 147px;     /* collé sur le bord droit du grand carré */
  margin-top: -250px;     /* déborde au-dessus et en dessous */
}

/* Groupe bas : petit carré contour un peu centré */
.agenda-deco__group--bottom .agenda-deco__square--small {
  margin-left: 17px;
  margin-top: 58px;
}

/* Réglage responsive : on masque sur mobile (optionnel) */
@media (max-width: 960px) {
  .agenda-deco {
    display: none;
  }
}

/* ------------------------------------------------ */
/* Animation des décorations – apparition en cascade (version lente) */
/* ------------------------------------------------ */

.agenda-deco__square,
.agenda-deco__rect {
    opacity: 0;
    transform: translateX(50px) scale(0.9);
    animation: agendaDecoIn 1.35s cubic-bezier(0.22, 0.55, 0.15, 1) forwards;
}

/* Animation lente + easing doux */
@keyframes agendaDecoIn {
    0% {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }
    50% {
        opacity: 0.4;
        transform: translateX(20px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Cascade plus lente */
.agenda-deco__group--top    .agenda-deco__square,
.agenda-deco__group--top    .agenda-deco__rect {
    animation-delay: 0.25s;
}

.agenda-deco__group--middle .agenda-deco__square,
.agenda-deco__group--middle .agenda-deco__rect {
    animation-delay: 0.65s;
}

.agenda-deco__group--bottom .agenda-deco__square,
.agenda-deco__group--bottom .agenda-deco__rect {
    animation-delay: 1.05s;
}

/* Désactivation mobile */
@media (max-width: 960px) {
    .agenda-deco__square,
    .agenda-deco__rect {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}



/* --------- PROJETS : TABS ----------- */

.projets-tabs {
  margin-top: 3rem;
}

.projets-tabs__columns {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

/* Colonne titres (gauche) */
.projets-tabs__titles {
  flex: 0 0 25%;               /* colonne plus étroite */
}

/* Chaque titre de projet */
.projets-tabs__item {
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  line-height: 1.05;
  cursor: pointer;
  border-left: 3px solid transparent;
  color: #111;
  transition: color 0.2s ease, border-color 0.2s ease;
  margin: 0;
  text-transform: none !important;
}

.projets-tabs__item:hover {
  color: #01FF01;
}

/* Titre actif */
.projets-tabs__item.is-active {
  color: #01FF01;
}

/* Colonne contenus (droite) */
.projets-tabs__panels {
  flex: 1 1 auto;              /* colonne plus large */
}

/* Panneaux de contenu */
.projets-tabs__panel {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Panneau actif */
.projets-tabs__panel.is-active {
  display: block;
  opacity: 1;
}

/* Un peu de rythme dans le texte du panel */
.projets-tabs__panel p {
  margin-bottom: 0.8rem;
}

/* Responsive : sous ~800px, on empile */
@media (max-width: 800px) {
  .projets-tabs__columns {
    flex-direction: column;
    gap: 1.5rem;
  }

  .projets-tabs__titles {
    flex: 1 1 auto;
  }
}

/* -------------------------------------------------------- */
/* Animations pour les panels des projets                   */
/* -------------------------------------------------------- */

/* keyframes : fade + slide from bottom */
@keyframes projets-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* On applique l’animation quand un panel devient actif */
.projets-tabs__panel.is-active {
  display: block;
  opacity: 1;
  animation: projets-panel-in 0.35s ease-out;
}

/* -------------------------------------------------------- */
/* Animation visuelle des titres (onglets)                  */
/* -------------------------------------------------------- */

/* bande verticale animée à gauche */
.projets-tabs__item {
  position: relative;
  padding-left: 14px; /* pour faire de la place à la barre animée */
}

.projets-tabs__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: #01FF01;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease-out;
}

/* Si actif → la barre apparaît */
.projets-tabs__item.is-active::before {
  transform: scaleY(1);
}

/* Sur hover → on montre la couleur du texte, mais pas la barre */
.projets-tabs__item:hover {
  color: #01FF01;
}

/* Slider logos footer ---------------------------------------- */

.h2040-logos-slider {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  overflow: hidden;
}

.h2040-logos-slider__viewport {
  flex: 1 1 auto;
  overflow: hidden;
}

.h2040-logos-slider__track {
  display: flex;
  transition: transform 0.5s ease;
}

.h2040-logos-slider__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
}

/* Uniformisation des logos */
.h2040-logos-slider__slide img {
  max-height: 150px;     /* tous les logos auront la même hauteur max */
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Boutons navigation */
.h2040-logos-slider__nav {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0 0.5rem;
  color: white;
}

.h2040-logos-slider__nav:hover {
  color: #111111;
}

/* Sur mobile : on peut réduire la hauteur & taille des logos */
@media (max-width: 600px) {
  .h2040-logos-slider {
    padding: 1rem 0;
  }

  .h2040-logos-slider__slide img {
    max-height: 100px;
  }

  .h2040-logos-slider__nav {
    font-size: 1.3rem;
  }
}

