/*
Theme Name: MHS Theme
Theme URI: mhs.emf.regroupement-rcms.org
Author: Charles Campeau-Bedford
Description: Thème simplifié inspiré du RCMS pour le site Musique, humanités et sciences.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mhs-theme
*/

:root{
    --mauve : #8e4b9c;
}

/* ==========================================================================
   Polices locales
   ========================================================================== */
@font-face {
    font-family: 'Public Sans';
    src: url('assets/fonts/PublicSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DM Serif Display';
    src: url('assets/fonts/DMSerifDisplay-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Réinitialisation légère
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #e7dcea;
    font-family: "Public Sans", sans-serif;
    color: #2b2130;
    font-size: 17px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "DM Serif Display", serif;
    margin-top: 0;
}

h1{
    font-size: 45px;
}

h2{
    font-size: 32px;
}

h3{
    font-size: 25px;
}

h4{
    font-size: 21px;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

/* ==========================================================================
   En-tête
   ========================================================================== */
.entete {
    width: 100%;
    height: 55vh;
    background-color: var(--mauve);
    display: flex;
    align-items: center;
    margin-top: 0;
    justify-content: center;
}

.titre-page {
    line-height: 1;
    opacity: .8;
    font-size: 62px;
    text-align: center;
    font-weight: normal;
    color: white;
}

.titre-page a{
    text-decoration: none;
}

.small {
    font-size: .5em;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
body.admin-bar nav {
    top: 32px;
}
nav {
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    list-style-type: none;
    display: flex;
    justify-content: right;
    width: 100%;
    padding: 10px 15px;
    align-items: flex-start;
    gap: 30px;
    margin: 0;
    background: linear-gradient(180deg, #8e4b9c, #8e4b9cbb, transparent);
}

.site-nav #titre {
    padding: 0;
    margin-right: auto;
    font-size: 2.4em;
}

#menu-mobile #titre{
    font-size: 2em;
}

.menu-item,
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav ul {
    display: flex;
    gap: 30px;
}

.menu-item {
    font-family: "DM Serif Display", serif;
    color: white;
    opacity: .75;
    text-decoration: none;
    text-transform: lowercase;
    font-size: 1.4em;
    padding: 5px 0 5px 0;
    border-bottom: thin solid transparent;
    transition: .4s ease;
    display: inline-block;
}

.menu-item:hover {
    opacity: .85;
    border-bottom-color: #ffffffaa;
}

#open-menu:hover{
    border-bottom-color: transparent;
}

.current-menu-item {
    opacity: .95;
    border-bottom-color: white;
}

#menu-desktop{
    transition: .4s ease;
}

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

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

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

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

#menu-mobile-open #fermer-menu {
    margin-top: 15px;
    color: white;
    cursor: pointer;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer{
    border-top: 2px solid var(--mauve)
}

.logos-footer-div {
    display:flex; 
    justify-content: center; 
    align-items: center; 
    gap: 35px; 
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.logos-footer-div img{
    opacity: .9;
    transition: .3s ease;
}
.logos-footer-div img:hover{
    opacity: 1;
}

/* ==========================================================================
   Contenu générique (pages, articles)
   ========================================================================== */
.site-content {
    max-width: 840px;
    margin: 0 auto;
    padding: 60px 30px;
    color: #333;
}

.site-footer {
    text-align: center;
    padding: 30px;
    font-size: 11px;
    color: #777;
}

.entry-title {
    border-bottom: thin solid #444;
    padding-bottom: 5px;
    color: #333;
}

.wp-block-separator{
    border-top: thin solid #444;
}

/* =============================================================================
   Page d'accueil / Actualités
   ============================================================================= */

.separateur{
    border-bottom:thin solid #666;
    width: 100%;
    height: 1px;
    margin-bottom: 25px;
}

.actu-date{
    font-size: .8em; 
    text-align: right; 
    color: #666;
}

.actualites-voir-tout{
    margin-top: 50px;
    text-align: right;
}

.actualite-edit-link{
    float: right;
    color: #c78a21;
}


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

    #menu-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    body.admin-bar nav {
        top: 46px; /* La barre admin est plus haute sur mobile */
    }
    body.admin-bar #menu-mobile-open {
        top: 46px; /* La barre admin est plus haute sur mobile */
    }
}
