@import url('https://fonts.googleapis.com/css2?family=Alumni+Sans+SC:ital,wght@0,100..900;1,100..900&family=Saira+Stencil+One&display=swap');

:root {
    /* COLORS */
    --mc: #b61e1e; /* Main color */
    --lc: #fff; /* Light color */
    --dc: #333; /* Dark color */
    --vc: green; /* Valid color */
    --rc: red; /* Reject color */
    --fdc: #00008B; /* Form details color */
    /* FONTS */
    --fa: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; /* Font General */
    --ft: "Saira Stencil One", "Segoe UI"; /* Font Title */
    --fm: "Alumni Sans SC", "Segoe UI"; /* Font Majuscules */
}

/* INITIALISATION */

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}
/* MAIN */

main {
    padding-top: 100Px;
}

/* NAV */

nav {
    position: fixed;
    right: 0px;
    left: 0px;
    top: 0;
    background-color: var(--lc);
    padding: 12.5px 20px 12.5px 10px;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
    font-family: var(--fa);
    z-index: 2; 
    &.navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        .left-side-nav {
            display: flex;
            align-items: center;
            img {
                width: 80px;
                margin-right: 7.5px;
            }
            h1 {
                font-weight: 800;
                text-transform: uppercase;
                letter-spacing: 1px;
                transition: 0.2s ease-in-out;
                font-family: var(--ft)!important;
                a {
                    color: var(--mc);
                    text-decoration: none;
                }
                &:hover {
                    transform: translateX(10px);
                }
            }
        }
        .right-side-nav {
            display: flex;
            align-items: center;
            gap: 20px;
            .part-languages {
                .dropdown {
                    position: relative;
                    display: inline-block;
                    button {
                        background: none;
                        color: var(--mc);
                        min-width: 80px;
                        max-width: 120px;
                        width: auto;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        padding: 7.5px 10px;
                        gap: 10px;
                        border: none;
                        cursor: pointer;
                        border-radius: 8px;
                        transition: 0.3s ease;
                        .left {
                            display: flex;
                            align-items: center;
                            gap: 7.5px;
                            img.flag-icon {
                                width: 45px;
                                height: 30px;
                            }
                        }
                        img.arrow-icon {
                            width: 22px;
                            height: auto;
                        }
                    }
                    .dropdown-content {
                        display: none;
                        position: absolute;
                        background-color: var(--lc);
                        min-width: 80px;
                        max-width: 120px;
                        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
                        margin-top: 1px;
                        z-index: 1;
                        overflow: hidden;
                        a {
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            padding: 10px;
                            transition: 0.2s;
                            background: transparent;
                            img.flag-icon {
                                width: 45px;
                                height: 30px;
                            }
                            &:hover {
                                background: rgba(182, 30, 30, 0.1);
                            }
                        }
                    }
                    &:hover .dropdown-content,
                    &:focus .dropdown-content {
                        display: block;
                    }
                }
            }
            .part-account {
                .dropdown {
                    position: relative;
                    display: inline-block;
                    button {
                        box-shadow: 0 0 0 0.6px var(--mc);
                        background: none;
                        color: var(--mc);
                        min-width: 200px;
                        max-width: 300px;
                        width: auto;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        padding: 7.5px 5px;
                        gap: 15px;
                        border: none;
                        cursor: pointer;
                        .left {
                            display: flex;
                            align-items: center;
                            gap: 7.5px;
                            font-size: 17px;
                            img {
                                width: 40px;
                                height: 40px;
                                border-radius: 50%;
                                transition: 0.3s ease;
                            }
                        }
                        &:hover .left img {
                            transform: rotate(360deg);
                        }
                    }
                    .dropdown-content {
                        display: none;
                        position: absolute;
                        background-color: var(--lc);
                        min-width: 200px;
                        max-width: 300px;
                        box-shadow: 0px 8px 16px rgba(0,0,0,0.15);
                        margin-top: 1px;
                        z-index: 1;
                        a {
                            color: var(--mc);
                            padding: 12.5px 15px;
                            text-decoration: none;
                            display: block;
                            transition: 0.2s;
                            &:hover {
                                background: rgba(182, 30, 30, 0.1);
                                padding: 12.5px 15px 12.5px 20px;
                            }
                            &.login {
                                cursor: pointer;
                            }
                            &#admin {
                                color: var(--fdc);
                            }
                            &#logout {
                                color: var(--rc);
                            }
                        }
                    }
                    &:hover .dropdown-content,&:focus .dropdown-content {
                        display: block;
                    }
                }
            }
            .part-menu {
                display: flex;
                flex-direction: column;
                align-items: center;
                cursor: pointer;
                img {
                    height: 45px;
                    width: auto;
                }
                .menu-label {
                    margin-top: -10px;
                    font-size: 14px;
                    color: var(--mc);
                    text-transform: uppercase; 
                    font-weight: 600;
                }
            }
        }
        .popup-account {
            position: fixed;
            top: -100%;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            transition: top 0.3s ease;
            z-index: 1;
            form {
                width: 30%;
                background: var(--lc);
                margin: 0 auto;
                padding: 20px 30px;
                color: var(--mc);
                font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
                border-radius: 10px;
                box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
                position: relative;
                .close-popup-account {
                    position: absolute;
                    top: -2.5px;
                    right: 15px;
                    font-size: 30px;
                    cursor: pointer;
                    color: grey;
                    &:hover {
                        color: var(--rc);
                    }
                }
                h3 {
                    text-transform: uppercase;
                    font-size: 22px;
                    text-align: center;
                }
                .input-group {
                    position: relative;
                    margin-bottom: 20px;
                    input {
                        width: 100%;
                        padding: 10px 15px;
                        font-size: 16px;
                        border: none;
                        outline: 1px solid var(--mc);
                        background: transparent;
                        color: var(--mc);
                        &:focus {
                            border-bottom: 1.5px solid var(--mc);
                            transition: 0.1s;
                        }
                    }
                    label {
                        position: absolute;
                        top: 7.5px;
                        left: 7.5px;
                        color: var(--mc);
                        background: white;
                        padding: 0 4px;
                        transition: 0.2s ease;
                        pointer-events: none;
                    }
                    input:focus+label,
                    input:not(:placeholder-shown)+label {
                        top: -10px;
                        left: 10px;
                        font-size: 12px;
                        color: var(--mc);
                    }  
                    .password-container {
                        position: relative;
                        
                    } 
                    .password-icon {
                        position: absolute;
                        top: 50%;
                        right: 10px;
                        transform: translateY(-50%);
                        cursor: pointer;
                        width: 24px;
                        height: 24px;
                    }
                }
                button {
                    all:unset;
                    border: none;
                    outline: 1.5px solid var(--vc);
                    width: 100%;
                    color: var(--vc);
                    text-align: center;
                    cursor: pointer;
                    height: 35px;
                    transition: all ease 0.3s;
                    text-transform: uppercase;
                    &:hover {
                        background: var(--vc);
                        color: var(--lc);
                    }
                }
                .box-links {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;
                    font-size: 14px;
                    margin-top: 2px;
                    a {
                        color: var(--fdc);
                    }
                }
                .bloc-info {
                    background: rgba(0, 0, 0, 4%);
                    width: 100%;
                    margin-bottom: 10px;
                    padding: 5px 7.5px;
                    background: rgba(0, 0, 0, 4%);
                    color: var(--mc);
                    text-align: center;
                    font-size: 14px;
                    margin-top: 5px;
                    a {
                        color: var(--vc);
                    }
                }
            }
        }
        #menu {
            width: 300px;
            height: 100vh;
            background-color: rgba(255, 255, 255);
            position: fixed;
            top: 0;
            right: -300px;
            transition: right 0.3s ease-in-out;
            box-shadow: 5px 5px 10px 4px rgba(0, 0, 0, 0.2);
            padding-top: 50px;
            border-left: 1.5Px solid var(--mc);
            overflow-y: auto;
            #closeMenu {
                position: absolute;
                top: -5px;
                right: 15px;
                cursor: pointer;
                color: var(--mc);
                font-size: 35px; 
                transition: 0.1s ease-in-out;
                &:hover {
                    font-size: 40px;
                }
            }
            a {
                text-decoration: none;
            }
            .menu-item {
                color: var(--mc);
                padding: 10px;
                border-bottom: 1px solid var(--mc);
                cursor: pointer;
                position: relative;
                transition: 0.15s;
                display: flex;
                align-items: center;
                justify-content: space-between;
                /* a {
                    text-decoration: none;
                    color: var(--mc);
                } */
                &:hover {
                    background: rgba(182, 30, 30, 0.1);
                }
                .part-menu-item {
                    display: flex;
                    align-items: center;
                    img {
                        height: 20px;
                        width: 20px;
                        margin-right: 7.5px;
                    }
                    
                }
            }
            .submenu {
                overflow: hidden;
                max-height: 0;
                transition: max-height 0.3s ease-in-out;
                background-color: rgba(255, 255, 255);
                padding-left: 15px;
            }
            .submenu-active {
                max-height: 500px;
            }
            .arrow-img {
                float: right;
                transition: transform 0.3s ease-in-out;
                width: 16px;
                height: 16px;
            }
            .arrow-down {
                transform: rotate(180deg);
            }
        
    }
    }
}

