/*
Theme Name: Blocksy Child
Template: blocksy
Author: Nrthnlgtk
Version: 1.0
*/

/* ==========================================================
   MODULE RESSOURCES
   Layout vertical : titre → description + séparateur → accordéon
   ========================================================== */

/* ------------------------- */
/* LAYOUT GLOBAL            */
/* ------------------------- */
.ressources-page {
    max-width: 1290px;
    margin: 0 auto;
    padding: 0px 20px;
    padding-bottom: 20px;
}

/* Supprimer la marge latérale du thème Blocksy sur la page Ressources */
.page-template-page-ressources .content-area,
.page-template-page-ressources .entry-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ------------------------- */
/* TITRE PRINCIPAL           */
/* ------------------------- */

.ressources-title {
    margin-top: 50px; /* éviter que le titre passe sous le header */
    display: flex;
    align-items: flex-end;
}

.ressources-title h1 {
    font-size: 3em;
    font-weight: 900;
    margin: 0;
    margin-right: 20px; /* espace entre le titre et le trait */
    text-align: left;
    white-space: nowrap;
    line-height: 1; /* meilleur alignement */
}

/* ------------------------- */
/* DESCRIPTION               */
/* ------------------------- */

.ressources-description {
    margin-top: 40px; /* espace sous le titre */
}

.ressources-description p {
    font-size: 1.1em;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 20px;
}

/* ------------------------- */
/* SÉPARATEUR                */
/* ------------------------- */

.ressources-separator {
    flex: 1;
    height: 1px;
    background-color: #000;
    border: none;
    margin: 0;
    align-self: flex-end;
    margin-bottom: 6px; /* ajustement optique avec le texte */
}

/* ------------------------- */
/* ACCORDÉON                */
/* ------------------------- */
.ressources-content {
    width: 100%;
}

.accordion-button {
    width: 100%;
    text-align: left;
    background-color: #ffffff;
    border: none;
    border-bottom: 1px solid black;
    padding: 20px;
    font-size: 2em;
    cursor: pointer;
    margin: 0;
    outline: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
}

.accordion-button:hover {
    background-color: #4DA674;
    color: white;
}

.accordion-button[aria-expanded="true"] {
    background-color: #ffffff;
    color: black;
}

.accordion-button[aria-expanded="true"]:hover {
    background-color: #ffffff;
    color: black;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, padding 0.4s ease-in-out;
    padding: 0 15px;
    width: 100%;
    margin: 0;
    opacity: 0;
}

.accordion-content.open {
    max-height: 500px;
    padding: 10px 15px 15px 15px;
    margin: 0;
    opacity: 1;
}

.accordion-content p,
.accordion-content ul,
.accordion-content ol {
    margin-bottom: 0;
}

/* ------------------------- */
/* IMAGE FLOTTANTE AU SURVOL */
/* ------------------------- */
#hover-image {
    position: absolute;
    pointer-events: none;
    z-index: 9999;
    max-width: 200px;
    transition: opacity 0.3s ease;
    transform: rotate(5deg);
}

#hover-image img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* ------------------------- */
/* RESPONSIVE DESIGN         */
/* ------------------------- */
@media (max-width: 1024px) {
    .ressources-page {
        padding: 30px 15px;
    }

    .ressources-title h2 {
        font-size: 2.5em;
    }

    .accordion-button {
        font-size: 1.5em;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .ressources-title {
        flex-direction: column;    
        align-items: flex-start;   
        margin-top: 20px;          /* réduit la marge sur mobile */
    }

    .ressources-title h1 {
        font-size: 2.2em;
        margin-right: 0;
        margin-bottom: 10px;
        white-space: normal;       
        word-break: break-word;    
        line-height: 1.1;
    }

    .ressources-separator {
        flex: none;                
        width: 100%;               
        height: 1px;               /* reste fin, comme sur desktop */
        margin-bottom: 10px;
    }

    .ressources-description p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .ressources-title h2 {
        font-size: 2em;
    }

    .accordion-button {
        font-size: 1.2em;
        padding: 12px;
    }
}

/* ------------------------- */
/* Images mises en avant (Blocksy) */
/* ------------------------- */
.wp-block-post-featured-image,
.ct-image-container,
article .entry-thumbnail {
    border-radius: 50px !important;
    overflow: hidden;
}

.wp-block-post-featured-image img,
.ct-image-container img,
article .entry-thumbnail img {
    border-radius: 0 !important;
    display: block;
}

/* IMAGES EVENTS calendar */

/* Conteneur image de l'événement */
.tribe-events-calendar-list__event-featured-image {
    border-radius: 5px;             /* coins arrondis */
    overflow: hidden;               /* masque le débordement */
    transition: transform 0.3s ease, filter 0.3s ease;
    transform: rotate(2deg);        /* rotation de base */
}

/* Effet au survol */
.tribe-events-calendar-list__event-featured-image:hover {
    transform: scale(1.05) rotate(0deg); /* zoom + rotation ajustée */
    filter: grayscale(100%);             /* noir et blanc */
}

/* EVENT CALENDAR RESPONSIVE */
/* Conteneur principal calendrier */
.tribe-events-calendar,
.tribe-events-list {
    max-width: 100%;
    overflow-x: auto; /* permet le scroll horizontal si besoin */
}

/* Images des événements */
.tribe-events-calendar-list__event-featured-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* Ajustement des titres et textes */
.tribe-events-calendar-list__event-title,
.tribe-events-calendar-list__event-description {
    font-size: 1em;
    line-height: 1.4;
}

/* Media query pour tablettes et mobiles */
@media (max-width: 768px) {
    .tribe-events-calendar-list__event {
        flex-direction: column; /* empile les événements verticalement */
    }

    .tribe-events-calendar-list__event-featured-image {
        max-width: 100%;
        margin-bottom: 10px;
    }
}

/* bouton articles */

a.entry-button {
  border-radius: 30px !important;
  overflow: hidden;
}

/* page d'accueil -> articles */

/* Image normale */
.attachment-large.size-large.wp-post-image {
    transition: transform 0.3s ease, filter 0.3s ease; /* animation fluide */
}

/* Hover : zoom + noir et blanc + légère rotation */
.attachment-large.size-large.wp-post-image:hover {
    transform: scale(1.05) rotate(2deg); /* zoom et rotation au survol */
    filter: grayscale(100%); /* noir et blanc */
}

