/**
* FORMATIONS
*/

/* Container principal (toutes les formations) */
.wp-forma-formations-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 40px 0;
}

/* Conteneur global de chaque formation */
.wp-forma-formation-item {
    display: grid;
    grid-template-columns: 300px 1fr; /* 300px pour l'image, le reste pour le contenu */
    gap: 20px;
    align-items: center;             /* centre verticalement les éléments */
    padding: 20px;
    border-bottom: solid 1px #d7d7d7;
}

/* Conteneur de l'image */
.wp-forma-formation-image {
    position: relative;
    width: 100%;         /* correspond à la taille de la colonne */
    height: 200px;       /* hauteur fixe pour forcer le ratio */
    overflow: hidden;    /* coupe l'image qui dépasse */
    border-radius: 8px;  /* coins arrondis */
}

/* Image */
.wp-forma-formation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* remplit la zone en recadrant si nécessaire */
    object-position: center;
    display: block;
}

/* Contenu */
.wp-forma-formation-content {
    border-radius: 8px;
    padding: 20px;
}

/* Titre formation */
.wp-forma-formation-title {
    margin-top: 0;
    font-size: 1.5em;
    color: #1E3040; /* couleur de texte */
}

/* Extrait */
.wp-forma-formation-excerpt {
    margin: 1em 0;
    font-size: 1em;
    line-height: 1.4;
    color: #1E3040;
}

/* Lien / bouton */
.wp-forma-formation-link {
    display: inline-block;
    padding: 10px 16px;
    background: var(--wp-forma-primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}
.wp-forma-formation-link:hover {
    background: var(--wp-forma-primary-color);
}

/* Adaptation responsive (image au-dessus, texte en dessous) */
@media screen and (max-width: 768px) {
    .wp-forma-formation-item {
        /* On repasse à une seule colonne */
        grid-template-columns: 1fr; 
    }
    
    /* L’image prend toute la largeur au-dessus du texte */
    .wp-forma-formation-image {
        width: 100%;
        height: 200px;  /* on peut conserver la même hauteur fixe */
    }
}

/**
* SESSIONS
*/

/* Liste de sessions (layout en flex) */
.wp-forma-sessions-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Carte session */
.wp-forma-session-card {
    border-radius: 15px;
    padding: 15px;
    color: #1E3040;
    background-color: white;
}

/* Zone date */
.wp-forma-session-card .session-date {
    background: white;
    padding: 8px;
    margin-bottom: 10px;
    position: relative;
    top: -190px;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
    border-radius: 6px;
}
.wp-forma-session-card .session-day {
    color: var(--wp-forma-primary-color);
    font-size: 1.5em;
    font-weight: bold;
}

/* Image */
.session-thumbnail {
    width: 100%;
    height: 200px; /* Hauteur fixe pour toutes les images */
    border-radius: 8px;
    overflow: hidden;     /* Pour masquer le dépassement */
    position: relative;   /* Optionnel, mais souvent pratique */
    margin-bottom: 20px;
}

.session-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* Remplit le conteneur en rognant */
    object-position: center; /* Centrage vertical/horizontal */
    display: block;
}

/* Titre */
.wp-forma-session-card .session-title {
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: bold;
}

/* Intervenants */
.wp-forma-session-card .session-intervenants {
    margin-bottom: 10px;
}

.wp-forma-session-card svg, .wp-forma-session-info svg{
    fill: var(--wp-forma-primary-color);
    width: 16px;
}

/* Extrait */
.wp-forma-session-card .session-excerpt {
    margin-bottom: 10px;
}

