/* --------------------------------------------------------------*/
/* Global variables ---------------------------------------------*/
/* --------------------------------------------------------------*/

:root  {
    --corner-radius: 6px;
    --color-one: #c3410f;
    --color-one-dark: #7d1a00;
    --color-one-light: #ffcbb0;
    --color-two: #de7d11;
    --color-two-dark: #9c4600;
    --color-two-light: #fdedd4;
    --color-warm-dark-grey: #19110f;
}

/* --------------------------------------------------------------*/
/* General ------------------------------------------------------*/
/* --------------------------------------------------------------*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI";
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #000000;
    /*background-image: url(../img/ui/background3.png);*/
}

main {
    flex-grow: 1; /* S'assure que la partie principale occupe tout l'espace, pour pousser le footer en bas de page */
}

footer {
    display: block;
    background-color: var(--color-one-dark);
    margin-top: auto;
}

.social-media-icon {
    vertical-align: middle;
    height: 32px;
    margin: 0 10px 0 0;
    border: none;
    border-style: none;
}

.sponsor-logo {
    display: block;
    margin: 20px auto 10px auto;
    width: 200px;
}

/* --------------------------------------------------------------*/
/* TEXT ---------------------------------------------------------*/
/* --------------------------------------------------------------*/

h1,
h2 {
    text-align: center;
    padding: 40px 0;
    font-size: 1.5rem;
    font: bold;
    color: white;
}

h2 {
    max-width: 800px;
    margin: 40px auto 10px auto;
    padding: 0 40px;
    font-size: 1.3rem;
    text-align: left;
}

p {
    max-width: 800px;
    margin: 0 auto 10px auto;
    padding: 0 40px;
    text-align: justify;
    line-height: 1.6;
    color: white;
}

p.left-aligned {
    text-align: left;
}

p.center-aligned {
    text-align: center;
}

p.expo-list {
    font-size: 2rem;
    text-align: center;
}

a:link {color: var(--color-two)}
a:visited {color: var(--color-one)}

.highlight-box {
    background-color: var(--color-two-light);
    color: black;
    padding: 10px;
    margin: 25px auto;
    border-radius: var(--corner-radius);
    max-width: 675px;
}

.highlight-box p {
    color: black;
    margin: 10px;
    padding: 0;
}

.grey-box {
    background-color: #232323;
    padding-top: 20px;
    padding-bottom: 40px;
    margin-top: 40px;
}

.highlight-box h1,
.highlight-box h2 {
    color: black;
    margin: 10px;
    padding: 0;
    text-align: center;
}

@media (max-width: 675px) {
    .highlight-box {
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    h2,
    p {
        padding: 0 20px;
        text-align: left;
    }
}

.separator {
    display: block;
    width: min(400px, 100% - 100px);
    height: 2px;
    margin: 25px auto;
    background: white;
}

/* --------------------------------------------------------------*/
/* NAVBAR -------------------------------------------------------*/
/* --------------------------------------------------------------*/

.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    width: 100%;
    position: sticky;
    top: 0;
    background: opaque;
    /* background-color: black;*/
    background-image: url("../img/ui/NavBar_background_3.jpg");
    z-index: 999;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 2rem;
    max-width: 1600px;
}

.navbar-logo {
    cursor: pointer;
}

.navbar-container .navbar-menu {
    display: flex;
    text-align: center;
    gap: 1.5rem;
    list-style: none;
}

.navbar-container .navbar-menu li a {
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    font-weight: 350;
    padding: 1px 3px 4px 3px;
    border-radius: var(--corner-radius);
    border: 2px solid transparent;
    transition: all 0.7s ease;
    white-space: nowrap;
}

.navbar-container .navbar-menu li a:hover {
    color: white;
    background: rgba(0, 0, 0, 0);
    border: 2px solid;
    border-color: var(--color-two-light);
    opacity: 100;
}

.navbar-container .navbar-menu li a.active {
    color: black;
    background-color: var(--color-two-light);
    border: 2px solid transparent;
}

.navbar-toggle {
    display: none;
    background: transparent;
    padding: 10px;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: white;
    transition: all 0.3s ease-in-out;
}

