
/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    line-height: 1.6;
}

main {
    margin: -60px auto 0 auto;
    background: linear-gradient(to right, #170c0c 35%, #390a0a 100%);
    padding: 48px 48px 48px 48px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.main {
    padding: 4rem 2rem;
}
.h1 {
    color: #FF3B30;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 0 0 10px rgba(255, 59, 48, 0.3);
}
a.no-style {
  text-decoration: none;
  color: inherit;
}

/******************************* Header *******************************/
.header {
    height: 150px;
    padding: 0 50px;
    background-color: transparent;
    display: flex;
    align-items: center;
    position: absolute;     /* ⬅️ header flottant au-dessus */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
/* Header - Burger menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2001;
    position: relative;
}
.burger-menu span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}
/* Animation du burger menu */
.burger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.burger-menu.active span:nth-child(2) {
    opacity: 0;
}
.burger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}
/* Header - Navigation */
.nav {
    margin: 0 auto;
    right: -100%;
    z-index: 2000;
    filter:
      drop-shadow(1px 0 0 rgba(0,0,0,0.5))
      drop-shadow(-1px 0 0 rgba(0,0,0,0.5))
      drop-shadow(0 1px 0 rgba(0,0,0,0.5))
      drop-shadow(0 -1px 0 rgba(0,0,0,0.5));
}
.nav ul {
    display: flex;
    gap: 3rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s;
}
.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.nav a:hover, .nav a.active {
    color: #ff3333;
}
.nav a:hover::after, .nav a.active::after {
    transform: scaleX(1);
}
.nav.active {
    right: 0;
}
/* Header - Dropdown */
.dropdown {
    position: relative;
}
ul.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0c0c0c;
    border: 1px solid #222;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 140px;
    z-index: 10;
}
.dropdown-menu li {
    padding: 0;
}
.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #ffffff;
    font-size: 0.9rem;
    text-transform: none;
    text-decoration: none;
    transition: background-color 0.2s;
}
.dropdown-menu a:hover {
    background-color: #222;
    color: #ff3333;
}
/* Affiche le sous-menu au survol */
.dropdown:hover .dropdown-menu {
    display: block;
}
.logo-img {
    height: 850px;
    width: auto;
}


/******************************* Footer *******************************/
.footer {
    background-color: #000;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}
.footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}
.footer-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}
.footer-right a {
    color: #fff;
    text-decoration: none;
}
.footer-right a:hover {
    color: #ff3333;
}
.social-icon {
    width: 50px;
    filter: brightness(0) invert(1); /* icônes blanches */
    transition: opacity 0.2s ease;
}
.social-icon:hover {
    opacity: 0.7;
}


/******************************* Commun *******************************/
.header-edition {
    position: relative;
    height: 500px;
    overflow: hidden;
}
.header-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    object-fit: cover;
    transform: translateZ(0);
    will-change: transform;
    background-attachment: fixed;
}
.logo-edition {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 280px;
    width: auto;
    filter:
      drop-shadow(2px 0 0 rgba(255,255,255,0.5))
      drop-shadow(-2px 0 0 rgba(255,255,255,0.5))
      drop-shadow(0 2px 0 rgba(255,255,255,0.5))
      drop-shadow(0 -2px 0 rgba(255,255,255,0.5));
}
.item {
    break-inside: avoid;
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}
.item img {
    width: 100%;
    display: block;
    border-radius: 10px;
    transition: transform 0.3s ease;
}
.item img:hover {
    transform: scale(1.05);
}
.texte {
    padding: 5rem;
}
.texte h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
}
.masonry {
    column-count: 3;
    column-gap: 10px;
    padding: 50px;
}
.item.texte {
    padding-top: 50px;
    padding-bottom: 10px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}
.part {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
}
.item-part {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 85px;
    height: 60px;
    text-align: center;
}
.item-part img {
    max-height: 50px;
    height: auto;
    width: auto;
}


