@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* ======================= Reset ======================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ======================= Base ======================= */
body {
    background-image: url(/stylesheet/images/body_background.webp);
    font-family: 'Orbitron', sans-serif;
    color: #00f2ff;
    line-height: 1.5;
}

/* ======================= Skip link (accessibilité) ======================= */
.skip-link {
    position: absolute;
    top: -999px;
    left: -999px;
    background: #00f2ff;
    color: #000;
    padding: 8px 16px;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    border-radius: 0 0 4px 0;
    z-index: 9999;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
    left: 0;
}

/* ======================= Visually Hidden ======================= */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ======================= Focus Accessibility ======================= */
a:focus,
button:focus,
[tabindex]:focus {
    outline: 2px dashed #00f2ff;
    outline-offset: 3px;
}

/* ======================= Main Container ======================= */
#main-container {
    max-width: 1024px;
    background-image: url(/stylesheet/images/fiche_background.webp);
    background-repeat: repeat;
    background-size: auto;
    margin: 20px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.15);
}

/* ======================= Header ======================= */
#header {
    position: relative;
    background-image: url(/stylesheet/images/banniere.png);
    background-repeat: no-repeat;
    height: 185px;
    line-height: 0;
    font-size: 0;
}

#header img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    vertical-align: bottom;
}

#header-img {
    display: none;
}

/* ======================= Subheader ======================= */
#subheader {
    height: 35px;
    background-image: url(/stylesheet/images/menu_horizontal.png);
    background-repeat: no-repeat;
    background-color: rgba(0, 20, 35, 0.95);
    position: relative;
    overflow: hidden;
}

#menu-subheader {
    display: flex;
    justify-content: center;
    list-style: none;
    padding-left: 188px;
    gap: 6px;
    height: 25px;
    align-items: center;
	font-size: 20px;
}

#menu-subheader li a {
    text-decoration: none;
    color: #7ecfea;
    font-weight: 700;
    font-size: 0.72em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 4px;
    border: 1px solid transparent;
    position: relative;
    transition: color 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

/* Trait décoratif sous le texte */
#menu-subheader li a::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 1px;
    background: #00f2ff;
    transition: transform 0.25s ease;
}

#menu-subheader li a:hover,
#menu-subheader li a:focus {
    color: #00f2ff;
    border-color: rgba(0, 242, 255, 0.35);
    background: rgba(0, 242, 255, 0.06);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.15), inset 0 0 8px rgba(0, 242, 255, 0.04);
    text-decoration: none;
}

#menu-subheader li a:hover::after,
#menu-subheader li a:focus::after {
    transform: translateX(-50%) scaleX(1);
}

/* Séparateurs entre les items */
#menu-subheader li + li {
    position: relative;
}

#menu-subheader li + li::before {
    content: '//';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 242, 255, 0.2);
    font-size: 0.65em;
    pointer-events: none;
}

/* ======================= Layout central ======================= */
#center {
    display: flex;
    flex-direction: row !important;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;42
	
    margin: 0;
    width: 100%;
}

/* ======================= Menu Desktop ======================= */
#menu {
    width: 188px;
    flex-shrink: 0;
    align-self: stretch;
    background-image: url(/stylesheet/images/menu_gauche.webp);
    background-repeat: repeat-y;
    color: #00C69E;
}

#menu > ul {
    list-style: none;
}

#menu > ul > li.rubrique > .rubrique-header {
    position: relative;
    background: url('/stylesheet/images/rubrique.png') no-repeat left center;
    min-height: 50px;
    line-height: 50px;
    font-weight: bold;
    font-size: 1.2em;
    padding-left: 16px;
    color: #00f2ff;
}

#menu > ul > li.rubrique ul {
    padding-left: 10px;
    font-size: 0.9em;
    margin-top: 0;
    list-style: disc inside;
}

#menu > ul > li.rubrique ul li a:hover,
#menu > ul > li.rubrique ul li a:focus {
    color: #ffffff;
    text-decoration: underline;
}

#menu > ul > li.site-heberge ul li a { color: #cce6ff; }
#menu > ul > li.emulateurs ul li a   { color: #a0fff0; }
#menu > ul > li.partenaires ul li a  { color: #ffe0b3; }