/* Responsive Style */
@media (max-width: 1050px) {
    .navbar {
        backdrop-filter: none;
    }
    
    .navbar-container .navbar-menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.7rem !important;
        position: absolute;
        height: 100vh;
        width: 250px;
        top: 0;
        right: 0;
        padding: 5rem 1.5rem;
        background-color: var(--color-one-dark);
    }
    
    .navbar-container .navbar-menu.active {
        display: flex;
    }
    
    .navbar-toggle {
        display: block;
        z-index: 999;
    }
    
    /* transform hamburger to X */
    .navbar-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .navbar-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .navbar-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 50px;
    }
    
    .navbar-container {
        padding: 0 1rem;
    }
    
    .navbar-logo {
        max-width: 200px;
    }
    
    .navbar-container .navbar-menu {
        font-size: 1.2rem;
        padding: 20px 15px;
    }
}

/* --------------------------------------------------------------*/
/* FOOTER BAR ---------------------------------------------------*/
/* --------------------------------------------------------------*/

footer {
    display: flex;
    align-items: center;
    /*justify-content: space-between;*/
    justify-content: end;
    padding: 0.75rem;
    margin-top: 40px;
    background-color: var(--color-warm-dark-grey);
}

footer .social-media-icon {
    height: 25px;
    margin: 5px;
}

/* --------------------------------------------------------------*/
/* EVENTS LIST --------------------------------------------------*/
/* --------------------------------------------------------------*/

.event-list {
    /* display: flex; */
    /* flex-direction: column; */
    margin-top: 0;
}

.event {
    display: flex;
    align-items: stretch; /* This makes both boxes in each event stretch to the same height */
    max-width: 800px;
    padding: 4px 15px;
    margin-left: auto;
    margin-right: auto;
}

.event.past {
    display: none; /* hidden by default */
}

.event.past.visible {
    display: flex;  /* visible if "show past events" button pressed */
}

.event-date {
    display: flex; /* Make the date box a flex container */
    align-items: center; /* Vertical alignment */
    justify-content: center; /* Horizontal alignment */
    background-color: var(--color-one);
    
    color: #fff;
    padding: 12px 15px;
    border-radius: var(--corner-radius) 0 0 var(--corner-radius);
    font-weight: bold;
    margin-right: 0;
    min-width: 130px;
}

.event-date.activity {background-color: var(--color-two);}

.event-date.past {background-color: #ff0000;}

.event-date.special {background-color: #e96b06;}

.event-description {
    flex: 1; /* This makes the event description box take the remaining width */
    display: flex; /* So that it can align vertically */
    align-items: center; /* Vertical alignment */
    background-color: var(--color-two-light);
    padding: 8px 15px;
    border-radius: 0 var(--corner-radius) var(--corner-radius) 0;
    color: black;
}

.event-description.activity {background-color: var(--color-two-light);}

.event-description.special {background-color: #ffefcf;}

.event-description.relache {background-color: #e16e34;}

@media screen and (max-width: 600px) {
    .event {flex-direction: column;}
    .event-date {border-radius: var(--corner-radius) var(--corner-radius) 0 0; min-width: 0;}
    .event-description {border-radius: 0 0 var(--corner-radius) var(--corner-radius);}
    .event-description.relache {justify-content: center;}
}

/* --------------------------------------------------------------*/
/* GALERIES -----------------------------------------------------*/
/* --------------------------------------------------------------*/

.grid {
    display: grid;
    grid-template-columns: repeat(4, 200px);
    justify-content: center;
    grid-gap: 10px;
}

.lbimg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    display: block;
}

.lbimg-full {
    cursor: pointer;
}

#lightbox {
    position: fixed;
    z-index: 1000;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    cursor: default;
}

#lightbox.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-transform: uppercase;
}

#lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border: 15px solid white;
    pointer-events: auto;
    user-select: none;
}

#lightbox img.social-media-icon {
    border: none;
    margin: 0 0 0 10px;
    width: 24px;
}

#lightbox img.lightbox-button {
    border: 16px solid transparent;
    width: 64px;
    cursor: pointer;
}

#lightbox img.lightbox-button.previous {
    position: absolute;
    transform: rotate(-180deg);
    left: 0%;
}

#lightbox img.lightbox-button.next {
    position: absolute;
    right: 0%;
}

#lightbox img.lightbox-button.close {
    position: absolute;
    right: 20px;
    top: 60px
}

@media screen and (max-width: 850px) {
    .grid {
        grid-template-columns: repeat(3, 200px);
    }
}

@media screen and (max-width: 700px) {
    .grid {
        grid-template-columns: repeat(2, 200px);
    }
    
    #lightbox img {
        border: 10px solid white;
    }
}

@media screen and (max-width: 450px) {
    .grid {
        grid-template-columns: repeat(2, 150px);
    }
    
    #lightbox img {
        border: 5px solid white;
    }
    
    #lightbox img.lightbox-button {
        border: none;
        width: 32px;
    }
}