/******************************* Index *******************************/
.index-bg {
    background: linear-gradient(to bottom, #3C0A0A, #120C0C);
}
.hero {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.hero-img {
    width: 100%;
    height: 740px;
    object-fit: cover;
    filter: brightness(0.7);
}
.logo-container {
    position: absolute;
    top: 250px;
    left: 60px;
}
.logo {
    width: 400px;
}
.welcome-section {
    text-align: center;
    margin: 100px 0;
}
.welcome-section h1 {
    color: #bc181d;
    font-size: 2.5rem;
    margin-bottom: 24px;
    font-family: 'Orbitron', sans-serif;
}
.description {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0;
    line-height: 1.6;
    max-width: 1000px;
    font-weight: 700;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Montserrat', sans-serif;
}
.index-section {
    margin-bottom: 100px;
}

.index-section h2 {
    color: #bc181d;
    font-size: 1.5rem;
    margin-bottom: 24px;
    font-family: 'Orbitron', sans-serif;
}
.index-content {
    display: flex;
    align-items: center;
    gap: 80px;
    justify-content: center;
}
.index-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    text-align: center;
}
.index-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 350px;
    font-family: 'Montserrat', sans-serif;
}
.index-info p {
    margin: 110px 0 16px 0;
    font-size: 1.2rem;
}
.index-btn {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    border: 2px solid #bc181d;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}
.index-btn:hover {
    background: #bc181d;
    color: #fff;
}
.editions-section {
    margin-bottom: 4rem;
}
.editions-section div {
    text-align: center;
}
.editions-section h2 {
    color: #bc181d;
    font-size: 1.5rem;
    margin-bottom: 24px;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
}
.edition-2025 {
    position: relative;
    display: inline-block;
    break-inside: avoid;
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}
.edition-2025 img {
    width: 100%;
    display: block;
    border-radius: 10px;
    transition: transform 0.3s ease;
}
.edition-2025 img:hover {
    transform: scale(1.05);
}
.edition-home-visual {
    width: 100%;
    max-width: 100%;
    text-align: center;
    overflow: hidden;
}
.edition-2026-home-link {
    display: block;
    width: min(100%, 854px);
    max-width: 100%;
    margin: 0 auto;
}
.edition-2026-home-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}
.contact-section {
    background-color: #121212;
    text-align: center;
    padding: 150px 0;
}
.contact-section h2 {
    color: #bc181d;
    font-size: 1.5rem;
    font-family: 'Orbitron', sans-serif;
    margin: 0;
}
.separator {
    border: solid #bc181d 1px;
    width: 50px;
    margin-top: 20px;
    margin-bottom: 20px;
}
.contact-lien a {
    text-decoration: none;
    color: #fff;
    font-size: 1.1rem;
    letter-spacing: 2px;
}
.contact-lien a:hover {
    color: #bc181d;
    transition: .2s ease-in;
}


