/* -------------------------------------
   Cybercom Theme CSS
   A modern cybersecurity aesthetic
-------------------------------------- */

:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --bg-card: #151515;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --border-color: #333333;
    /* Primary & Secondary defined in base twig via theme config */
    --glow: 0 0 10px rgba(0, 255, 65, 0.5);
    --font-sans: 'Roboto Mono', monospace;
    --font-mono: 'Fira Code', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 600;
}
h3 {
    padding-top: 30px;
    margin-bottom: 10px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-shadow: 0 0 8px var(--primary-color);
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-link {
    font-size: 1.5rem;
    font-family: var(--font-mono);
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
}
.logo-link img {
    max-height: 50px;
}
.logo-link .accent {
    color: var(--primary-color);
    margin-right: 5px;
}
.logo-link .cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
    align-items: center;
}
.nav-menu li {
    position: relative;
    white-space: nowrap;
}
.nav-menu li a {
    color: var(--text-main);
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    display: block;
    padding: 10px 5px;
}
.nav-menu li.active > a, .nav-menu li a:hover {
    color: var(--primary-color);
    text-shadow: var(--glow);
}
.nav-menu .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: -20px;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    list-style: none;
    min-width: 220px;
    z-index: 1000;
    padding: 10px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
}
.nav-menu li.has-children:hover > .dropdown {
    display: block;
}
.nav-menu .dropdown li a {
    padding: 10px 20px;
    font-size: 0.85rem;
}
.nav-menu .dropdown li a:hover {
    background: rgba(0, 255, 65, 0.1);
}

/* Sections */
.modular-section {
    padding: 80px 0;
    border-bottom: 1px dashed var(--border-color);
}
#accueil {
    padding-top: 0;
}

.module-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.module-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 3px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Hero Module */
.modular-hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    animation: background-pulse 10s infinite ease-in-out;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        linear-gradient(to bottom, 
            var(--bg-dark) 0%, 
            transparent 20%, 
            transparent 80%, 
            var(--bg-dark) 100%
        ),
        radial-gradient(circle at center, rgba(10,10,10,0.2) 0%, rgba(5,5,5,0.8) 100%);
    z-index: 1;
}
.hero-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    color: #fff;
    line-height: 1.2;
}
.hero-text h2, .hero-text h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    color: #fff;
    line-height: 1.3;
}
.hero-text img {
    max-width: 100%;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 65, 0.3));
}
.hero-text p {
    font-size: 1.3rem;
    color: #f0f0f0;
    margin-bottom: 20px;
}
.hero-text a {
    display: inline-block;
    padding: 15px 40px;
    border: 2px solid var(--primary-color);
    background: rgba(0, 255, 65, 0.1);
    color: #fff;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 20px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3) inset;
    text-decoration: none;
    transition: all 0.3s;
}
.hero-text a:hover {
    background: var(--primary-color);
    color: var(--bg-darker);
    box-shadow: 0 0 30px var(--primary-color);
    text-shadow: none;
}
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-family: var(--font-mono);
    text-transform: uppercase;
    margin-top: 30px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2) inset;
}
.btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--primary-color);
}

/* Text Columns Module */
.columns-text {
    /* column-count is set inline */
}
.columns-text h3 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* Event Cards (Lists inside Text Columns) */
.columns-text ul {
    list-style: none;
    padding: 0;
}
.columns-text ul li {
    display: flex;
    align-items: center;
    position: relative;
    background: #0a0a0a;
    border: 1px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    gap: 30px;
    padding-right: 30px;
    font-size: 1.1rem;
    min-height: 90px;
    z-index: 1;
}
.columns-text ul li::before {
    content: '';
    position: absolute;
    top: -150%; left: -150%;
    width: 400%; height: 400%;
    background: conic-gradient(
        transparent, 
        rgba(0, 229, 255, 0.05) 20%, 
        rgba(0, 229, 255, 0.6) 40%, 
        rgba(0, 255, 65, 0.6) 60%, 
        rgba(0, 229, 255, 0.05) 80%, 
        transparent
    );
    animation: border-glow-rotate 8s infinite linear;
    z-index: -2;
    opacity: 0.25;
    transition: opacity 0.5s ease;
}
.columns-text ul li:hover::before {
    opacity: 1;
    animation-duration: 4s;
}
.columns-text ul li::after {
    content: '';
    position: absolute;
    top: 1px; left: 1px; right: 1px; bottom: 1px;
    background: #0c0c0c;
    border-radius: 11px;
    z-index: -1;
    transition: background 0.3s;
}
.columns-text ul li:hover::after {
    background: #111111;
}
.columns-text ul li:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 229, 255, 0.15);
}

