/* --- General Styles & Dark Theme --- */
:root {
    --bg-color: #1a1a1a;
    --primary-color: #2c2c2c;
    --secondary-color: #c90000;
    --text-color: #e0e0e0;
    --light-gray: #444;
    --top-nav-height: 60px;
}

    html {
        scroll-padding-top: 0;
    }

a {
    text-decoration: none;
    color:var(--secondary-color);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 50px;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff8533;
}

/* --- Navigation --- */
.top-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.9);
    z-index: 1000;
    text-align: center;
}

.top-nav ul {
    margin: 0;
    padding: 15px 0;
    list-style: none;
}

.top-nav ul li {
    display: inline-block;
    margin: 0 20px;
}

.top-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.top-nav a:hover, .top-nav a.active {
    color: var(--secondary-color);
}

.side-nav {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav li {
    margin: 15px 0;
}

.dot {
    display: block;
    width: 12px;
    height: 12px;
    background-color: var(--light-gray);
    border-radius: 50%;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--secondary-color);
}

/* --- Sections --- */
section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 40px;
    padding-top: 10px;
    border-bottom: 1px solid var(--light-gray);
}

#accueil {
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

#accueil .logo-container img {
    max-width: 200px;
    margin-bottom: 20px;
}

/* --- News Section --- */
#actualites {
    position: relative;
    width: 100%;
}

.news-container {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
    flex-grow: 1;
    min-height: 0;
}

.news-scroll {
    display: flex;
    overflow-x: scroll;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100%;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
}

.news-scroll::-webkit-scrollbar {
    display: none;
}

.news-card {
    flex: 0 0 100%;
    margin: 0;
    background-color: var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-card-content {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 0;
}

.news-card-content::-webkit-scrollbar {
    width: 8px;
}

.news-card-content::-webkit-scrollbar-track {
    background: var(--primary-color);
}

.news-card-content::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.news-card-content::-webkit-scrollbar-thumb:hover {
    background: #ff8533;
}

.news-date {
    display: block;
    font-size: 1rem;
    color: var(--text-color);
    font-weight: normal;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.news-card h3 {
    color: var(--secondary-color);
    text-align: center;
    font-size: 1.5rem;
    margin-top: 15px;
    margin-bottom: 15px;
}

.news-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-top: 15px;
}

.news-video-container iframe, .news-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: 1px solid var(--light-gray);
    color: var(--light-gray);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn:hover {
    background-color: rgba(44, 44, 44, 0.8);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.scroll-btn.prev {
    left: 15px;
}

.scroll-btn.next {
    right: 15px;
}

/* --- Custom Select --- */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.custom-select-wrapper::after {
    content: '▼';
    font-size: 1rem;
    color: var(--secondary-color);
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none;
}

#club-nav-select,
.club-nav-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    padding: 10px;
    padding-right: 40px; /* Make space for the custom arrow */
    background-color: var(--primary-color);
    color: var(--text-color);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    min-width:200px;
}

#club-nav-select:focus,
.club-nav-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.4);
}

/* --- Le Club --- */
.club-nav {
    margin-bottom: 30px;
    text-align: center;
}

.club-nav-link {
    margin: 0 10px;
    color: var(--text-color);
    text-decoration: none;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.club-nav-link.active {
    border-bottom-color: var(--secondary-color);
    color: var(--secondary-color);
}

.club-tab {
    display: none;
}

.club-tab.active {
    display: block;
    animation: fadeIn 0.5s;
    width: 100%;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.doc-card {
    background-color: var(--primary-color);
    padding: 20px;
    margin: 10px;
    border-radius: 8px;
    display: inline-block;
    min-width:221px;
}

.doc-card a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

.instructors-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.instructor-card {
    background-color: var(--primary-color);
    padding: 20px;
    border-radius: 10px;
    width: 250px;
    cursor: pointer;
}

.instructor-card img {
    width: 50%;
    border-radius: 50%;
    margin-bottom: 15px;
}

.schedule-table, .pricing-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
}

.schedule-table th, .schedule-table td,
.pricing-table th, .pricing-table td {
    padding: 15px;
    border: 1px solid var(--light-gray);
}

.schedule-table td,
.pricing-table td {
    font-size: 0.9rem;
}

.schedule-table th, .schedule-table td,
.pricing-table th, .pricing-table td:nth-child(1) {
    text-align: start;
}

.schedule-table th, .pricing-table th {
    background-color: var(--secondary-color);
    /* color: var(--bg-color); */
    color: white;
}

/* --- Media Gallery --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* --- Carte --- */
#carte {
    padding-bottom: 70px; /* To avoid overlap with the footer */
}

