:root{
    --diapo-height: 100vh;
    /*--diapo-height: 88vh;*/
}

body {
    margin: 0;
    font-family: verdana, Calibri, Arial, sans-serif;
    overflow-x: hidden;
    max-width: 100vw;
    background-color: #2A2A2F;
}

h1{
    font-family: vardana, 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    /*font-family: Calibri, sans-serif;*/
}

main {
    position: relative;
}

/* ─── NAVIGATION ─────────────────────────────────────── */
nav {
    z-index: 10;
    position: fixed;
    top: 0;
    list-style-type: none;
    display: flex;
    justify-content: right;
    width: calc(100% - 30px);
    padding: 10px 15px;
    align-items: flex-start;
    gap: 20px;
}

#logo {
    border-color: transparent;
    padding: 0;
    margin-right: auto;
}

#logo img {
    max-height: 80px;
    filter: drop-shadow(1px 1px 5px #333);
}

.menu-item {
    color: white;
    text-decoration: none;
    text-transform: lowercase;
    font-size: 1.05em;
    padding: 5px 0 9px 0;
    border-bottom: thin solid transparent;
    transition: .5s ease;
    text-shadow: 1px 1px 5px #333;
}

.dropdown-wrapper {
    position: relative;
}

.dropdown-content {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    margin: 10px 20px;
    padding: 15px;
    background: linear-gradient(-40deg, #1e1e3bee, #013464ee);
    z-index: 4;
    transition: .4s;
    border-radius: 25px;
    opacity: 0;
    width: 200px;
}

.dropdown-content a {
    color: rgb(250, 250, 250);
    margin: 0;
    padding: 10px;
    display: block;
}

.dropdown-content .menu-item {
    opacity: .8;
    text-transform: none;
}

.dropdown-content .menu-item:hover {
    opacity: 1;
    border-color: transparent;
    color: #ffffff;
}

#espace-etudiant-dd-content {
    left: 0px;
    transform: translateX(-50%);
}

.menu-item.nav-item {
    padding-top: 0;
}
.nav-item{
    text-align: center;
}
.dropdown-content .menu-item{
    text-align: left;
}

/* ─── MENU MOBILE ─────────────────────────────────────── */
#menu-mobile {
    display: none;
}

#menu-mobile-open {
    position: fixed;
    z-index: 10;
    background: linear-gradient(-40deg, #1e1e3bef, #013464ef);
    width: 70%;
    max-width: 250px;
    height: 100%;
    top: 0;
    right: 0;
    transition: .7s;
    transform: translateX(100%);
    display: block;
    overflow: scroll;
}

#menu-mobile-open h4 {
    text-align: right;
    margin-right: .5em;
    font-weight: normal;
    font-size: 1.2em;
}

#menu-mobile-open a {
    color: white;
    text-decoration: none;
    text-transform: lowercase;
}

#fermer-menu {
    color: white;
    cursor: pointer;
}

.mobile-dropdown p {
    color: white;
    text-align: right;
    text-transform: lowercase;
}

.mobile-dropdown {
    margin-right: 1.5em;
    display: none;
}

/* ─── DIAPORAMA ───────────────────────────────────────── */
.diapo-bg {
    background-color: black;
    width: 100vw;
    height: var(--diapo-height);
    overflow: hidden;
    display: flex;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    will-change: transform, opacity;
}

#logo-centre {
    position: absolute;
    z-index: 3;
    max-width: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -200%);
    opacity: 0;
    transition: 2s;
    filter: drop-shadow(1px 1px 5px #333);
}

