/* ==========================================================================
   PAGE ÉVÉNEMENT
   ========================================================================== */

.pageEvent .header__page h1.deco {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    padding: 1.25rem 3rem;
}


/* ==========================================================================
   DATE JAUNE SOUS LE TITRE
   ========================================================================== */

.pageEvent .header__page .event__date {
    position: relative;
    z-index: 2;
    display: block;
    width: fit-content;
    max-width: calc(100% - 4rem);
    margin: -.75rem 0 0 2rem;
    padding: .5rem 1.25rem;
    border-radius: 20px;
    background-color: var(--color-yellow);
    color: var(--color-blue-uco-dark);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25;
}


/* Ancien rendu Drupal : conservé pour compatibilité éventuelle */
.pageEvent .header__page .event__date time {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}


/* ==========================================================================
   INFORMATIONS PRATIQUES DU HEADER
   ========================================================================== */

.header__page p.titre__info {
    margin: 0;
    color: var(--color-blue-uco-dark);
    font-size: 1.25rem;
    font-weight: 700;
}

.pageEvent .event__header-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: clamp(1.5rem, 4vw, 4rem);
}

.pageEvent .event__header-main {
    flex: 1 1 auto;
    min-width: 0;
}

.pageEvent .bar__info {
    flex: 0 0 300px;
    width: 300px;
    max-width: 300px;
    margin: 0;
    padding: 1.25rem;
    border-radius: 10px;
}

.pageEvent .date__info,
.pageEvent .place__info {
    color: var(--color-blue-uco);
    font-size: .875rem;
    line-height: 1.35;
}

.pageEvent .date__info svg,
.pageEvent .place__info svg {
    flex: 0 0 20px;
}

.pageEvent .date__info strong,
.pageEvent .place__info strong {
    color: var(--color-blue-uco-dark);
}

.header__page .place__info p {
    margin: 0;
    color: var(--color-blue-uco);
    font-size: .875rem;
}

.pageEvent .header__page .campus a:hover,
.pageEvent .header__page .campus a:focus-visible {
    color: var(--color-blue-uco-dark);
}


/* ==========================================================================
   CONTENU PRINCIPAL
   ========================================================================== */

.main__content .event__content h3 {
    width: fit-content;
    margin: 1rem 0;
    padding: .5rem 1.25rem;
    border-radius: 20px;
    background: var(--color-yellow);
    color: var(--color-blue-uco-dark);
}

.main__content .section__contact h3 {
    margin: 0 0 1rem;
    padding: 0;
    border-radius: 0;
    background: none;
}


/* ==========================================================================
   FORMULAIRES
   ========================================================================== */

.webform-submission-question-evenement-form h2 {
    padding: .65rem 3rem;
    line-height: 1;
}

.webform-submission-question-evenement-form p {
    position: relative;
    width: fit-content;
    margin: -.75rem 0 1.5rem 2rem;
    padding: .5rem 1.25rem;
    border-radius: 20px;
    background: var(--color-blue-uco);
    color: var(--color-white);
    font-size: 1.25rem;
    line-height: 1;
}

form .form-actions {
    text-align: center;
}

form .form-actions .btn {
    width: auto;
}

.js-form-item-prenom,
.js-form-item-nom {
    display: inline-block;
    width: 48.5%;
    vertical-align: middle;
}

.js-form-item-nom {
    margin-left: 1.5rem;
}


/* ==========================================================================
   AGENDA ASSOCIÉ
   ========================================================================== */

.main__content ul.event-grid li::before {
    display: none;
}

.pageEvent .event-grid {
    margin: 0;
}

.pageEvent .view__content h2 {
    background-color: var(--color-white);
    color: var(--color-blue-uco);
}


/* ==========================================================================
   ÉVÉNEMENT RECHERCHE : ONGLETS / CONTENU
   ========================================================================== */


.recherche_event-content .tab-content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

.recherche_event-nav .recherche_tabs__nav {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: .5rem;
    margin: 0 0 -4px;
    padding-top: 1rem;
    border: 0;
    border-bottom: 5px solid transparent;
    background: transparent;
    line-height: 1;
}

.recherche_event-nav .recherche_tabs__nav .nav-link {
    padding: 1rem 1.25rem;
    border: 0;
    border-bottom: 5px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--color-white);
    font-family: var(--font-family-base);
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
}

.recherche_event-nav .recherche_tabs__nav .nav-link:hover,
.recherche_event-nav .recherche_tabs__nav .nav-link:focus,
.recherche_event-nav .recherche_tabs__nav .nav-link:focus-visible,
.recherche_event-nav .recherche_tabs__nav .nav-link.active {
    border: 0;
    border-bottom: 5px solid var(--color-green);
    background: transparent;
    color: var(--color-green);
    text-decoration: none;
}