/* COOKIES */

body.noscroll {
  overflow: hidden;
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}
.hidden {
    display: none !important;
}
.cookie-modal {
    background: var(--lc);
    color: var(--mc);
    padding: 10px 30px;
    border-radius: 10px;
    width: 50%;
    position: relative;
    .reject-button {
        width: 100%;
        display: flex;
        justify-content: end;
        button {
            all: unset;
            font-size: 14.5px;
            color: rgba(150, 150, 150);
            transition: all 0.2s ease-in-out;
            &:hover {
            cursor: pointer;
                color: rgba(110, 110, 110);
                transform: translateX(5px);
            }
        }
    }
    .header-popup {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: center;
        justify-content: center;
        gap: 10px;
        img {
            width: 200px;
            height: auto;
        }
    }
    p {
        text-align: justify;
        padding: 10px 0;
    }
    .buttons-popup {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: end;
        align-items: center;
        gap: 20px;
        button {
            all: unset;
            padding: 10px;
            width: 125px;
            font-size: 15px;
            cursor: pointer;
            text-align: center;
            &#more-info {
                background: rgba(0, 0, 0, 4%);
                outline: 1px solid rgba(0, 0, 0, 10%);
                transition: 0.2s ease-in-out;
                &:hover {
                    background: rgba(0, 0, 0, 10%);
                    color: var(--dc);
                }
            }
            &#accept-cookies {
            border: 1px solid var(--vc);
            color: var(--vc);
            transition: 0.2s ease-in-out;
            &:hover, &:focus {
                box-shadow: inset 9.7em 0 0 0 var(--vc);
                color: var(--lc);
            }
            }
        }
    }
}
.cookie-modal-details {
    height: 400px;
    width: 52%;
    position: relative;
    .close-details {
        position: absolute;
        top: 2px;
        right: 17.5px;
        font-size: 25px;
        cursor: pointer;
        color: rgba(0, 0, 0, 20%);
        transition: 0.2s ease;
        &:hover {
            color: var(--rc);
            font-size: 30px;
        }
    }
    .header-popup {
        img {
            width: 100px;
            height: auto;
        }
    }
    .buttons-popup {
        position: absolute;
        width: 70%;
        left: 50%;
        transform: translate(-50%);
        bottom: 20px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        button {
            all: unset;
            padding: 10px;
            width: 125px;
            font-size: 15px;
            cursor: pointer;
            text-align: center;
            &#reject-details {
                outline: 1px dashed rgba(0, 0, 0, 20%);
                color: rgba(0, 0, 0, 30%);
                transition: 0.2s ease-in-out;
                width: 200px;
                &:hover {
                    outline: 1px dashed rgba(0, 0, 0, 50%);
                    border-radius: 10px;
                    color: rgba(0, 0, 0, 50%);
                }
            }
            &#accept-details {
                border: 1px solid var(--vc);
                color: var(--vc);
                transition: 0.2s ease-in-out;
                &:hover, &:focus {
                    box-shadow: inset 9.7em 0 0 0 var(--vc);
                    color: var(--lc);
                }
            }
        }
    }
}

