:root {
    --bg-color: #0A0A0A;
    --text-color: #FFFFFF;
    --primary-color: #9D00FF;
    --secondary-color: #3C096C;
}
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Fira Code', sans-serif;
    overflow-x: hidden;
}
header {
    background: radial-gradient(ellipse at center, rgba(60, 9, 108, 0.2) 0%, #0A0A0A 70%);
}
#about {
  min-height: 100vh;      
  display: flex;          
  align-items: center;   
  padding-top: 0;         
  padding-bottom: 0;
}
#about,
#krhackademy,
#activities,
#partenaires {
    min-height: 100vh;      
    display: flex;          
    flex-direction: column; 
    justify-content: center;
}
#activites {
    cursor:auto;
}
h1, h2, h3, .font-mono {
    font-family: 'Space Mono', monospace;
}
.text-primary { color: var(--primary-color); }
.bg-primary { background-color: var(--primary-color); }
.border-primary { border-color: var(--primary-color); }
.ti-cursor {
    color: var(--primary-color);
    animation: blink 0.5s infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.content-container {
    position: relative;
    z-index: 1;
}

.oval-background {
  background: radial-gradient(ellipse at center, #9D00FF, #000000 70%);
  border-radius: 50%;
  opacity: 20%;
}

.section-padding {
    padding: 6rem 1.5rem;
}
@media (min-width: 768px) {
    .section-padding {
        padding: 8rem 2rem;
    }
}
.activity-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--secondary-color);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.activity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 25px rgba(157, 0, 255, 0.5);
}
.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(157, 0, 255, 0.4);
}
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.cta-button {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    transition: color 0.3s ease;
}
.cta-button:hover {
    color: var(--text-color);
    text-shadow: 0 0 10px var(--primary-color);
}
.cta-button span {
    position: absolute;
    display: block;
}
.cta-button span:nth-child(1) {
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color));
    animation: btn-anim1 1.5s linear infinite;
}
@keyframes btn-anim1 {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}
.cta-button span:nth-child(2) {
    top: -100%;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--primary-color));
    animation: btn-anim2 1.5s linear infinite;
    animation-delay: .375s
}
@keyframes btn-anim2 {
    0% { top: -100%; }
    50%, 100% { top: 100%; }
}
.cta-button span:nth-child(3) {
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(270deg, transparent, var(--primary-color));
    animation: btn-anim3 1.5s linear infinite;
    animation-delay: .75s
}
@keyframes btn-anim3 {
    0% { right: -100%; }
    50%, 100% { right: 100%; }
}
.cta-button span:nth-child(4) {
    bottom: -100%;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(360deg, transparent, var(--primary-color));
    animation: btn-anim4 1.5s linear infinite;
    animation-delay: 1.125s
}
@keyframes btn-anim4 {
    0% { bottom: -100%; }
    50%, 100% { bottom: 100%; }
}
a:hover .fa-brands,
a:hover .fa-solid,
button:hover {
    color: var(--primary-color);
    transition:300ms;
    cursor:pointer;
}
.is-hidden {
    display: none;
}

#back-to-top {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

#back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.5s;
}

#archive-toggle-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
}



@keyframes fadeInAfterDelay {
    0%, 50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.scroll-chevron-down {
    opacity: 0;
}

header .scroll-chevron-down {
    animation: fadeInAfterDelay 1s ease-in-out forwards;
}

.fade-in-section.is-visible .scroll-chevron-down {
    animation: fadeInAfterDelay 1s ease-in-out forwards;
}






/* ====================================================================== */
/* ==================== STYLE DU FOOTER KR[HACK]EN ==================== */
/* ====================================================================== */

/* --- Variables de Thème --- */
/* Modifiez ces variables pour adapter le footer au design de votre site. */
:root {
    --footer-bg-color: #1a1a1a;
    --footer-text-color: #cccccc;
    --footer-heading-color: #ffffff;
    --footer-link-color: #00aaff;
    --footer-link-hover-color: #0077cc;
    --footer-border-color: #333333;
}

#footer{
    padding-left:  5%;
    padding-right: 5%;
}

/* --- Style de base du footer --- */
.krhacken-footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    padding: 40px 20px;
    font-family: sans-serif;
    line-height: 1.6;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-heading {
    color: var(--footer-heading-color);
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--footer-border-color);
    padding-bottom: 10px;
}

