/** @format */

/* Reset léger */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    font-size: 14px;
}

body {
    background-color: #f6f6f6;
    color: #202122;
    font-family: "Open Sans", -apple-system,
        BlinkMacSystemFont, "Segoe UI", "Roboto",
        "Helvetica Neue", Arial, sans-serif;
}

/* Bandeaux supérieurs Vector */
#mw-page-base {
    background: #f6f6f6;
    height: 0;
}

#mw-head-base {
    background: #ffffff;
    border-bottom: 1px solid #a7d7f9;
    height: 3.2em;
    height: 0;
}

/* Conteneur global */
#page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1em 2em;
    position: relative;
}

/* HEADER (haut de page) */
#mw-head {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #a7d7f9;
    padding-top: 0.3em;
    padding-bottom: 0.2em;
}

/* Ligne supérieure */
#mw-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4em;
}

/* Hamburger (desktop: caché, mobile: visible) */
#mw-hamburger {
    display: none;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    padding: 0.2em 0.5em;
    font-size: 16px;
    cursor: pointer;
}

#mw-hamburger:hover {
    background: #e9ecef;
}

/* Logo */
#p-logo {
    text-decoration: none;
    color: #202122;

    display: flex;
    gap: 10px;
}

#p-logo img {
    height: 40px;
    aspect-ratio: 1;
}

#p-logo div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#p-logo .logo-text-top {
    display: block;
    font-family: "Merriweather", "Times New Roman",
        "Linux Libertine", serif;
    font-size: 26px;
    line-height: 1.1;
}

#p-logo .logo-text-bottom {
    display: block;
    font-size: 11px;
    color: #54595d;
}

/* Liens perso */
#p-personal {
    font-size: 12px;
}

#p-personal ul {
    list-style: none;
    display: flex;
    gap: 0.6em;
}

#p-personal a {
    color: #0645ad;
    text-decoration: none;
}

#p-personal a:hover {
    text-decoration: underline;
}

/* Ligne inférieure: recherche + vues */
#mw-head-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}

/* Recherche */
#searchform {
    flex: 1;
}

#simpleSearch {
    display: flex;
    align-items: center;
    border: 1px solid #a2a9b1;
    background-color: #ffffff;
    padding: 2px 4px;
    border-radius: 2px;
}

#searchInput {
    flex: 1;
    border: none;
    font-size: 13px;
    padding: 2px 4px;
    outline: none;
}

#searchButton {
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    font-size: 12px;
    padding: 2px 6px;
    cursor: pointer;
}

#searchButton:hover {
    background: #e9ecef;
}

/* Onglets de vue */
#p-views {
    font-size: 12px;
}

#p-views ul {
    list-style: none;
    display: flex;
    gap: 0.2em;
}

#p-views li {
    border: 1px solid #a7d7f9;
    border-bottom: none;
    background: #eaf3ff;
    padding: 0.2em 0.6em;
}

#p-views li.selected {
    background: #ffffff;
}

#p-views a {
    text-decoration: none;
    color: #202122;
}

/* Layout principal */
#content-wrapper {
    margin-top: 1em;
}

/* Sidebar */
#mw-panel {
    width: 11em;
    float: left;
    padding-right: 0.5em;
    font-size: 12px;
    transition: left 0.2s ease-out;
}

#mw-panel .portal {
    margin-bottom: 1.5em;
}

#mw-panel h3 {
    font-size: 12px;
    margin-bottom: 0.2em;
    padding-bottom: 0.2em;
    border-bottom: 1px solid #a2a9b1;
}

#mw-panel .body ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.2em;
}

#mw-panel .body li {
    margin: 0.15em 0;
}

#mw-panel a {
    color: #0645ad;
    text-decoration: none;
}

#mw-panel a:hover {
    text-decoration: underline;
}

/* Overlay mobile pour menu */
#mw-mobile-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 900;
}

/* Contenu principal */
#content {
    margin-left: 11em;
    background-color: #ffffff;
    border: 1px solid #a7d7f9;
    padding: 1.2em 1.4em 1.4em;
    box-shadow: 0 0 0 1px #ffffff inset;
}

/* Titre principal */
#firstHeading {
    font-family: "Merriweather", "Times New Roman",
        "Linux Libertine", serif;
    font-weight: 400;
    font-size: 28px;
    margin-bottom: 0.15em;
}

#siteSub {
    font-size: 12px;
    color: #54595d;
    margin-bottom: 0.8em;
}

/* Corps */
#bodyContent {
    font-size: 14px;
    line-height: 1.6;
}

/* Liens */
a {
    color: #0645ad;
    text-decoration: none;
}