/* ======================= Container principal ======================= */
#container {
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(100% - 188px);
    margin: 16px;
    background: linear-gradient(to bottom right, #050d1a, #0a1a2a);
    color: #00f2ff;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(0, 242, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.08);
}

#container h1, #container h2, #container h3,
#container h4, #container h5, #container h6 {
    color: #00f2ff;
    margin-bottom: 15px;
}

#container p {
    margin-bottom: 15px;
}

#container a {
    color: #ffe0b3;
    text-decoration: none;
    transition: color 0.3s;
}

#container a:hover,
#container a:focus {
    color: #ffffff;
    text-decoration: underline;
}

/* ======================= Footer ======================= */
#footer {
    height: 23px;
    background-image: url(/stylesheet/images/bg_footer.png);
    background-color: green;
    background-repeat: no-repeat;
    text-align: center;
    padding: 5px 0;
    color: #fff;
    font-size: 0.9em;
}

/* ======================= Pagination (archives) ======================= */
.archives-pagination {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    justify-items: center;
    margin: 20px auto;
    width: fit-content;
}

.archives-pagination a,
.archives-pagination span.active {
    display: block;
    padding: 6px 12px;
    color: #00f2ff;
    border: 1px solid #00f2ff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    text-align: center;
}

.archives-pagination a:hover { background-color: #00f2ff; color: #000; }
.archives-pagination span.active { background-color: #00f2ff; color: #000; font-weight: bold; }

/* ======================= Hamburger (caché sur desktop) ======================= */
#hamburger-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 30px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 2000;
    background: none;
    border: none;
    padding: 0;
}

#hamburger-btn span {
    display: block;
    height: 4px;
    background-color: #00f2ff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

#hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
#hamburger-btn.active span:nth-child(2) { opacity: 0; }
#hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ======================= Menu Mobile (drawer) ======================= */
#mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: #0a0a0a;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-top: 60px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1500;
}

#mobile-menu.active { transform: translateX(0); }

#mobile-menu ul {
    list-style: none;
    padding: 0 20px;
}

#mobile-menu li a {
    color: #00f2ff;
    display: block;
    padding: 8px 0;
    font-weight: bold;
    text-decoration: none;
}

#mobile-menu li a:hover,
#mobile-menu li a:focus {
    color: #fff;
    text-decoration: underline;
}

#menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1400;
}

/* ======================= Lightbox ======================= */
#lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

#lightbox-overlay.active { display: flex; }
#lightbox-overlay.fade-out { opacity: 0; transition: opacity 0.3s; }

#lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    border: 2px solid #00f2ff;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.5);
}

.clickable-image { cursor: zoom-in; }

/* ======================= Breadcrumb ======================= */
.breadcrumb {
    padding: 8px 16px;
    font-size: 0.78em;
    background: rgba(0, 242, 255, 0.04);
    border-bottom: 1px solid rgba(0, 242, 255, 0.15);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: #4a8a9a;
}

.breadcrumb li + li::before {
    content: '›';
    margin: 0 0.45rem;
    color: #2a5060;
    font-size: 1.1em;
    line-height: 1;
}

.breadcrumb li a {
    color: #00cfff;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb li a:hover,
.breadcrumb li a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.breadcrumb li[aria-current="page"] span {
    color: #7ecfea;
    font-weight: 600;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

/* ======================= Responsive mobile (max 700px) ======================= */
@media screen and (max-width: 700px) {
    #hamburger-btn { display: flex; }
    #menu { display: none; }
    #center { flex-direction: column !important; }
    #container { width: 100%; max-width: 100%; margin: 8px 0; padding: 15px; border-radius: 12px; }
    #header { background-image: none; height: auto; line-height: 0; }
    #header-img { display: block; }
    #subheader { height: auto; }
    #menu-subheader {
        padding-left: 0;
        justify-content: center;
        height: auto;
        padding: 8px 10px;
        gap: 4px;
        flex-wrap: wrap;
    }
    #menu-subheader li + li::before { display: none; }
    .archives-pagination { grid-template-columns: repeat(5, 1fr); gap: 6px; }
    .archives-pagination a,
    .archives-pagination span.active { padding: 5px 8px; font-size: 0.85em; }
    .breadcrumb { padding: 6px 12px; font-size: 0.72em; }
    .breadcrumb li[aria-current="page"] span { max-width: 160px; }
    #container h1 { font-size: 0; line-height: 0; margin: 0; padding: 0; }
}