.footer-about p {
    margin: 0 0 10px;
}

/* --- Style des listes de liens --- */
.social-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-list li {
    margin-bottom: 10px;
}

.social-list a {
    color: var(--footer-link-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px; /* Espace entre l'icône et le texte */
}

.social-list a:hover,
.social-list a:focus {
    color: var(--footer-link-hover-color);
    text-decoration: underline;
}

/* --- Style du bouton et de la section d'archives --- */
.archive-toggle {
    background-color: transparent;
    color: var(--footer-link-color);
    border: 1px solid var(--footer-link-color);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease, color 0.3s ease;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.archive-toggle:hover,
.archive-toggle:focus {
    background-color: var(--footer-link-color);
    color: var(--footer-bg-color);
}

/* Icône du bouton (flèche) */
.toggle-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.3s ease;
}

/* Rotation de l'icône quand la section est ouverte */
.archive-toggle[aria-expanded="true"].toggle-icon {
    transform: rotate(180deg);
}

/* Conteneur de la liste d'archives */
.archive-list-container {
    /* Animation de déploiement fluide */
    display: grid;
    grid-template-rows: 0fr; /* Commence contracté */
    transition: grid-template-rows 0.4s ease-in-out;
    overflow: hidden; /* Nécessaire pour l'animation */
}

.archive-list-container.is-open {
    grid-template-rows: 1fr; /* Se déploie à sa hauteur naturelle */
    margin-top: 15px;
}

/* Contenu qui sera affiché/masqué */
.archive-list-container > nav {
    min-height: 0;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
   .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
   .footer-section {
        width: 100%;
        min-width: unset;
    }
}




/* ====================================================================== */
/* =================== STYLE PAGE ÉVÉNEMENTS ================== */
/* ====================================================================== */

/* --- Style des cartes pour les événements à venir --- */
.event-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--secondary-color);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 25px rgba(157, 0, 255, 0.5);
}

/* --- Style de la chronologie (Timeline) --- */
.timeline-container {
    position: relative;
    padding: 2rem 0;
}

/* La ligne verticale centrale */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background-color: var(--secondary-color);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

/* Le cercle sur la ligne */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: var(--bg-color);
    border: 4px solid var(--primary-color);
    top: 22px;
    border-radius: 50%;
    z-index: 1;
}

/* Items sur la gauche */
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 30px;
    text-align: right;
}
.timeline-item:nth-child(odd)::after {
    right: -9px;
}

/* Items sur la droite */
.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 30px;
}
.timeline-item:nth-child(even)::after {
    left: -9px;
}

/* Contenu de chaque item */
.timeline-content {
    padding: 20px 30px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--secondary-color);
    position: relative;
    border-radius: 8px;
}

/* Responsive pour la chronologie sur mobile */
@media screen and (max-width: 768px) {
    .timeline-container::before {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    .timeline-item::after {
        left: 22px; /* Positionne le cercle sur la ligne */
    }
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 22px;
    }
}


/* ====================================================================== */
/* =================== BOUTON RETOUR FIXE =================== */
/* ====================================================================== */

#back-to-home-btn {
    position: fixed;
    top: 2rem; /* 32px */
    left: 2rem; /* 32px */
    z-index: 50; /* Pour s'assurer qu'il est au-dessus des autres éléments */

    display: flex;
    align-items: center;
    gap: 0.5rem; /* Espace entre l'icône et le texte */
    
    padding: 0.75rem 1.25rem; /* 12px 20px */
    
    background-color: rgba(255, 255, 255, 0.03); /* Même fond que les cartes */
    color: var(--text-color);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    
    font-family: 'Space Mono', monospace; /* Police cohérente avec les titres */
    text-decoration: none;
    font-size: 0.9rem;
    
    /* Transition douce pour l'effet de survol */
    transition: all 0.3s ease-in-out;
}

#back-to-home-btn:hover {
    cursor: pointer;
    color: var(--primary-color); /* La couleur primaire violette au survol */
    border-color: var(--primary-color);
    transform: translateY(-3px); /* Effet de lévitation subtil */
    box-shadow: 0 0 20px rgba(157, 0, 255, 0.5); /* Lueur violette assortie au reste du site */
}

/* Ajustement pour les petits écrans */
@media (max-width: 640px) {
    #back-to-home-btn {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 1rem;
    }
}