/******************************* CTF *******************************/
.ctf-bg {
    background: linear-gradient(to bottom, #3C0A0A, #120C0C);
}
.header-ctf {
    position: relative;
    padding: 7rem;
    text-align: center;
}
.ctf-section {
    margin-bottom: 4rem;
}
.ctf-section-title {
    font-family: 'Orbitron', sans-serif;
    color: #BC181D;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}
.ctf-content-block {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
}
.ctf-column {
    flex-direction: column;
    border-radius: 20px;
}
.challenges {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}
.challenge-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
}
.image-small {
    width: 200px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
}
.image-large {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.text {
    max-width: 650px;
}
.paragraph {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}
.list {
    font-family: 'Montserrat', sans-serif;
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}
.list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}
.list li::before {
    content: '•';
    color: #BC181D;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}
.image:hover, .image-small:hover, .image-large:hover {
  transform: translateY(-1px) scale(1.005);
/*  box-shadow: 0 2px 6px rgba(250, 150, 150, 0.25);*/
}


/******************************* Edition 2022 *******************************/
.ed2022-bg {
    background: rgb(75, 82, 94);
    background: linear-gradient(rgb(75, 82, 94), #000000);
}


/******************************* Edition 2023 *******************************/
.ed2023-bg {
    background: rgb(51, 110, 181);
    background: linear-gradient(rgb(51, 110, 181), #134670);
}


/******************************* Edition 2024 *******************************/
.ed2024-bg {
    background: rgb(75, 201, 212);
    background: linear-gradient(rgb(75, 201, 212), #1770b9);
}


/******************************* Edition 2025 *******************************/
.ed2025-bg {
    background: rgb(28, 17, 4);
    background: linear-gradient(rgb(28, 17, 4), #305919);
}
.ed2025-btn {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    border: 2px solid #131313;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    border-radius: 5px;
}
.ed2025-btn:hover {
    background: #131313;
    color: #fff;
}
.masonry2025 {
    column-count: 2;
    column-gap: 10px;
    padding: 50px;
}
.masonry2025-2 {
    column-count: 1;
    column-gap: 10px;
    padding: 50px;
    text-align: center;
}
.item2025 {
    break-inside: avoid;
    margin-bottom: 10px;
    overflow: hidden;
    background: #3e4f0e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.40);
    text-align: left;
    font-family: 'Montserrat', sans-serif;
}
.item2025-2 {
    break-inside: avoid;
    margin-bottom: 10px;
    overflow: hidden;
    background: #3e4f0e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.40);
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}
.item2025:hover, .item2025-2:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(150, 150, 150, 0.25);
}


/******************************* Edition 2026 *******************************/
.ed2026-bg {
    background: rgb(3, 34, 45);
    background: linear-gradient(rgb(3, 34, 45), #0b4f5f);
}

.ed2026-btn {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    border: 2px solid #c89b4f;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    border-radius: 5px;
}

.ed2026-btn:hover {
    background: #c89b4f;
    color: #071f28;
}

.ed2026-btn-disabled {
    opacity: 0.75;
    cursor: default;
}

.ed2026-btn-disabled:hover {
    background: transparent;
    color: #fff;
}

.masonry2026 {
    column-count: 2;
    column-gap: 10px;
    padding: 50px;
}

.masonry2026-2 {
    column-count: 1;
    column-gap: 10px;
    padding: 50px;
    text-align: center;
}

.item2026 {
    break-inside: avoid;
    margin-bottom: 10px;
    overflow: hidden;
    background: #0e5a67;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.40);
    text-align: left;
    font-family: 'Montserrat', sans-serif;
}

.item2026-2 {
    break-inside: avoid;
    margin-bottom: 10px;
    overflow: hidden;
    background: #0e5a67;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.40);
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.item2026 h3,
.item2026-2 h3 {
    color: #f2c879;
}

.item2026:hover,
.item2026-2:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(200, 155, 79, 0.25);
}


/******************************* Legacy *******************************/
:root {
    --legacy-bg: #010401;
    --legacy-bg-soft: #041004;
    --legacy-green: #30a830;
    --legacy-green-bright: #39ff4a;
    --legacy-green-muted: #1b7f22;
    --legacy-green-dark: #073b0b;
}

body.legacy-bg {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 35%, rgba(48, 168, 48, 0.12), transparent 38%),
        linear-gradient(180deg, #020602 0%, #000 100%);
    color: var(--legacy-green-bright);
    overflow-x: hidden;
}

body.legacy-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(57, 255, 74, 0.055) 0,
            rgba(57, 255, 74, 0.055) 1px,
            transparent 1px,
            transparent 4px
        );
    mix-blend-mode: screen;
    opacity: 0.45;
}

body.legacy-bg::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(circle at center, transparent 35%, rgba(0,0,0,0.72) 100%);
}

.legacy-bg .header {
    background: rgba(0, 0, 0, 0.72);
    border-bottom: 1px solid var(--legacy-green-muted);
    box-shadow: 0 0 20px rgba(48, 168, 48, 0.18);
}

.legacy-bg .logo-img,
.legacy-logo {
    filter:
        brightness(0)
        saturate(100%)
        invert(54%)
        sepia(77%)
        saturate(724%)
        hue-rotate(76deg)
        brightness(91%)
        contrast(92%)
        drop-shadow(0 0 14px rgba(57,255,74,0.45));
}

.legacy-bg .nav a,
.legacy-bg .footer-right a,
.legacy-bg .footer-text {
    color: var(--legacy-green);
    text-shadow: 0 0 8px rgba(57, 255, 74, 0.45);
}

.legacy-bg .nav a:hover,
.legacy-bg .nav a.active,
.legacy-bg .footer-right a:hover {
    color: var(--legacy-green-bright);
}

.legacy-bg .nav a::after {
    background-color: var(--legacy-green-bright);
}

.legacy-bg .footer {
    background: #000;
    border-top: 1px solid var(--legacy-green-muted);
}

.legacy-bg .social-icon {
    filter:
        brightness(0)
        saturate(100%)
        invert(54%)
        sepia(77%)
        saturate(724%)
        hue-rotate(76deg)
        brightness(91%)
        contrast(92%);
}

main.legacy-main {
    margin: 0 auto;
    padding: 170px 24px 80px 24px;
    max-width: none;
    background: transparent;
    gap: 32px;
    font-family: 'Courier New', monospace;
}

.legacy-terminal,
.legacy-panel {
    width: min(1100px, 100%);
    margin: 0 auto;
    background: rgba(0, 10, 0, 0.78);
    border: 1px solid var(--legacy-green-muted);
    box-shadow:
        0 0 0 1px rgba(57, 255, 74, 0.08) inset,
        0 0 28px rgba(48, 168, 48, 0.22);
    color: var(--legacy-green);
    text-shadow: 0 0 8px rgba(57, 255, 74, 0.35);
}

.legacy-terminal {
    padding: 32px;
    min-height: 520px;
    position: relative;
}

.legacy-terminal-topline {
    border: 1px solid var(--legacy-green-muted);
    padding: 12px 18px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 36px;
    color: var(--legacy-green-bright);
    box-shadow: 0 0 16px rgba(57, 255, 74, 0.18) inset;
}

.legacy-hero-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 44px;
    align-items: center;
    max-width: 940px;
    margin: 0 auto;
}

.legacy-logo-zone {
    display: flex;
    justify-content: center;
    align-items: center;
}

.legacy-logo {
    width: 210px;
    height: auto;
    opacity: 0.78;
}

.legacy-title-zone h1 {
    margin: 8px 0 6px;
    font-family: 'Courier New', monospace;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: 0.02em;
    color: var(--legacy-green-bright);
    text-shadow:
        0 0 8px rgba(57,255,74,0.75),
        0 0 28px rgba(57,255,74,0.35);
}

.legacy-title-zone h1 span {
    font-weight: 900;
}

.legacy-title-zone h1 em {
    font-style: normal;
    font-size: 0.48em;
    font-weight: 400;
    color: var(--legacy-green);
}

.legacy-subtitle,
.legacy-panel p,
.legacy-list,
.legacy-category-grid p {
    font-family: 'Montserrat', sans-serif;
    color: #9fffa7;
    font-size: 1rem;
    line-height: 1.75;
}

.legacy-command,
.legacy-prompt,
.legacy-boot-lines p {
    font-family: 'Courier New', monospace !important;
    color: var(--legacy-green-bright) !important;
}

.legacy-boot-lines {
    width: min(620px, 100%);
    margin: 34px auto 0;
}

.legacy-boot-lines p {
    margin: 8px 0;
}

.legacy-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
}

.legacy-actions a {
    min-width: 142px;
    padding: 10px 22px;
    border: 1px solid var(--legacy-green-bright);
    border-radius: 6px;
    color: var(--legacy-green-bright);
    background: rgba(0, 30, 0, 0.45);
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-family: 'Courier New', monospace;
    box-shadow:
        0 0 10px rgba(57,255,74,0.26),
        inset 0 0 12px rgba(57,255,74,0.08);
    transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.legacy-actions a:hover {
    background: var(--legacy-green-bright);
    color: #001400;
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(57,255,74,0.55);
}

.legacy-panel {
    padding: 30px;
    border-radius: 0;
}

.legacy-panel h2,
.legacy-panel h3 {
    font-family: 'Courier New', monospace;
    color: var(--legacy-green-bright);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0;
}

.legacy-panel h2 {
    font-size: 1.35rem;
}

.legacy-grid {
    width: min(1100px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.legacy-list {
    margin: 0;
    padding-left: 1.3rem;
}

.legacy-list li {
    margin-bottom: 0.8rem;
}

.legacy-list li::marker {
    color: var(--legacy-green-bright);
}

.legacy-panel a:not(.legacy-actions a) {
    color: var(--legacy-green-bright);
}

.legacy-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.legacy-category-grid article {
    border: 1px solid rgba(48, 168, 48, 0.65);
    padding: 18px;
    background: rgba(0, 20, 0, 0.45);
    box-shadow: inset 0 0 14px rgba(57, 255, 74, 0.06);
}

.legacy-final-panel {
    text-align: center;
}

.legacy-actions-bottom a {
    min-width: 190px;
}

.legacy-hero-centered {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.legacy-main-logo-zone {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.legacy-main-logo {
    width: min(760px, 92%);
    max-height: 260px;
    object-fit: contain;
    margin: 20px auto 24px auto;
    filter:
        drop-shadow(0 0 8px rgba(57, 255, 74, 0.75))
        drop-shadow(0 0 24px rgba(57, 255, 74, 0.35));
}

.legacy-main-logo-zone .legacy-subtitle {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}


/******************************* Podiums *******************************/
.palmares-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1rem;
}

.palmares-col {
  flex: 1 1 280px; /* prend la moitié si possible, sinon passe dessous */
  min-width: 0;
}

.podium {
  list-style: none;
  padding: 0;
  margin: 0.5rem auto 0;   /* auto = centrage horizontal */
  width: fit-content;       /* le bloc fait juste la taille de son contenu */
}

.podium li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 1.1rem;
}

.podium li:last-child {
  border-bottom: none;
}

.podium .rang {
  font-weight: bold;
  min-width: 3rem;
  color: gold;
}

.podium li:nth-child(2) .rang { color: silver; }
.podium li:nth-child(3) .rang { color: #cd7f32; }

.classement-complet-title {
    margin-top: 2rem;
    margin-bottom: 0;
}

.classement-complet-title a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    transition:
        color 0.25s ease,
        text-shadow 0.25s ease,
        transform 0.25s ease;
}

.classement-complet-title a:hover,
.classement-complet-title a:focus-visible {
    color: inherit;
    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.45),
        0 0 14px rgba(180, 180, 180, 0.30);
    transform: translateY(-2px);
}

.classement-complet-title a:focus-visible {
    outline: 2px rgba(255, 255, 255, 0.65);
    outline-offset: 6px;
    border-radius: 4px;
}

.classement-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    text-align: center;
}

.classement-table-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    overflow-x: auto;
}

.classement-table {
    width: min(100%, 900px);
    border-collapse: collapse;
    text-align: center;
}


/******************************* Contact *******************************/
.contact-bg {
    background: #0a0a0a;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}
.contact-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px;
}
.contact-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-top: 120px;
    position: relative;
}
.contact-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 1px solid rgba(255, 59, 48, 0.1);
    border-radius: 10px;
    z-index: -1;
}
.contact-info {
    flex: 1;
    max-width: 600px;
}
.contact-text {
    font-family: 'Montserrat', sans-serif;
    color: white;
    font-size: 20px;
    line-height: 1.6;
}
.highlight-box {
    background: rgba(255, 59, 48, 0.05);
    border-left: 4px solid #FF3B30;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}
.emphasis {
    font-size: 24px;
    color: #FF3B30;
    font-weight: 700;
}
.contact-methods {
    margin: 30px 0;
}
.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}
.contact-method i {
    color: #FF3B30;
    font-size: 20px;
}
.glow {
    color: #FF3B30;
    text-shadow: 0 0 10px rgba(255, 59, 48, 0.3);
}
.contact-form {
    width: 373px;
    display: flex;
    flex-direction: column;
    gap: 23px;
    background: transparent;
    padding: 50px 0;
    backdrop-filter: none;
}
.input-group {
    position: relative;
}
.input-group i {
    display: none;
}
.contact-form input,
.contact-form textarea {
    width: 373px;
    padding: 15px;
    background: white;
    border: 3.04px solid #FF3B30;
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    //color: #DFDFDF;
    color: #333333;
    border-radius: 0;
}
.contact-form textarea {
    height: 251px;
    resize: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #FF3B30;
    background: white;
    outline: none;
    box-shadow: none;
}
.contact-form button {
    background: transparent;
    border: 3.04px solid #FF3B30;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 31.89px;
    font-weight: 700;
    padding: 30.37px 48.59px;
    cursor: pointer;
    border-radius: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.contact-form button:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}
