* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}


/* Code CSS du theme switcher qu'il devait y avoir */

:root {
    --primary-color: rgb(26, 26, 26);
    --secondary-color: #F5F0E8;
    --bois-color: #7B5B3A;
    --or-color: #C9A84C;
    --text-black: #3D3D3D;
    --text-white: #F9F7F4;
    --btn-noir-hover: #272727;
    --btn-or-hover: #AB8F42;
    --btn-white-hover: #E0D7C9;
    --carte-gradient: linear-gradient(135deg, #5C3D1E 0%, #C9A84C 50%, #5C3D1E 100%);
    --carte-lien-gradient: linear-gradient(135deg, #5C3D1E 0%, #C9A84C 100%);
    --hero-overlay: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.9) 100%);
    --histoire-overlay: linear-gradient(to top, rgba(0, 0, 0, 0.95) 10%, rgba(0, 0, 0, 0.2) 55%, rgba(0, 0, 0, 0.1) 100%);
    --carte-hover-overlay: linear-gradient(to left, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%);
    --carte-lien-hover-overlay: linear-gradient(to left, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 50%);
    --scrollbar-thumb: #888;
    --accordion-filter: invert(1);
}

.hero-overlay {
    background: var(--hero-overlay);
}

.histoire-overlay {
    background: var(--histoire-overlay);
}

.carte-principale {
    background: var(--carte-gradient);
}

.carte-principale:hover::before {
    background: var(--carte-hover-overlay);
}

.carte-lien {
    background: var(--carte-lien-gradient);
}

.carte-lien:hover::before {
    background: var(--carte-lien-hover-overlay);
}

.scroll-custom {
    scrollbar-color: var(--scrollbar-thumb) var(--primary-color);
}

.scroll-custom::-webkit-scrollbar-track {
    background: var(--primary-color);
}

.scroll-custom::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
}

.accordion-item {
    background-color: var(--primary-color) !important;
}

.accordion-button {
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
}

.accordion-button::after {
    filter: var(--accordion-filter);
}

.accordion-body {
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-black);
}

.bg-custom-primary {
    background-color: var(--primary-color);
}

.bg-custom-secondary {
    background-color: var(--secondary-color);
}

.bg-custom-bois {
    background-color: var(--bois-color);
}

.bg-custom-or {
    background-color: var(--or-color);
}

.text-custom-black {
    color: var(--text-black);
}

.text-custom-white {
    color: var(--text-white);
}

.text-custom-or {
    color: var(--or-color);
}

.link-white {
    color: var(--text-white);
}

.link-white:hover {
    color: var(--or-color);
}

.btn-or {
    background-color: var(--or-color);
    color: var(--text-white);
}

.btn-or:hover {
    background-color: var(--btn-or-hover);
}

.btn-noir {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.btn-noir:hover {
    background-color: var(--btn-noir-hover);
}

.btn-white {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-white:hover {
    background-color: var(--btn-white-hover);
    color: var(--text-white);
}


/* Polices */
.inter {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.inter-bold {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
}

.play-bold {
    font-family: "Playfair Display", serif;
    font-optical-sizing: auto;
    font-weight: 900;
    font-style: normal;
}

.sous-titre {
    font-family: "Playfair Display", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: italic;
}

.size-titre {
    font-size: 3rem;
}

.légende {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: italic;
}

/* Ajouts pour compléter Bootstrap */
.w-15 {
    width: 15%;
}

@media (max-width: 991.98px) {
    body {
        overflow-x: hidden;
    }

    .row {
        --bs-gutter-x: 0;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Navbar */
header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.navbar-custom {
    background-color: var(--secondary-color);
    border: 2px solid var(--bois-color);
    padding: 0.5rem 1.5rem;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, border 0.3s ease;
}

@media (max-width: 991.98px) {
    .navbar-custom {
        background-color: transparent;
        border: none;
    }

    .navbar-custom.menu-ouvert {
        background-color: var(--secondary-color);
        border: 2px solid var(--bois-color);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23C9A84C' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    .navbar-toggler {
        border-color: var(--or-color) !important;
    }
}

.navbar-custom.menu-ouvert {
    background-color: var(--secondary-color);
    border: 2px solid var(--bois-color);
}

.navbar-custom .nav-link {
    color: var(--text-black) !important;
    font-size: 15px;
    font-weight: 400;
    padding: 0.4rem 1.1rem !important;
    transition: color 0.2s;
    letter-spacing: 0.01em;
}

.navbar-custom .nav-link:hover {
    color: var(--bois-color) !important;
}

.logo-img {
    height: 70px;
    width: auto;
}

/* Barre de navigation bottom */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 100;
    background-color: var(--primary-color);
    padding: 0.5rem 0 1.5rem 0;
    align-items: flex-end;
    box-sizing: border-box;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-white);
    text-decoration: none;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    flex: 1;
    transition: color 0.2s;
    position: relative;
}

.bottom-nav-item i {
    font-size: 22px;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}

.bottom-nav-item span {
    position: relative;
    z-index: 1;
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 68px;
    height: 68px;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: -1;
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -17px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    background-color: var(--or-color);
    border-radius: 50%;
    z-index: 0;
}

.bottom-nav-item.active i {
    transform: translateY(-6px);
}

.bottom-nav-item.active span {
    color: var(--or-color);
}

.bottom-nav-item:hover {
    color: var(--or-color);
}

@media (max-width: 991.98px) {
    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 80px;
    }
}

/* TITRES */
.header-icon {
    height: 70px !important;
    width: auto !important;
}

@media (max-width: 991.98px) {
    .header-icon {
        height: 45px !important;
    }

    .size-titre {
        font-size: 1.5rem;
    }
}

/* Footer */
.gap-footer {
    gap: 100px;
}

@media (max-width: 991.98px) {
    footer {
        display: none !important;
    }
}

/* Hero section */
.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding: 200px 0 100px 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
}

.hero-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--text-white);
}