.diapo-bg .slide {
    min-height: 100vh;
    min-width: 100vw;
    animation-duration: 5s;
    animation-timing-function: linear;
    position: absolute;
    transition: 2s ease;
    opacity: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.sombre {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 1;
    opacity: .2;
}

@keyframes zoom {
    from { transform: scale(1.2); }
    to   { transform: scale(1.1) translateX(-4.4%) translateY(3%); }
}

@keyframes zoom2 {
    from { transform: scale(1.2); }
    to   { transform: scale(1.1) translateX(4.4%) translateY(3%); }
}

/* ─── CONTENU PRINCIPAL ───────────────────────────────── */

.content-section {
    position: relative;
    margin-top: var(--diapo-height);
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    opacity: 1;
    transition: 2s;
    background: linear-gradient(-40deg, #1e1e3b, #013464, #131b28);
}

.gauche {
    background-color: inherit;
    min-height: 100vh;
    width: 66%;
    color: white;
}

.droite {
    background-color: inherit;
    min-height: 100vh;
    width: 34%;
    color: white;
}

.droite h2{
    margin-top: 50px;
}

h1, h2 {
    font-weight: normal;
    color: white;
}

/* ─── ACTUALITÉS ──────────────────────────────────────── */
.actus,
.activites,
.publications {
    padding: 15px 35px;
}

.actus-cont,
.pub-cont {
    margin-top: 35px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 15px;
}
.actUdeM{
    min-width: 200px;
    max-width: calc(50% - 30px - 50px);
}

/* PAGE NOUVELLES */
.content .actus-cont .actUdeM{
    min-width: 220px;
    max-width: 50%;
    flex: 0 0 calc((100% - (4 * 15px)) / 5); 
}

.content .actus-cont{
    justify-content: center;
}


/* ------------ */

.actus-cont .actUdeM {
    position: relative;
    color: rgb(29, 29, 27);
    padding: 25px 25px 50px 25px;
    border-radius: 25px;
    background-color: #c6cddd;
}

.actus-cont .actUdeM a {
    text-decoration: none;
    color: #013464;
}

.actus-cont .actUdeM .titre,
.pub .titre {
    font-size: large;
    margin-bottom: 2em;
}

.actus-cont .actUdeM .titreForm {
    text-transform: none;
    position: absolute;
    bottom: 20px;
    right: 20px;
    transition: .3s ease;
}

.actus-cont .actUdeM .titreForm:hover {
    transform: translateX(5px);
}

/* ─── PUBLICATIONS ────────────────────────────────────── */
.pub-cont {
    justify-content: flex-start;
}

.pub {
    position: relative;
    min-width: 200px;
    max-width: 600px;
    background-color: transparent;
    padding: 15px;
    flex: 2;
}

.pub-img-zone {
    height: 350px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.pub-img-zone img {
    max-height: 350px;
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 3px;
}

.pub-img-zone {
    position: relative;
    overflow: hidden;
}

.pub-extrait-overlay {
    position: absolute;
    inset: 0;
    background: rgba(142, 75, 156, 0.92);
    color: white;
    font-size: 13px;
    line-height: 1.6;
    padding: 16px;
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 2;
    overflow: scroll;
    scrollbar-width: thin;
    scrollbar-color: transparent #f1f1f1;
}

.pub-extrait-overlay .pub-more{
    color: white;
    float: right;
    transition: .3s ease;
     border-bottom: thin solid transparent;
}

.pub-extrait-overlay .pub-more:hover{
    border-bottom: thin solid #f1f1f1aa;
}

.pub:hover .pub-extrait-overlay {
    opacity: 1;
}

.pub:hover .pub-img-zone img {
    opacity: 0.15;
    transition: opacity .3s ease;
}

.pub-titre {
    font-family: verdana, Calibri, Arial, sans-serif;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.5;
    color: #2a3a4a;
    text-decoration: none;
    display: block;
    border-top: 2px solid #8e4b9c;
    padding-top: 8px;
    margin: 0;
}

.pub a.pub-titre{
    color: #2a3a4a;
}

.pub a.pub-titre:hover {
    color: #8e4b9c;
}

.content.content--full .pub{
    flex: 0 0 calc((100% - (4 * 15px)) / 6); 
}

.navArticleRe p a,
.navArticleAn p a {
    color: #2a3a4a;
    font-size: 14px;
}

.navArticleRe p a:hover,
.navArticleAn p a:hover {
    color: #8e4b9c;
}

.pub a {
    text-decoration: none;
    color: #dff4fb;
}

.pub img {
    width: 100%;
    height: auto;
}

.single-publication {
    display: flex;
    gap: 35px;
    align-items: flex-start;
}

.single-publication-thumbnail {
    flex: 0 0 auto;
    max-width: 220px;
    order: 1;
}

.single-publication-thumbnail img {
    width: 100%;
    height: auto;
}

.single-publication-content {
    flex: 1;
    order: 1;
    min-width: 0;
}

/* Publications sur la page d'accueil (fond sombre) */
.content-section .pub-titre {
    color: #dff4fb;
    border-top-color: #dff4fb;
}


.content-section .pub:hover .pub-titre {
    color: white;
}

.content-section .pub-extrait-overlay {
    background: rgba(30, 30, 59, 0.93);
}

.content-section .pub a.pub-titre{
    color: white;
}

.content-section .pub a.pub-titre:hover {
    color: #dff4fb;
}

/* ─── LIENS "VOIR TOUT" ───────────────────────────────── */
.toutes {
    text-align: right;
    font-size: large;
    transition: .4s ease;
}

.toutes:hover {
    transform: translateX(8px);
}

.toutes a,
.activites p a {
    text-decoration: none;
    color: #dff4fb;
}

.activites p {
    font-size: large;
}

.activites iframe {
    max-width: 100%;
    border-radius: 15px;
}

/* ─── CENTRE DE DOCUMENTATION ACCUEIL ──────────────────── */

.vignette-centre-docu{
    width: calc(100% - 45px); 
    background-position: center;
    background-size: cover;
    border-radius: 25px;
    text-align: center;
    padding: 25px;
}
.vignette-centre-docu p a{
    color: #bbbbff;;
    text-decoration: none;
    transition: .5s ease;
}
.vignette-centre-docu a:hover{
    color: #8888ff;
}
.vignette-centre-docu h3{
    font-weight: 200;
}
.vignette-centre-docu p{
    font-size: 1em;
    color: #dff4fb;
    background-color: rgba(0,0,0,.4);
}

/* ─── FOOTER ──────────────────────────────────────────── */

footer {
    position: relative;
    z-index: 2;
    background-color: white;
    width: calc(100% - 48px);
    padding: 34px 24px 48px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-evenly;
    align-items: center;
}

/* ─── PAGES INTÉRIEURES ───────────────────────────────── */
.wp-block-cover{
    display: none;
}

.entete {
    width: 100%;
    height: 45vh;
    background-color: #00578f;
    display: flex;
    align-items: center;
    margin-top: 0;
    justify-content: space-between;
}

.titre-page {
    font-size: 52px;
    font-weight: normal;
    color: white;
    max-width: 100%;
    margin: 35px auto 0px auto;
    padding: 0 0 0 35px;
    width: 100%;
}

.liens-reseaux {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding: 18px;
    z-index: 3;
}

.liens-reseaux img {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity .2s ease;
}

.liens-reseaux a:hover img {
    opacity: 1;
}

.liens-reseaux .lien-texte {
    color: white;
    font-size: 0.85em;
    opacity: 0.85;
    text-decoration: none;
    transition: opacity .2s ease;
    text-transform: uppercase;
}

.liens-reseaux a{
    text-decoration: none;
}


.liens-reseaux a:hover .lien-texte {
    opacity: 1;
    border-bottom-color: white;
}

.content-wrapper {
    position: relative;
    width: 100%;
    background: linear-gradient(-40deg, white, #c6cddd, white);
}

.content {
    margin: auto;
    padding: 25px;
}

.content--840 {
    max-width: 840px;
}

.content--1024 {
    max-width: 1024px;
}

.content--full {
    max-width: 100%;
    padding-left: 35px;
    padding-right: 35px;
}

.content a{
    color: #004B91;
    text-decoration: none;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6{
    color: black;
}

/* Dropdown positionnement sur pages intérieures (pas fixed/hero) */
.dropdown-content {
    position: absolute;
}

/* Footer bordure bleue sur pages intérieures */

body:not(.home) footer{
    border-top: #004B91 solid 3px;
}

.omsc-toggle-inner {
    background-color: #eeeeee;
}
/* pour SEARCH */

.post-type-badge {
    font-size: 13px;
    color: #666;
    margin-top: 0;
}
h2.entry-title{
    margin-bottom: 5px;
}

.search-field{
    padding: 10px;
    border: none;
    font-size: 1em;
    border-bottom: thin solid #00578f;
    width: 66%;
    background-color: transparent;
    outline-width: 0;
}
.search-submit{
    padding: 11px;
    font-size: 1em;
    background-color: #00578f;
    border: none;
    color: white;
    border-radius: 5px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -5px;
}
input:focus-visible{
    outline: none;
    outline-offset: none;
    background-color: white;
}

.search-btn{
    width: 22px;
}

.modal-menu {
    position: absolute;
    z-index: 10;
    background-color: #222222dd;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: none;
    transition: .5s;
    overflow: scroll;
    top: 0;
}

.modal-menu p,
.modal-menu h1,
.modal-menu h2,
.modal-menu li {
    color: #eee;
    text-align: left;
    max-width: 840px;
    margin: 0 auto 16px auto;
}

.modal-menu a {
    color: #9acfea;
}

.modal-menu a:hover {
    color: lightblue;
}

.modal-menu h1 {
    margin-top: 20px;
}

.modal-menu p {
    line-height: 1.5;
}

.closeModal {
    float: right;
    cursor: pointer;
    color: white;
}

.modal-content {
    background: linear-gradient(-40deg, #1e1e3bee, #013464ee);
    border-radius: 25px;
    padding: 15px 35px 35px 35px;
    margin: 15% auto;
    overflow: scroll;
    max-width: 440px;
}
.screen-reader-text{
    display: none;
}
.modal-content .search-field{
    width: calc(100% - 110px);
    border-bottom-color: #c6cddd;
    color: white;
}
.modal-content .search-field::placeholder{
    color: #ddd;
}
.modal-content .search-submit{
    background-color: #c6cddd;
    color: #013464;
}
.modal-content input:focus-visible{
    background-color: #33333366;
}

/* IMGS */
/*
 * Responsive images
 *
 * Fluid images for posts, comments, and widgets
 */
.entry-content img,
.entry-summary img,
.comment-content img,
.widget img,
.wp-caption {
	max-width: 100%;
}

/* Make sure images with WordPress-added height and width attributes are scaled correctly. */
.entry-content img,
.entry-summary img,
.comment-content img[height],
img[class*="align"],
img[class*="wp-image-"],
img[class*="attachment-"] {
	height: auto;
}

img.size-full,
img.size-large,
img.wp-post-image {
	height: auto;
	max-width: 100%;
}

/* Make sure videos and embeds fit their containers. */
embed,
iframe,
object,
video {
	max-width: 100%;
}

/* Override the Twitter embed fixed width. */
.entry-content .twitter-tweet-rendered {
	max-width: 100% !important;
}

/* Images */
.alignleft {
	float: left;
}

.alignright {
	float: right;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

img.alignleft {
	margin: 5px 20px 5px 0;
}

.wp-caption.alignleft {
	margin: 5px 10px 5px 0;
}

img.alignright {
	margin: 5px 0 5px 20px;
}

.wp-caption.alignright {
	margin: 5px 0 5px 10px;
}

img.aligncenter {
	margin: 5px auto;
}

img.alignnone {
	margin: 5px 0;
}

.wp-caption .wp-caption-text,
.entry-caption,
.gallery-caption {
	color: #666;
	font-size: 18px; /* legacy was 13px sixe, 18px line height */
	font-style: italic;
	font-weight: 300;
	/* other legacy styles:
	text-align: center;
	max-width: 96%;
	*/
}

img.wp-smiley,
.rsswidget img {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin-bottom: 0;
	margin-top: 0;
	padding: 0;
}

.wp-caption.alignleft + ul,
.wp-caption.alignleft + ol  {
	list-style-position: inside;
}

/* legacy had image styles for gallery too
@todo see if gallery styles are needed */



@media screen and (max-width: 800px) {
    .content {
        padding: 12px;
    }
    .titre-page {
        font-size: 35px;
        padding-left: 15px;
    }
    .entete {
        height: 30vh;
    }
    .modal-content{
        max-width: 75%;
        margin: 50% auto;
    }

    .content .actus-cont .actUdeM{
        max-width: 100%;
    }
    
    .gauche .actUdeM:nth-child(3),
    .gauche .actUdeM:nth-child(4){
        display: none;
    }
    .gauche .pub:nth-child(3){
        display: none;
    }
}

/* ─── BARRE ADMIN WORDPRESS ──────────────────────────── */

body.admin-bar nav {
    top: 32px;
}
body.admin-bar main .content-section {
    margin-top : calc(var(--diapo-height) - 32px);

}

@media screen and (max-width: 782px) {
    body.admin-bar nav {
        top: 46px; /* La barre admin est plus haute sur mobile */
    }
}

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media screen and (max-width: 1060px) {
    #menu-desktop {
        display: none;
    }

    #menu-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #menu-mobile .menu-item {
        filter: drop-shadow(1px 1px 5px #333);
    }
}

@media screen and (max-width: 950px) {
    #logo-centre {
        width: 90%;
        max-width: 500px;
    }

    .content-section {
        flex-wrap: wrap;
    }

    .liens-reseaux {
        flex-wrap: wrap;
    }

    .gauche,
    .droite {
        width: 100%;
    }

    footer img {
        max-width: 100%;
    }

    .actus-cont,
    .pub-cont {
        justify-content: center;
    }

    .actus-cont .actUdeM,
    .pub {
        max-width: 100%;
    }
    .actus{
        padding: 15px;
    }
}
@media screen and (max-width: 600px) {
    .single-publication {
        flex-direction: column;
    }
    .single-publication-thumbnail {
        max-width: 160px;
        order: 1;
    }
    .single-publication-content {
        order: 2;
    }
}