.contact-form button i {
    display: none;
}


/******************************* Mentions légales - Politique de confidentialité *******************************/
.legal-bg {
    background: linear-gradient(to bottom, #3C0A0A, #120C0C);
}
.legal-container h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: #BC181D;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 1px;
}
.legal-container h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    color: white;
}
.legal-text p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #FFFFFF;
}
.legal-text ul {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #FFFFFF;
}
.legal-container {
    max-width: 800px;
    margin: 160px auto 80px;
    padding: 40px;
    background-color: rgba(18, 12, 12, 0.95); /* fond unifié mais opaque */
    border-left: 4px solid #BC181D;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(188, 24, 29, 0.3);
}




/******************************* Responsive *******************************/
@media (max-width: 768px) {
    .masonry, .masonry2025, .masonry2026 {
        column-count: 1;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 7rem 2rem;
    }
}

@media (max-width: 768px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .editions-section {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .edition-home-visual {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .edition-2026-home-link {
        width: 100%;
        max-width: 100%;
    }

    .edition-2026-home-img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}

/* Media queries pour le header */
@media (max-width: 768px) {
    .header {
        padding: 0 20px;
        height: 100px;
    }

    .header-container {
        position: relative;
    }

    .logo-img {
        height: 60px;
    }

    .burger-menu {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 100%;
        right: auto;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        transition: left 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2000;
    }


    .nav.active {
        left: 0;
    }

    .nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .nav a {
        font-size: 1.2rem;
    }

    .dropdown-menu {
        position: static;
        background: transparent;
        border: none;
        padding: 1rem 0;
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu li {
        text-align: center;
    }

    .dropdown-menu a {
        padding: 0.5rem 0;
    }

    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-right {
        margin-top: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        padding: 12px 20px;
    }

    .logo-img {
        height: 45px;
    }

    .nav ul {
        gap: 2rem;
    }

    .nav a {
        font-size: 0.85rem;
    }
}

@media (min-width: 1025px) {
    .header {
        padding: 15px 30px;
    }

    .logo-img {
        height: 75px;
    }

    .nav ul {
        gap: 3rem;
    }

    .nav a {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .contact-wrapper {
        display: block;
    }
}

@media (max-width: 1024px) {
    .contact-form {
        width: 373px;
        max-width: 373px;
    }

    .contact-form input,
    .contact-form textarea {
        width: 100%;
    }
}


/* --- Responsive design --- */
@media (max-width: 768px) {
    .header-ctf {
        height: 18vh;
        padding: 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .logo-ctf {
        width: 60px;
        height: 60px;
    }

    .image {
        width: 100%;
        height: auto;
    }

    .content-block {
        flex-direction: column;
        align-items: center;
    }

    .text {
        max-width: 100%;
        padding: 0 1rem;
    }
}


/* Ajustement pour les petits écrans (version mobile) */
@media (max-width: 768px) {
    .legal-container {
        padding: 20px; /* Réduit le padding */
        margin: 20px; /* Espace entre la boîte et le bord de l'écran */
    }

    /* Aligne les éléments (image et texte) verticalement dans la section CTF */
    .index-content, .ctf-content {
        flex-direction: column;
        align-items: center; /* Centre horizontalement les éléments */
        gap: 24px; /* Espace entre l’image et le bloc texte/bouton */
    }

    /* Rend l’image responsive en largeur tout en limitant sa taille */
    .index-img, .ctf-img {
        width: 100%;         /* Prend toute la largeur disponible */
        max-width: 300px;    /* Mais ne dépasse pas 300px */
    }

    /* Permet au texte et au bouton d’avoir de l’espace sur les côtés */
    .ctf-info, .index-info {
        max-width: 100%;     /* Prend toute la largeur disponible */
        padding: 0 1rem;     /* Ajoute du padding latéral pour l’aération */
    }

    .editions-gallery {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    /* Centre les blocs lien (image + texte) */
    .editions-lien {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 90%;              /* Même largeur que l’image */
        max-width: 22rem;        /* Évite qu’elle soit trop large sur écran large */
    }

    .editions-gallery img {
        width: 100%;             /* Prend toute la largeur du bloc parent */
        height: 21.875rem;       /* ~350px */
        object-fit: cover;
        border-radius: 0.75rem;
    }

    .edition-year {
        text-align: center;
    }
}


@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .logo-edition {
        max-height: 120px;
    }

    .logo {
        width: 240px;
    }

    .content-block {
        flex-direction: column !important;
        align-items: center;
    }

    .image {
        width: 100%;
        height: auto;
        max-width: 400px;
        margin-bottom: 1rem;
    }

    .text {
        max-width: 100%;
        padding: 0 1rem;
    }

    /* Responsive pour les éléments de défis */
    .challenge-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .image-small {
        width: 100%;
        height: auto;
        max-width: 300px;
    }
}


/* Pour la page Legacy*/
@media (max-width: 900px) {
    .legacy-hero-grid,
    .legacy-grid,
    .legacy-category-grid {
        grid-template-columns: 1fr;
    }

    .legacy-hero-grid {
        gap: 20px;
        text-align: center;
    }

    .legacy-logo {
        width: 150px;
    }
}

@media (max-width: 768px) {
    main.legacy-main {
        padding: 120px 16px 50px 16px;
    }

    .legacy-terminal,
    .legacy-panel {
        padding: 22px;
    }

    .legacy-terminal {
        min-height: auto;
    }

    .legacy-terminal-topline {
        font-size: 0.78rem;
        letter-spacing: 0.1em;
    }

    .legacy-title-zone h1 em {
        display: block;
        margin-top: 12px;
    }

    .legacy-actions {
        flex-direction: column;
    }

    .legacy-actions a {
        width: 100%;
    }

    .legacy-bg .footer-right {
        flex-direction: column;
    }

    .legacy-main-logo {
        width: min(520px, 96%);
        max-height: 180px;
        margin-top: 14px;
        margin-bottom: 18px;
    }

}