.recherche_event-nav .recherche_tabs__nav .nav-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}


/* ==========================================================================
   SIDEBAR ÉVÉNEMENT RECHERCHE
   ========================================================================== */

.recherche_sidebar {
    flex: 0 0 340px;
    width: 340px;
    padding: 2rem 0;
}

.recherche_sidebar aside {
    width: 100%;
    padding: 1.5rem;
    border-radius: 10px;
    color: var(--color-blue-uco-dark);
}


/* Chaque rubrique */

.recherche_sidebar .sidebar__section {
    margin: 0;
}

.recherche_sidebar .sidebar__section+.sidebar__section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-beige-40);
}


/* Titres */

.recherche_sidebar .sidebar__section h2 {
    margin: 0 0 .75rem;
    padding: 0;
    background: transparent;
    color: var(--color-blue-uco);
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.25;
}


/* Texte simple */

.recherche_sidebar .sidebar__text {
    margin: 0;
    color: var(--color-blue-uco-dark);
    font-size: 1rem;
    line-height: 1.4;
}


/* ==========================================================================
   LISTES SIDEBAR
   ========================================================================== */

.recherche_sidebar .sidebar__list {
    margin: 0;
    padding: 0 0 0 1.15rem;
    list-style: disc;
}

.recherche_sidebar .sidebar__list li {
    margin: 0 0 .4rem;
    padding: 0 0 0 .15rem;
    color: var(--color-blue-uco-dark);
    font-size: 1rem;
    line-height: 1.4;
}

.recherche_sidebar .sidebar__list li:last-child {
    margin-bottom: 0;
}

.recherche_sidebar .sidebar__list li::marker {
    color: var(--color-blue-uco);
}

.recherche_sidebar .sidebar__list a {
    display: inline-flex;
    align-items: baseline;
    gap: .4rem;
    color: var(--color-blue-uco);
    text-decoration: none;
    text-underline-offset: .15em;
}

.recherche_sidebar .sidebar__list a>span[aria-hidden="true"] {
    flex: 0 0 auto;
    transition: transform .2s ease;
}

.recherche_sidebar .sidebar__list a:hover>span[aria-hidden="true"],
.recherche_sidebar .sidebar__list a:focus-visible>span[aria-hidden="true"] {
    transform: translateX(.2rem);
}

.recherche_sidebar .sidebar__list a:hover {
    text-decoration: underline;
}

.recherche_sidebar .sidebar__list a:focus-visible {
    border-radius: 2px;
    outline: 2px solid currentColor;
    outline-offset: 3px;
    text-decoration: underline;
}


/* ==========================================================================
   GROUPES DE COMITÉ
   ========================================================================== */

.recherche_sidebar .sidebar__section--comites {
    margin-top: 0;
}

/*
 * Le contenu du paragraphe "Groupe de comité" peut générer ses propres
 * titres/listes. On harmonise sans imposer une structure HTML précise.
 */

.recherche_sidebar .sidebar__section--comites h2,
.recherche_sidebar .sidebar__section--comites h3 {
    margin: 0 0 .75rem;
    padding: 0;
    background: transparent;
    color: var(--color-blue-uco);
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.25;
}

.recherche_sidebar .sidebar__section--comites ul {
    margin: 0 0 1rem;
    padding-left: 1.15rem;
}

.recherche_sidebar .sidebar__section--comites li {
    margin-bottom: .4rem;
    line-height: 1.4;
}

.recherche_sidebar .sidebar__section--comites a {
    color: var(--color-blue-uco);
    text-decoration: none;
}

.recherche_sidebar .sidebar__section--comites a:hover,
.recherche_sidebar .sidebar__section--comites a:focus-visible {
    text-decoration: underline;
}


/* ==========================================================================
   FICHIERS
   ========================================================================== */

.recherche_sidebar .sidebar__files {
    color: var(--color-blue-uco-dark);
    font-size: 1rem;
    line-height: 1.4;
}

.recherche_sidebar .sidebar__files .field__items {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.recherche_sidebar .sidebar__files .field__item {
    margin: 0;
}

.recherche_sidebar .sidebar__files a {
    color: var(--color-blue-uco);
    text-decoration: none;
    text-underline-offset: .15em;
}

.recherche_sidebar .sidebar__files a:hover,
.recherche_sidebar .sidebar__files a:focus-visible {
    text-decoration: underline;
}


/* ==========================================================================
   PARTENAIRES
   ========================================================================== */

.recherche_sidebar .sidebar__partners {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.recherche_sidebar .sidebar__partners>li::before {
    display: none;
}

.recherche_sidebar .sidebar__partner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin: 0;
    padding: .5rem;
}

.recherche_sidebar .sidebar__partner-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 4px;
    text-decoration: none;
}