#carte #map {
    width: 100%;
    height: 50vh; /* 50% of the viewport height */
    border-radius: 8px;
}

#carte .dojo-addresses {
    text-align: center;
    margin-top: 20px;
}

#le-club .dojo-addresses {
    text-align: center;
    margin-top: 20px;
}

/* --- Video Links --- */
.video-links-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
}

.video-link-card {
    background-color: var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    width: 300px;
    transition: transform 0.3s;
    border: 1px solid var(--light-gray);
}

.video-link-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.video-link-card a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.video-link-card img {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    display: block;
    margin: 15px auto;
    object-fit: contain;
}

.video-link-card h4 {
    margin: 15px 0;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.club-content {
    width: 100%;
}

/* --- Instructor Popup --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.popup-content {
    background-color: var(--primary-color);
    padding: 30px;
    border-radius: 10px;
    position: relative;
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--secondary-color);
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.popup-header-text {
    text-align: center;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: var(--light-gray);
    cursor: pointer;
    transition: color 0.3s;
}

.popup-close:hover {
    color: var(--text-color);
}

#popup-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
    flex-shrink: 0;
}

#popup-name {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 5px;
}

#popup-rank {
    margin-top: 0;
    margin-bottom: 0;
    font-style: italic;
}

#popup-bio {
    text-align: justify;
    margin-top: 5px;
    margin-bottom: 5px;
}

#popup-bio p {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

#popup-description {
    margin-top: 5px;
    margin-bottom: 5px;
}

#popup-description p {
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* --- Mobile Nav Arrows --- */
.mobile-nav-arrows {
    display: none;
}

/* --- Circular Menu --- */
.circular-menu-container {
    position: fixed;
    bottom: 70px;
    left: 20px;
    z-index: 1002;
    display: none; /* Hidden on desktop */
}

.circular-menu-trigger {
    background-color: var(--secondary-color);
    /* color: var(--bg-color); */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.circular-menu-trigger:focus,
.circular-menu-trigger:focus-visible {
    outline: none !important;
    -webkit-tap-highlight-color: transparent; /* For mobile WebKit browsers */
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.5) !important;
}

.circular-menu-container.open .circular-menu-trigger {
    transform: rotate(45deg);
}

.circular-menu-trigger .fa-times { display: none; }

.circular-menu-container.open .circular-menu-trigger .fa-bars { display: none; }
.circular-menu-container.open .circular-menu-trigger .fa-times { display: block; }

.menu-item-wrapper {
    position: absolute;
    bottom: 5px;
    left: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease-out;
}

.circular-menu-container.open .menu-item-wrapper {
    opacity: 1;
    transform: scale(1);
}

.menu-item {
    position: relative;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    /* border: 1px solid var(--light-gray); */
    border: 1px solid white;
}

.menu-item:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.menu-item-text {
    font-size: 0.7rem;
    margin-top: 5px;
    color: var(--text-color);
}

.circular-menu-container.open .menu-item {
    opacity: 1;
    transform: scale(1);
}

/* Positioning the items in an arc */
.circular-menu-container.open .menu-item-wrapper:nth-child(1) { transform: translate(70px, 20px); transition-delay: 0s; } /* NEWS */
.circular-menu-container.open .menu-item-wrapper:nth-child(2) { transform: translate(130px, 20px); transition-delay: 0.05s; } /* KYOKUSHIN */
.circular-menu-container.open .menu-item-wrapper:nth-child(3) { transform: translate(190px, 20px); transition-delay: 0.1s; } /* CLUB */
.circular-menu-container.open .menu-item-wrapper:nth-child(4) { transform: translate(250px, 20px); transition-delay: 0.15s; } /* MEDIA */
.circular-menu-container.open .menu-item-wrapper:nth-child(5) { transform: translate(310px, 20px); transition-delay: 0.2s; } /* MAP */

/* Reverse animation for closing */
.circular-menu-container:not(.open) .menu-item-wrapper:nth-child(1) { transition-delay: 0.2s; }
.circular-menu-container:not(.open) .menu-item-wrapper:nth-child(2) { transition-delay: 0.15s; }
.circular-menu-container:not(.open) .menu-item-wrapper:nth-child(3) { transition-delay: 0.1s; }
.circular-menu-container:not(.open) .menu-item-wrapper:nth-child(4) { transition-delay: 0.05s; }
.circular-menu-container:not(.open) .menu-item-wrapper:nth-child(5) { transition-delay: 0s; }

/* HOME */
/* .circular-menu-container.open .menu-item:nth-child(6) { transform: translate(0px, -160px); transition-delay: 0.25s; } */

/* --- French Open --- */
.french-open {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1001;
    display: none;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    gap: 8px;
}

/* --- Language Switcher Dropdown --- */
.language-switcher-dropdown {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1001;
}

.language-switcher-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-switcher-button .lang-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.language-switcher-button .fa-chevron-down {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.language-switcher-dropdown.open .language-switcher-button .fa-chevron-down {
    transform: rotate(180deg);
}

.language-switcher-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary-color);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 8px;
    margin-top: 4px;
    min-width: 150px;
}