/* GO TOP */

#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: 1px solid var(--mc);
    background-color: var(--lc);
    cursor: pointer;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.1s ease-in-out, box-shadow 0.1s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    img {
        width: 25px;
        height: auto;
        transition: transform 0.1s ease-in-out;
    }
    &:hover {
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
        img {
            transform: translateY(-5px);
        }
    }
}

/* LOADER */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--lc);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    .loader-content {
        text-align: center;
        .loader-title {
            margin-bottom: 20px;
            color: var(--mc);
        }

        .loader-image img {
            width: 150px;
            height: auto;
            animation: spin 2s linear infinite;
        }
        .progress-container {
            width: 100%;
            background-color: #e0e0e0;
            margin: 20px 0;
            border-radius: 4px;
            overflow: hidden;
            .progress-bar {
                width: 0%;
                height: 20px;
                background-color: var(--mc);
                text-align: center;
                line-height: 20px;
                color: white;
            }
            .progress-text {
                margin-top: 10px;
                font-size: 20px;
                color: var(--mc);
            }
        }
    }
}

/* FOOTER */

footer {
    background: var(--mc);
    color: var(--lc);
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 15px 30px 2px 30px;
    margin-top: 20px;
    font-family: var(--fm);
    .container-links {
        display: flex;
        align-items:start;
        justify-content:space-between;
        flex-direction: row;
        .part-links {
            .title-footer {
                display: flex;
                align-items: center;
                text-transform: uppercase;
                font-size:20px;
                img {
                    margin-right: 7.5px;
                    height: 20px;
                    width: 20px;
                }
            }
            .links-footer {
                display: flex;
                flex-direction: column;
                line-height: 25x;
                margin-top: 10px;
                font-size: 18px;
                a {
                    text-decoration: none;
                    color: var(--lc);
                    &::before {
                        content: "›";
                        margin-right: 7.5px;
                        display: inline-block;
                        transition: transform 0.3s ease;
                    }
                    &:hover::before {
                            transform: translateX(5px);
                    }
                }
                .media-line {
                    display: flex;
                    align-items: center;
                    margin-bottom: 10px;
                    .media-text {
                        &::before {
                            content: "";
                        }
                    }
                    img {
                        margin-right: 5px;
                        transition: 0.2s ease-in-out;
                    }
                    &:hover {
                        img {
                            transform: translateX(110px);
                        }
                    }
                }
                #oyama {
                    width: 200px;
                }
            }
        }
    }
    .container-bottom {
        margin-top: 5px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        font-family: var(--fa);
        .footer-bottom {
            color: rgb(130, 130, 130);
            font-size: 14px;
            transition: 0.2s ease-in-out;
            &:hover {
                color: var(--lc);
            }
            a {
                color: rgb(130, 130, 130);
                display: inline-block;
                transition: 0.2s ease-in-out;
                &:hover {
                    transform: translateY(-5px);
                    color: var(--lc);
                }
            }
        }
    }
    &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 92%;
        background-image: url('https://basse-normandie-kyokushin.fr/assets/img/images/logo-team.png');
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.3; 
        z-index: 0;
        pointer-events: none;
    }
    > * {
        position: relative;
        z-index: 1;
    }                                                            
}