/* Bouton */
.wp-forma-session-card .session-button {
    display: inline-block;
    padding: 8px 12px;
    background: var(--wp-forma-primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}
.wp-forma-session-card .session-button:hover {
    background: var(--wp-forma-primary-color);
}

/* Recherche et filtres */

.search-container{
    display: flex;
    height: 50px;
    margin-bottom: 20px;
}
.search-container input{
    width: 80%;
    border-radius: 5px;
    padding: 10px!important;
}

.search-container button{
    display: inline-block;
    padding: 8px 12px;
    background: var(--wp-forma-primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    margin-left: 1%;
    width: 19%;
}

.search-filter{
    margin-bottom: 20px;
}

.search-filter button{
    background: var(--wp-forma-primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    padding: 4px 10px;
}



@media screen and (max-width: 950px) {
    /* Carte session */
    .wp-forma-sessions-list {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }
}

/**
* INTERVENANTS
*/

/* Grille principale */
.wp-forma-intervenants-grid {
    display: grid; /* ou flex, selon ta préférence */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Élément individuel */
.wp-forma-intervenant-item {
    padding: 20px;
    border-radius: 12px;
}

/* Image */
.wp-forma-intervenant-image {
    width: 100%;
    height: 200px; /* Hauteur fixe pour toutes les images */
    border-radius: 8px;
    overflow: hidden;     /* Pour masquer le dépassement */
    position: relative;   /* Optionnel, mais souvent pratique */
    margin-bottom: 20px;
}

.wp-forma-intervenant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* Remplit le conteneur en rognant */
    object-position: center; /* Centrage vertical/horizontal */
    display: block;
}

/* Titre (nom de l’intervenant) */
.wp-forma-intervenant-name {
    margin: 0 0 10px;
    font-size: 1.5em;
    font-weight: bold;
    color: #1E3040;
}

/* Extrait */
.wp-forma-intervenant-excerpt {
    font-size: 0.9em;
    line-height: 1.4;
    color: #1E3040;
    margin-bottom: 10px;
}

/* Lien "voir plus" */
.wp-forma-intervenant-link {
    color: var(--wp-forma-primary-color);
    text-decoration: none;
    font-weight: bold;
}
.wp-forma-intervenant-link:hover {
    text-decoration: underline;
}

/**
* ONGLETS FORMATION INFO
*/

/* Container principal des onglets */
.wp-forma-formation-info-tabs {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 30px 0;
}

/* Navigation des onglets */
.wp-forma-tabs-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

/* Item de navigation (onglet) */
.wp-forma-tab-item {
    flex: 1;
    min-width: 120px;
    padding: 18px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    color: #666;
}

.wp-forma-tab-item:hover {
    background: #ebebeb;
    color: #333;
}

.wp-forma-tab-item.active {
    background: #ffffff;
    color: var(--wp-forma-primary-color);
    border-bottom-color: var(--wp-forma-primary-color);
    font-weight: 600;
}

/* Icône de l'onglet */
.wp-forma-tab-item .tab-icon {
    display: inline-block;
}

.wp-forma-tab-item .tab-icon svg {
    width: 24px;
    height: 24px;
    fill: #666;
    transition: fill 0.3s ease;
}

.wp-forma-tab-item.active .tab-icon svg {
    fill: var(--wp-forma-primary-color);
}

.wp-forma-tab-item:hover .tab-icon svg {
    fill: #333;
}

/* Label de l'onglet */
.wp-forma-tab-item .tab-label {
    font-size: 14px;
    font-weight: 500;
}

/* Container du contenu */
.wp-forma-tabs-content {
    position: relative;
    min-height: 200px;
}

/* Panneau de contenu */
.wp-forma-tab-pane {
    display: none;
    padding: 0;
    animation: fadeIn 0.4s ease-in-out;
}

.wp-forma-tab-pane.active {
    display: block;
}

/* Contenu interne */
.tab-content-inner {
    padding: 30px;
}

.tab-content-inner h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--wp-forma-primary-color);
    font-size: 1.5em;
}

.tab-content-inner p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    margin: 10px 0;
}

/* Liste des intervenants */
.intervenants-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.intervenants-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.intervenants-list li:last-child {
    border-bottom: none;
}

.intervenants-list a {
    color: var(--wp-forma-primary-color);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    transition: color 0.3s ease;
}

.intervenants-list a:hover {
    color: #333;
    text-decoration: underline;
}

/* Prix en évidence */
.prix-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--wp-forma-primary-color);
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .wp-forma-tabs-nav {
        flex-direction: column;
    }

    .wp-forma-tab-item {
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 15px 20px;
    }

    .wp-forma-tab-item.active {
        border-left: 4px solid var(--wp-forma-primary-color);
        border-bottom-color: #e0e0e0;
    }

    .tab-content-inner {
        padding: 20px;
    }

    .tab-content-inner h3 {
        font-size: 1.3em;
    }

    .prix-value {
        font-size: 1.5em;
    }
}

/**
* ACCORDION PROGRAMME
*/

/* Container principal */
.wp-forma-accordion {
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Item de l'accordion */
.wp-forma-accordion-item {
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
}

.wp-forma-accordion-item:last-child {
    border-bottom: none;
}

/* Header (titre cliquable) */
.wp-forma-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background: #f8f8f8;
}

.wp-forma-accordion-header:hover {
    background: #eeeeee;
}

.wp-forma-accordion-item.active .wp-forma-accordion-header {
    background: var(--wp-forma-primary-color);
}

.wp-forma-accordion-item.active .wp-forma-accordion-header h3 {
    color: #ffffff;
}

.wp-forma-accordion-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
    transition: color 0.3s ease;
}

/* Icône +/- */
.accordion-icon {
    font-size: 1.5em;
    font-weight: bold;
    color: #666;
    min-width: 30px;
    text-align: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.wp-forma-accordion-item.active .accordion-icon {
    color: #ffffff;
}

/* Contenu (description) */
.wp-forma-accordion-content {
    display: none;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
}

.accordion-content-inner {
    padding: 25px;
    line-height: 1.6;
    color: #333;
}

.accordion-content-inner p {
    margin: 0 0 15px 0;
}

.accordion-content-inner p:last-child {
    margin-bottom: 0;
}

.accordion-content-inner ul,
.accordion-content-inner ol {
    margin: 10px 0;
    padding-left: 25px;
}

.accordion-content-inner li {
    margin-bottom: 8px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .wp-forma-accordion-header {
        padding: 15px 20px;
    }

    .wp-forma-accordion-header h3 {
        font-size: 1em;
    }

    .accordion-content-inner {
        padding: 20px;
    }

    .accordion-icon {
        font-size: 1.3em;
    }
}