.separateur {
    height: 80px;
}

/* Section Tournois */
.carousel-track {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: scrollLeft 20s linear infinite;
}

.carousel-img {
    height: 350px;
    width: auto;
}

.carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
}

.carousel-track-reverse {
    animation: scrollRight 20s linear infinite;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-25%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-25%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Carte principale */
.carte-principale {
    border: 2px solid var(--or-color);
    min-height: 450px;
    position: relative;
    overflow: hidden;
    transition: none;
}

.carte-principale::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    transition: background 0.3s ease;
    border-radius: inherit;
}

.carte-principale::after {
    content: '';
    background-image: url('../assets/img/fleche-droite.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 30px;
    height: 30px;
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%) translateX(-10px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.carte-principale:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Cartes liens */
.carte-lien {
    border: 2px solid var(--or-color);
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    transition: none;
}

.carte-lien::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    transition: background 0.3s ease;
    border-radius: inherit;
}

.carte-lien::after {
    content: '';
    background-image: url('../assets/img/fleche-droite.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    position: absolute;
    top: 50%;
    right: 1.5rem;
    opacity: 1;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.carte-lien:hover::after {
    transform: translateY(-50%) translateX(5px);
}

/* Format Mobile */
@media (min-width: 992px) {
    .bg-lg-custom-primary {
        background-color: var(--primary-color) !important;
    }

    .bg-lg-custom-secondary {
        background-color: var(--secondary-color) !important;
    }
}

@media (max-width: 991.98px) {
    .carte-principale {
        min-height: unset;
    }
}

/* HISTOIRE */
.histoire-card {
    width: 100%;
    max-width: 320px;
    border-radius: 35px;
    border: 2px solid var(--or-color);
}

.histoire-mobile-bg {
    width: 100%;
    height: 520px;
    object-fit: cover;
    display: block;
}

.histoire-overlay {
    position: absolute;
    inset: 0;
}

.histoire-content {
    position: absolute;
    bottom: 25px;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.histoire-content p {
    line-height: 1.4;
}

/* Page Histoire */
.espace-sommaire {
    margin-top: 150px;
    margin-bottom: 150px;
}

.encadre {
    border: 2px solid var(--or-color) !important;
    padding: 1rem;
}

.histoire-img {
    height: 300px;
    width: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 1400px) {
    .histoire-img {
        height: 420px;
    }
}

@media (max-width: 991.98px) {
    .histoire-img {
        height: auto;
        max-height: 300px;
        object-fit: contain;
        object-position: center;
    }
}

.histoire-img-contain {
    object-fit: contain;
    object-position: left;
    background-color: #f5f0e8;
}

@media (min-width: 1400px) {
    .histoire-img-contain {
        object-position: left;
    }
}

@media (max-width: 991.98px) {
    .histoire-img-contain {
        object-position: center;
    }
}

/* Page Tournois */
.affiche-tournoi {
    height: 300px;
    width: 180px !important;
    object-fit: cover;
}

.colonnes-affiches {
    margin-left: -20px;
}

.table-tournoi {
    --bs-table-bg: transparent !important;
    --bs-table-border-color: var(--or-color) !important;
}

.table-tournoi td {
    border: 2px solid var(--or-color) !important;
    background-color: transparent !important;
}

.table-tournoi th {
    border: 2px solid var(--or-color) !important;
    background-color: transparent !important;
    color: var(--or-color);
}

.table-tournoi td:empty::after {
    content: '✕';
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--or-color);
    font-size: 1.2rem;
}

.table-tournoi td:empty {
    text-align: center;
    vertical-align: middle;
}

/* Tarifs */
.prix-tarif {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -10px;
    margin-bottom: -10px;
}

.adresse-carte {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991px) {
    .espace-sommaire {
        margin-top: 120px;
        margin-bottom: 60px;
    }

    .prix-tarif {
        min-height: 10px;
    }

    iframe {
        height: 250px;
    }

    .adresse-carte {
        min-height: auto;
    }
}

/* Page Contact */
.champ-contact {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-white);
    color: var(--text-white);
    outline: none;
    padding: 4px 0;
    width: 100%;
    resize: none;
}

.champ-contact::placeholder {
    color: var(--text-white);
    font-weight: 700;
}

.champ-contact:focus {
    border-bottom: 1px solid var(--or-color);
}

.champ-wrapper {
    position: relative;
    width: 100%;
}

.champ-label {
    position: absolute;
    top: 4px;
    left: 0;
    color: var(--text-white);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s ease;
    pointer-events: none;
}

.champ-contact:focus~.champ-label,
.champ-contact:not(:placeholder-shown)~.champ-label {
    top: -18px;
    font-size: 0.75rem;
    color: var(--or-color);
    font-weight: 400;
}

/* Page actus */
.card-actu {
    outline: 2px solid var(--bois-color);
    border-radius: 1rem !important;
    overflow: hidden !important;
}

.scroll-custom {
    overflow-y: scroll;
    scrollbar-width: thin;
}

.scroll-custom::-webkit-scrollbar {
    width: 6px;
}

.scroll-custom::-webkit-scrollbar-thumb {
    border-radius: 4px;
}

.scroll-custom::-webkit-scrollbar-button:start:decrement,
.scroll-custom::-webkit-scrollbar-button:end:increment {
    display: none;
}

.accordion-item {
    border: 2px solid var(--or-color) !important;
    overflow: hidden;
}

.accordion-button {
    box-shadow: none !important;
}

/* Fix Facebook plugin mobile */
.fb-page,
.fb-page span,
.fb-page span iframe {
    width: 100% !important;
    max-width: 100% !important;
}

/* Couleurs de fonds et de textes */
.bg-custom-primary {
    background-color: var(--primary-color);
}

.bg-custom-secondary {
    background-color: var(--secondary-color);
}

.bg-custom-bois {
    background-color: var(--bois-color);
}

.bg-custom-or {
    background-color: var(--or-color);
}

.text-custom-black {
    color: var(--text-black);
}

.text-custom-white {
    color: var(--text-white);
}

.text-custom-or {
    color: var(--or-color);
}

.border-custom-or {
    border: 2px solid var(--or-color);
}

.link-white {
    color: var(--text-white);
    text-decoration: none;
}

.link-white:hover {
    color: var(--or-color);
}

/* Boutons */
.btn-or {
    background-color: var(--or-color);
    color: var(--text-white);
    border: 2px solid var(--bois-color);
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-or:hover {
    background-color: var(--btn-or-hover);
    color: var(--text-white);
}

.btn-noir {
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: 15px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    transition: background 0.2s, color 0.2s, gap 0.3s;
}

.btn-noir span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-noir::after {
    content: '';
    background-image: url('../assets/img/fleche-droite.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 0px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
    flex-shrink: 0;
}

.btn-noir:hover {
    background-color: var(--btn-noir-hover);
    gap: 8px;
}

.btn-noir:hover::after {
    opacity: 1;
    width: 20px;
}

.btn-white {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 15px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.btn-white span {
    transition: transform 0.3s ease;
}

.btn-white::after {
    content: '';
    background-image: url('../assets/img/fleche-droite.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    position: absolute;
    right: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-10px);
}

.btn-white:hover {
    background-color: var(--btn-white-hover);
    color: var(--text-white);
}

.btn-white:hover span {
    transform: translateX(-15px);
}

.btn-white:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.btn-switch {
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    color: var(--text-white) !important;
}

.btn-switch-or {
    background-color: var(--or-color);
    border: 2px solid var(--or-color);
}

.btn-switch-noir {
    background-color: transparent;
    border: 2px solid var(--or-color);
}




/* ===================== ADMIN ===================== */
.admin-nav a {
    color: var(--text-black);
    text-decoration: none;
}

.admin-nav a:hover {
    color: var(--or-color);
}

.admin-nav-active {
    color: var(--or-color) !important;
}

.admin-table-header {
    display: grid;
    grid-template-columns: 150px 1fr 180px 50px;
    background: var(--secondary-color);
    border: 1px solid var(--text-black);
}

.admin-table-header>div {
    border: 1px solid var(--text-black);
    padding: 10px;
    font-weight: bold;
}

.admin-section-row {
    display: grid;
    grid-template-columns: 150px 1fr 180px 50px;
    border: 1px solid var(--text-black);
}

.admin-section-row>div {
    border: 1px solid var(--text-black);
    padding: 10px;
}

.btn-add {
    background: var(--secondary-color);
    border: 1px solid var(--text-black);
    width: 100%;
    padding: 10px;
    font-size: 1.5rem;
    cursor: pointer;
}

.btn-add:hover {
    background: var(--or-color);
    color: white;
}

.btn-delete {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-black);
    font-size: 1.2rem;
}

.btn-delete:hover {
    color: red;
}

.champ-admin {
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.champ-admin-titre {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    resize: none;
}

.img-preview {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: none;
}

.champ-admin,
.champ-admin-titre {
    color: var(--text-white);
}

.champ-admin::placeholder,
.champ-admin-titre::placeholder {
    color: rgba(249, 247, 244, 0.5);
}