/* RESPONSIVE */

@media (max-width: 768px) {
    nav {
        padding: 7.5px 10px 7.5px 10px;
        &.navbar {
            .left-side-nav {
                img {
                    display: none;
                }
                h1 {
                    font-weight: 500;
                    font-size: 22px;
                    &:hover {
                        transform: none;
                    }
                }
            }
            .right-side-nav {
                gap: 15px;
                .part-languages {
                    .dropdown {
                        position: relative;
                        display: inline-block;
                        button {
                            min-width: 60px;
                            padding: 7.5px 5px;
                            gap: 5px;
                            .left {
                                gap: 5px;
                                img.flag-icon {
                                    width: 40px;
                                    height: 25px;
                                }
                            }
                            img.arrow-icon {
                                width: 20px;
                            }
                        }
                        .dropdown-content {
                            min-width: 60px;
                            a {
                                padding: 7.5px;
                                img.flag-icon {
                                    width: 40px;
                                    height: 25px;
                                }
                            }
                        }
                    }
                }
                .part-account {
                    .dropdown {
                        button {
                            min-width: 50px;
                            max-width: 75px;
                            padding: 5px;
                            gap: 12.5px;
                            .left {
                                gap: 0;
                                .user-name {
                                    display: none;
                                }
                                img {
                                    width: 30px;
                                    height: 30px;
                                    border-radius: 50%;
                                }
                            }
                            &:hover .left img {
                                transform: none;
                            }
                        }
                        .dropdown-content {
                            margin: 1px 0 0 -100px;
                        }
                    }
                }
                .part-menu {
                    img {
                        height: 35px;
                    }
                    .menu-label {
                        margin-top: -8px;
                        font-size: 13px;
                        font-weight: 500;
                    }
                }
            }
            .popup-account {
                form {
                    width: 80%;
                    padding: 10px 20px;
                    h3 {
                        font-size: 20px;
                    }
                    .box-links {
                        flex-direction: column-reverse;
                        justify-content: center;
                    }
                }
            }
        }
    }
    .cookie-modal {
        padding: 10px 10px;
        width: 90%;
        .header-popup {
            gap: .5px;
            img {
                width: 100px;
            }
        }
        .buttons-popup {
            gap: 10px;
        }
    }
    .cookie-modal-details {
        height: 60%;
        width: 90%;
        .header-popup {
            img {
                width: 50px;
            }
        }
        .buttons-popup {
            width: 80%;
            flex-direction: column;
            justify-content: center;
        }
    }
    .loader-overlay {
        .loader-content {
            .progress-container {
                width: 90%;
                position: relative;
                left: 50%;
                transform: translate(-50%);
            }
        }
    }
    footer {
        padding: 10px 15px 2px 15px;
        .container-links {
            align-items:start;
            justify-content:space-around;
            flex-direction: column;
            gap: 15px;
            .part-links {
                width: 100%;
                .title-footer {
                    justify-content: center;
                    font-size:18px;
                }
                .links-footer {
                    align-items: center;
                    font-size: 16px;
                    #oyama {
                        width: 300px;
                    }
                }
            }
        }
        .container-bottom {
            flex-direction: column;
        }
        &::before {
            left: 50%;
            transform: translate(-50%);
            width: 90%;
            height: 100%;
        }                                              
    }
}