/* Glowing Border Rotation Keyframes */
@keyframes border-glow-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrambled Character Styling */
.scramble-char {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    font-weight: bold;
}

/* Ensure scrambled chars are perfectly visible against hovered solid-color buttons */
.btn:hover .scramble-char,
.btn-primary:hover .scramble-char,
.button:hover .scramble-char,
.hero-text a:hover .scramble-char,
.hero-actions a:hover .scramble-char {
    color: inherit;
    text-shadow: inherit;
}
.columns-text ul li strong {
    align-self: stretch;
    background: rgba(0, 255, 65, 0.05);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    font-family: var(--font-mono);
    border-right: 1px solid var(--border-color);
    font-size: 1.2rem;
    text-align: center;
    min-width: 200px;
    box-sizing: border-box;
}

/* Features Module */
.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}
.feature-item {
    flex: 1 1 250px;
    max-width: 350px;
    background: var(--bg-card);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    transition: transform 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.feature-content h3 img {
    margin: 0 auto 15px auto;
    display: block;
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Blog Module */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    border-color: var(--primary-color);
}
.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-color);
}
.card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}
.card-content h3 a {
    color: #fff;
}
.card-content h3 a:hover {
    color: var(--primary-color);
}
.card-meta {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
}
.card-content p {
    color: #bbb;
    margin-bottom: 20px;
    flex: 1;
}
.btn-readmore {
    font-family: var(--font-mono);
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: bold;
    align-self: flex-start;
}
.btn-readmore:hover {
    text-shadow: var(--glow);
}

/* Image Block */
.modular-image-block {
    display: flex;
    align-items: center;
    gap: 50px;
}
.modular-image-block.align-right {
    flex-direction: row-reverse;
}
.image-col, .text-col {
    flex: 1;
}
.image-col img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.3s;
    filter: grayscale(100%) contrast(1.2);
}
.gallery-item:hover img {
    filter: grayscale(0%) contrast(1);
    box-shadow: 0 0 15px var(--primary-color);
}

/* Footer */
.site-footer {
    background: var(--bg-darker);
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
    text-align: center;
}
.site-footer h4 {
    color: var(--primary-color);
}

/* Responsive Logo prefix hiding to prevent wrapping */
@media (max-width: 768px), (min-width: 1025px) and (max-width: 1300px) {
    .logo-association {
        display: none;
    }
}

/* Mobile Responsive Optimizations */
@media (max-width: 1024px) {
    /* Header layout */
    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    /* Hamburger Menu Button */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
        z-index: 1001;
    }
    .mobile-menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: var(--primary-color);
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    .mobile-menu-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.open span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Mobile Nav Dropdown */
    .main-nav {
        position: absolute;
        top: 100%;
        left: -20px;
        right: -20px;
        width: calc(100% + 40px);
        background: rgba(10, 10, 10, 0.98);
        border-bottom: 2px solid var(--primary-color);
        display: none; /* Controlled by slideToggle */
        z-index: 1000;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
    }
    .nav-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 20px;
        gap: 5px;
    }
    .nav-menu li {
        width: 100%;
        text-align: left;
        white-space: normal;
    }
    .nav-menu li a {
        padding: 15px 10px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Mobile Dropdown Sub-menus */
    .nav-menu li.has-children .dropdown {
        position: static;
        display: none; /* expanded on click */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        width: 100%;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.3);
        padding-left: 15px;
        border-left: 2px solid var(--primary-color);
        margin: 5px 0;
    }
    .nav-menu li.has-children:hover > .dropdown {
        display: none;
    }

    /* Hero Typography */
    .hero-text h1 {
        font-size: 2.2rem;
    }
    .hero-text h2, .hero-text h3 {
        font-size: 1.6rem;
    }
    .hero-text p {
        font-size: 1.1rem;
    }
    .modular-hero {
        height: 60vh;
        min-height: 400px;
    }

    /* Event Cards vertical stack */
    .columns-text ul li {
        flex-direction: column;
        align-items: stretch;
        padding: 0 20px 20px 20px;
        gap: 15px;
        text-align: center;
    }
    .columns-text ul li strong {
        margin: 0 -20px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        border-radius: 12px 12px 0 0;
        padding: 15px;
        width: auto;
        min-width: 0;
    }

    /* Columns grids */
    .columns-grid {
        grid-template-columns: 1fr;
    }
    .modular-image-block {
        flex-direction: column !important;
    }

    /* Features */
    .features-grid {
        gap: 20px;
    }
    .feature-item {
        max-width: 100%;
    }

    /* Typography */
    .page-content h1 {
        font-size: 2.2rem;
    }
    .page-content h2 {
        font-size: 1.8rem;
    }
}