.language-switcher-dropdown.open .language-switcher-content {
    display: block;
}

.language-switcher-content a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
}

.language-switcher-content a:hover {
    background-color: var(--light-gray);
}

.language-switcher-content .lang-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.club-nav-mobile {
    padding-bottom: 20px;
}

@media (min-width: 768px) {
    section {
        padding-top: 40px;
    }

    #accueil {
        padding-top: 40px;
    }

    .top-nav {
        display: block;
    }

    .scroll-btn {
        display: block;
    }

    .contact-container {
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    html {
        scroll-padding-top: 0;
    }

    section {
        padding: 35px 20px;
        min-height: 100vh;
        scroll-snap-align: start;
    }

    

    .club-nav {
        display: none;
    }

    .club-nav-mobile {
        display: block;
    }

    .club-nav-link {
        display: block;
        margin: 10px 0;
    }

    #lexique-search {
        max-width: 280px;
    }

    .lexique-list li.show:not(.letter-separator) {
        text-align: left;
        font-size: 0.9rem;
    }

    .lexique-list .term,
    .lexique-list .definition {
        display: inline;
    }

    .lexique-list .definition {
        margin-top: 0;
    }

    .mobile-nav-arrows {
        display: none;
    }

    .circular-menu-container {
        display: block;
    }

    .french-open {
        display: flex;
    }

    .top-nav {
        display: block;
    }

    .top-nav ul {
        display: none;
    }
}

/* --- Media Cards --- */
.media-cards-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
}

.media-card {
    background-color: var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    width: 300px;
    transition: transform 0.3s;
    border: 1px solid var(--light-gray);
}

.media-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.media-card a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.media-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    max-height: 100px;
}

.media-card h4 {
    margin: 15px 0;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* --- Footer --- */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    padding: 10px 0;
    text-align: center;
    z-index: 1000;
    border-top: 1px solid var(--light-gray);
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-content p {
    margin: 0;
}

.footer-content a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-content a:hover {
    color: var(--secondary-color);
}

body.popup-open {
    overflow: hidden;
}

div.picture-title {
    background-color: var(--secondary-color);
    width: 100%;
    height: 60px; /* Un peu plus haut */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Texte à droite */
    padding: 0 30px; /* Espacement intérieur */
    border-radius: 15px; /* Bords arrondis */
    color: white; /* Texte en blanc */
    font-size: 24px;
    font-weight: bold;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 20px;
}