a:visited {
    color: #0b0080;
}

a:hover {
    text-decoration: underline;
}

/* Infobox */
.infobox {
    float: right;
    clear: right;
    margin: 0 0 1em 1em;
    border-collapse: collapse;
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    font-size: 12px;
    width: 260px;
}

.infobox caption {
    font-weight: bold;
    padding: 0.4em;
    text-align: center;
    background-color: #eaecf0;
    border-bottom: 1px solid #a2a9b1;
}

.infobox th,
.infobox td {
    border-top: 1px solid #a2a9b1;
    padding: 0.25em 0.4em;
    vertical-align: top;
}

.infobox th {
    width: 40%;
    text-align: left;
}

/* Paragraphes et listes */
#bodyContent p {
    margin: 0.5em 0;
}

#bodyContent .lead {
    font-size: 14px;
    margin-bottom: 0.8em;
}

#bodyContent ul {
    margin: 0.4em 0 0.8em 1.6em;
}

/* Titres de sections */
h2 {
    font-family: "Merriweather", "Times New Roman",
        "Linux Libertine", serif;
    font-weight: 700;
    font-size: 18px;
    border-bottom: 1px solid #a2a9b1;
    margin-top: 1.2em;
    margin-bottom: 0.4em;
    padding-bottom: 0.1em;
}

.mw-headline {
    padding-right: 0.2em;
}

/* [modifier | modifier le code] */
.mw-editsection {
    font-size: 11px;
    font-weight: normal;
    color: #54595d;
}

.mw-editsection::before {
    content: " ";
}

/* Lien haut de page */
#back-to-top {
    margin-top: 1.5em;
    font-size: 12px;
}

/* Footer */
#footer {
    clear: both;
    font-size: 12px;
    color: #54595d;
    border-top: 1px solid #a2a9b1;
    margin-top: 1.5em;
    padding-top: 0.7em;
}

#footer-places,
#footer-icons {
    list-style: none;
    margin-bottom: 0.3em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
}

#footer a {
    color: #0645ad;
}

/* =========================
   RESPONSIVE - TABLETTE
   ========================= */
@media (max-width: 1100px) {
    #page-container {
        max-width: 100%;
        padding: 0 0.6em 1.5em;
    }
}

.main-image {
    float: right;
    margin: 0 0 1em 1em;
    width: 300px;
    text-align: center;
    font-size: 12px;
    color: #54595d;
}

.main-image img {
    width: 100%;
    height: auto;
    border: 1px solid #a2a9b1;
    background: #ffffff;
}

.main-image-caption {
    padding-top: 0.4em;
    line-height: 1.4;
}

/* Sur mobile : image pleine largeur ici aussi */
@media (max-width: 900px) {
    .main-image {
        float: none;
        width: 100%;
        margin: 0 0 1em 0;
        text-align: center;
    }
}

/* =========================
   RESPONSIVE - MOBILE
   ========================= */
@media (max-width: 900px) {
    html,
    body {
        font-size: 15px;
    }

    /* Header plus compact */
    #mw-head-top {
        justify-content: space-between;
        gap: 0.5em;
    }

    #mw-hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #p-logo .logo-text-top {
        font-size: 22px;
    }

    #p-logo .logo-text-bottom {
        font-size: 10px;
    }

    #p-personal ul {
        gap: 0.4em;
    }

    /* Ligne inférieure: stack */
    #mw-head-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    #searchform {
        width: 100%;
    }

    #p-views {
        width: 100%;
        overflow-x: auto;
    }

    #p-views ul {
        white-space: nowrap;
    }

    /* Sidebar devient panneau latéral slide-in */
    #mw-panel {
        position: fixed;
        top: 3.6em; /* approximatif hauteur header */
        left: -260px;
        height: calc(100% - 3.6em);
        width: 240px;
        background: #f8f9fa;
        padding: 0.8em;
        box-shadow: 3px 0 6px rgba(0, 0, 0, 0.2);
        z-index: 950;
        float: none;
    }

    #mw-panel.open {
        left: 0;
    }

    #mw-mobile-panel-overlay.visible {
        display: block;
    }

    /* Contenu prend toute la largeur */
    #content {
        margin-left: 0;
        border-left: 1px solid #a7d7f9;
        border-right: 1px solid #a7d7f9;
        border-radius: 0;
        padding: 1em 0.9em 1.2em;
    }

    /* Infobox: pleine largeur en haut du contenu mobile */
    .infobox {
        float: none;
        margin: 0 0 1em 0;
        width: 100%;
    }

    /* Footer: un peu de marge interne */
    #footer {
        padding-left: 0.4em;
        padding-right: 0.4em;
    }
}