/* Forms Styling */
#form-contact,
form {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.form-field {
    margin-bottom: 25px;
}
.form-label label {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}
input:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    background: rgba(0, 255, 65, 0.05);
}
textarea {
    min-height: 150px;
    resize: vertical;
}
.buttons {
    margin-top: 35px;
}
button[type="submit"], input[type="submit"], input[type="button"] {
    display: inline-block;
    padding: 15px 40px;
    border: 2px solid var(--primary-color);
    background: rgba(0, 255, 65, 0.1);
    color: #fff;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3) inset;
    transition: all 0.3s;
    width: 100%;
}
button[type="submit"]:hover, input[type="submit"]:hover, input[type="button"]:hover {
    background: var(--primary-color);
    color: var(--bg-darker);
    box-shadow: 0 0 30px var(--primary-color);
}
.form-data p {
    color: #ff3333;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Page Content Typography (Headings, Margins, Images) */
.page-content h1 {
    text-align: center;
    font-size: 3rem;
    margin: 60px 0 40px 0;
    color: #fff;
}
.page-content h1::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--primary-color);
    margin: 20px auto 0;
    box-shadow: 0 0 10px var(--primary-color);
}
.page-content h2 {
    font-size: 2.2rem;
    margin: 60px 0 20px 0; /* Huge space before, smaller space after */
    color: var(--secondary-color);
}
.page-content h3 {
    font-size: 1.6rem;
    margin: 50px 0 15px 0;
    color: var(--primary-color);
}
.page-content h4, .page-content h5, .page-content h6 {
    margin: 40px 0 15px 0;
    color: #fff;
}
.page-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin: 20px 0;
}

/* Notices Plugin Styles */
.notices {
    padding: 20px;
    border-left: 5px solid #fff;
    background: rgba(255, 255, 255, 0.05);
    margin: 40px 0;
    border-radius: 0 4px 4px 0;
}
.notices p {
    margin: 0 !important;
}
.notices.warning, .notices.yellow {
    border-left-color: #ffb600;
    background: rgba(255, 182, 0, 0.1);
    color: #ffd04d;
}
.notices.info, .notices.blue {
    border-left-color: #00baff;
    background: rgba(0, 186, 255, 0.1);
    color: #66d4ff;
}
.notices.error, .notices.red, .notices.critical {
    border-left-color: #ff3333;
    background: rgba(255, 51, 51, 0.1);
    color: #ff6666;
}
.notices.success, .notices.green {
    border-left-color: var(--primary-color);
    background: rgba(0, 255, 65, 0.1);
    color: var(--primary-color);
}

/* Cyber Scanner Sweep */
.cyber-scanner {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}
.cyber-scanner::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent 5%, rgba(0, 229, 255, 0.8) 50%, transparent 95%);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.7), 0 0 30px rgba(0, 229, 255, 0.3);
    opacity: 0;
    animation: scanner-sweep 7s infinite ease-in-out;
}

@keyframes scanner-sweep {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { top: 100%; opacity: 0; }
}

/* Background Pulse Animation */
@keyframes background-pulse {
    0%, 100% {
        filter: brightness(0.85) contrast(1);
    }
    50% {
        filter: brightness(1.08) contrast(1.06);
    }
}