.recherche_sidebar .sidebar__partner-link:focus-visible {
    outline: 2px solid var(--color-blue-uco);
    outline-offset: 4px;
}

.recherche_sidebar .sidebar__partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.recherche_sidebar .sidebar__partner-logo .field,
.recherche_sidebar .sidebar__partner-logo .field__item {
    margin: 0;
}

.recherche_sidebar .sidebar__partner-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70px;
    object-fit: contain;
}

.recherche_sidebar .sidebar__partner-link img {
    transition: opacity .2s ease;
}

.recherche_sidebar .sidebar__partner-link:hover img {
    opacity: .75;
}

.recherche_sidebar .sidebar__partner-name {
    color: var(--color-blue-uco);
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

.event__partenaire {
    display: flex;
    width: 15%;
    height: 100%;
    border-radius: 10px;
    justify-content: center;
}

/* ==========================================================================
   IMAGE + TEXTE : SPÉCIFIQUE AUX PAGES ÉVÉNEMENT
   ========================================================================== */

.event__presentation-media-title {
    padding-bottom: 0 !important;
}

.event__presentation-title {
    margin: 0;
    color: var(--color-blue-uco-dark);
    font-size: 1.125rem;
    line-height: 1.4;
}

.event__presentation-title strong {
    font-weight: 700;
}

@media (min-width: 768px) {
    .pageEvent .image__texte .image-left,
    .pageEvent .image__texte .image-right {
        display: flex !important;
    }

    .pageEvent .image__texte .item__image {
        float: none;
        flex: 0 0 41.666667%;
        width: 41.666667% !important;
        max-width: 41.666667%;
        margin: 0;
    }

    .pageEvent .image__texte .contexte {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        height: stretch;
    }

    .pageEvent .image__texte .item__image img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .pageEvent .image__texte .image-left::after,
    .pageEvent .image__texte .image-right::after {
        content: none;
    }
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Contenu + sidebar : même logique que les fiches CV */
@media (max-width: 991.98px) {

    .recherche_event-content>.container {
        flex-direction: column !important;
    }

    .recherche_event-content .tab-content {
        width: 100%;
        max-width: none;
    }

    .recherche_sidebar {
        position: static;
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        margin-top: 2rem;
        margin-bottom: 2rem;
        padding: 0;
    }

    .recherche_sidebar aside {
        width: 100%;
        max-width: none;
    }

    .js-form-item-prenom,
    .js-form-item-nom {
        width: 100%;
    }

    .js-form-item-nom {
        margin: 0;
    }
}

/* ==========================================================================
   HEADER ÉVÉNEMENT RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {

    .pageEvent .event__header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .pageEvent .event__header-main {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }

    .pageEvent .bar__info {
        flex: 0 0 auto;
        width: 100%;
        max-width: 420px;
        margin: 0;
    }
}
@media (max-width: 767.98px) {

    /* Navigation interne : retour à la ligne des onglets entiers. */
    .recherche_event-nav .container {
        padding-left: .5rem;
        padding-right: .5rem;
    }

    .recherche_event-nav .recherche_tabs__nav {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 0;
        justify-content: flex-start;
    }

    .recherche_event-nav .recherche_tabs__nav .nav-item {
        flex: 0 0 auto;
        max-width: 100%;
        min-width: 0;
    }

    .recherche_event-nav .recherche_tabs__nav .nav-link {
        width: auto;
        max-width: 100%;
        min-height: 2.75rem;
        padding: .75rem clamp(.5rem, 2.5vw, 1rem);
        font-size: .875rem;
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
        text-align: center;
    }

}


@media (max-width: 600px) {

    .pageEvent .header__page h1.deco {
        padding: 1rem 1.5rem;
    }

    .pageEvent .header__page .event__date {
        max-width: calc(100% - 2rem);
        margin: -.5rem 0 0 1rem;
        padding: .4rem 1rem;
    }

    .recherche_sidebar .sidebar__partners {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 500px) {

    .pageEvent .header__page .p-80 {
        padding-right: 0;
        padding-left: 0;
    }

    .recherche_sidebar aside {
        padding: 1.25rem;
    }
}


@media (prefers-reduced-motion: reduce) {

    .recherche_sidebar .sidebar__list a>span[aria-hidden="true"] {
        transition: none;
    }

    .recherche_sidebar .sidebar__list a:hover>span[aria-hidden="true"],
    .recherche_sidebar .sidebar__list a:focus-visible>span[aria-hidden="true"] {
        transform: none;
    }
}

/* V10 - Fiche evenement mobile */
@media (max-width: 47.99rem) {
  .pageEvent .header__page h1.deco {
    padding: .75rem 1.15rem;
    border-radius: 2rem 2rem 2rem 0;
  }
  .pageEvent .header__page .event__date {
    max-width: calc(100% - 2rem);
    margin: -.45rem 0 0 .75rem;
    padding: .4rem .85rem;
    font-size: .8rem;
  }
  .pageEvent .event__header-row {
    flex-direction: column;
    gap: 1rem;
  }
  .pageEvent .bar__info {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }
  .webform-submission-question-evenement-form h2 {
    padding: .6rem 1.25rem;
  }
  .webform-submission-question-evenement-form p {
    max-width: calc(100% - 1rem);
    margin: -.4rem 0 1rem .75rem;
    padding: .4rem .85rem;
    font-size: 1rem;
  }
  .js-form-item-prenom,
  .js-form-item-nom {
    display: block;
    width: 100%;
  }
  .js-form-item-nom { margin-left: 0; }
}


/* V10b - le conteneur p-80 du header doit suivre la largeur mobile. */
@media (max-width: 47.99rem) {
    .pageEvent .header__page .raduis-300.dark.p-80 {
        padding: 1.25rem var(--gutter) 2.5rem !important;
        border-radius: 0 0 clamp(5rem, 24vw, 7rem) 0;
    }
    .pageEvent .header__page .raduis-300.dark.p-80 > .container-xxl {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 767.98px) {
  .pageEvent .bar__info .event__lieu-aligne {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
  }

  .pageEvent .bar__info .event__lieu-aligne > svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
  }

  .pageEvent .bar__info .event__lieu-aligne > div {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
  }
}

/* Éviter la superposition des titres et des images */
.pageEvent .image__texte {
    display: flow-root;
    clear: both;
}

.pageEvent .image__texte .image-texte__title {
    clear: both;
    position: relative;
    margin-bottom: 1.5rem !important;
}

/* Séparer correctement le titre de l'image */
.pageEvent .image__texte .image-texte__content {
    clear: both;
}

/* Présentation : l'illustration suit le titre dans le flux éditorial. */
.pageEvent #presentation-pane .event__presentation-layout {
  width: 100%;
  min-width: 0;
}
.pageEvent #presentation-pane .event__presentation-layout .field__item {
  display: flow-root;
  min-width: 0;
}
.pageEvent #presentation-pane .event__presentation-image {
  width: 100%;
  margin: 0 0 1rem;
}
.pageEvent #presentation-pane .event__presentation-image img {
  display: block;
  width: 100%;
  height: auto;
}
@media (min-width: 768px) {
  .pageEvent #presentation-pane .event__presentation-image {
    float: right;
    width: min(41.666667%, 22rem);
    margin: 1rem 0 1rem 2rem;
  }
}
.pageEvent .recherche_sidebar .sidebar__section + .sidebar__section {
  margin-top: .75rem;
  padding-top: .75rem;
}

/* Alignement Date / Horaire - mobile et tablette */
@media (max-width: 767.98px) {

  .pageEvent .bar__info > .date__info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .pageEvent .bar__info > .date__info > svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
  }

  .pageEvent .bar__info > .date__info > div {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
  }

}


/* ==========================================
   EVENEMENT RECHERCHE
   ALIGNEMENT PRESENTATION / INSCRIPTION
========================================== */

/* Même retrait que le contenu de l'onglet Inscription */
.pageEvent .recherche_event-content
#presentation-pane > .event__presentation-layout {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  padding-inline: 12px !important;
  box-sizing: border-box !important;
}

/* Supprimer les marges supplémentaires des paragraphes */
.pageEvent .recherche_event-content
#presentation-pane .event__presentation-body
.composition__elements.image__texte .container-xxl,

.pageEvent .recherche_event-content
#presentation-pane .event__presentation-body
.section__texte > .container-xxl {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
  box-sizing: border-box !important;
}

/* Le texte commence au bord du conteneur */
.pageEvent .recherche_event-content
#presentation-pane .image__texte .contexte {
  margin-left: 0 !important;
  padding-left: 0 !important;
  min-width: 0 !important;
}
