* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: white;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* ========================================================================================
============================================Acceuil=========================================
   ========================================================================================*/
.acceuil h1 {

    font-family: "Geostar", serif;
    font-size: 5rem;
    margin: 0;
    position: relative;
    min-height: 100vh;
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.acceuil {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.174) 70%), url('https://www.trophee-endurance.fr/wp-content/uploads/2020/04/image_article_discipline1.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    margin: 0;
}

.welcome-bubble {
    font-family: "Orbitron", sans-serif;
    max-width: 800px;
    background: linear-gradient(180deg, #571212 0%, #e00101 100%);
    /* background: linear-gradient(135deg, #d54c4c 5%, #6f0f0f 100%); */
    padding: 15px 20px;
    border-radius: 25px;
    box-shadow: 0 8px 15px rgb(204, 3, 3);
    font-size: 1.2rem;
    color: white;
    text-align: center;
    margin: 20px auto;
}

.acceuil h1:hover {
    transform: scale(1.05);
}

.AccueilGrand {
    width: 100%;
    margin-top: 20vh;
}

#popup-accueil .popup-close {
    top: 35vh;
    right: 20vh;
}

#popup-accueil .popup-info {
    position: relative;
    top: -82.5vh;
    right: -50vh;
}

/* ========================================================================================
============================================F1==============================================
   ========================================================================================*/

.F1p1 {
    background-color: black;
    padding-top: 35vh;
}

.F1detourecontainer {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 20vh;
    min-height: 60vh;
    margin-bottom: -25vh;
    z-index: 1;

}

.F1detoure {
    cursor: pointer;

    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;

}

.TextF1detoure {
    font-family: "Orbitron", sans-serif;
    position: absolute;
    top: -55vh;
    left: 5%;
    margin: 0;
    z-index: 10;

}

.TextF1detoure h2:first-child {
    font-size: 4.5rem;
    font-weight: bold;

}

.TextF1detoure h2:last-child {
    font-size: 2.5rem;
    font-weight: bold;
    color: #969696;

}


.F1Info {

    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 3rem;
    padding: 3rem 2rem;
    background-color: black;
    width: 100%;
    z-index: 100;
}


.F1Info div {
    text-align: center;
    flex: 1;
}

.F1Info div p:first-child {
    font-family: "Orbitron", sans-serif;
    font-weight: bold;

    font-size: 3rem;
    color: white;
    margin: 0;
    letter-spacing: -2px;

}

.F1Info div p:last-child {
    font-family: "Orbitron", sans-serif;

    font-size: 1rem;
    color: #969696;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    font-weight: 300;
}

.F1container {
    position: relative;
    display: inline-block;
}

.F1container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0) 30%), linear-gradient(to bottom, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.0) 30%);
    ;

    pointer-events: none;
}

.F1img {
    max-width: 100%;
    height: auto;
    cursor: pointer;

}


.F1textbox {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 2rem;
    padding: 20px 30px;
    z-index: 2;
    width: 60vw;
    max-width: 900px;
    min-width: 600px;
    min-height: 30vh;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.F1textbox h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid white;
}

.F1textbox p {
    margin: 0;
    flex: 1;
    line-height: 1.5;
}

/* ========================================================================================
============================================Rally============================================
   ========================================================================================*/

.Rallyp1 {
    background-color: black;
    padding-top: 30vh;
}

.Rallydetourecontainer {
    cursor: pointer;

    position: relative;
    display: block;
    width: 100%;
    margin-top: 15vh;
    margin-bottom: -5vh;
    min-height: 600px;
    z-index: 100;
}

.Rallydetoure {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;

}


.TextRallydetoure {
    font-family: "Orbitron", sans-serif;
    position: absolute;
    top: -50vh;
    left: 5%;

    margin: 0;
    z-index: 1;

}

.TextRallydetoure h2:first-child {
    font-size: 4.5rem;
    font-weight: bold;

}

.TextRallydetoure h2:last-child {
    font-size: 2.5rem;
    font-weight: bold;
    color: #969696;

}


.RallyInfo {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 3rem;
    padding: 3rem 2rem;
    background-color: black;
    width: 100%;

}


.RallyInfo div {
    text-align: center;
    flex: 1;
}

.RallyInfo div p:first-child {
    font-family: "Orbitron", sans-serif;
    font-weight: bold;

    font-size: 3rem;
    color: white;
    margin: 0;
    letter-spacing: -2px;

}

.RallyInfo div p:last-child {
    font-family: "Orbitron", sans-serif;
    font-size: 1rem;
    color: #969696;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    font-weight: 300;
}

.Rallycontainer {
    position: relative;
    display: inline-block;
}

.Rallycontainer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0) 30%), linear-gradient(to bottom, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.0) 30%);
    pointer-events: none;
}

.Rallyimg {
    cursor: pointer;

    max-width: 100%;
    height: auto;

}

.Rallytextbox {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 2rem;
    padding: 20px 30px;
    z-index: 20;
    width: 60vw;
    max-width: 900px;
    min-width: 600px;
    min-height: 30vh;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.Rallytextbox h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid white;
}

.Rallytextbox p {
    margin: 0;
    flex: 1;
    line-height: 1.5;
}

/* ========================================================================================
============================================Endurance========================================
   ========================================================================================*/
.Endurancep1 {
    background-color: black;
    padding-top: 40vh;
}

.Endurancedetourecontainer {
    cursor: pointer;

    position: relative;
    display: block;
    width: 100%;
    margin-bottom: -12.5vh;
    min-height: 600px;
    z-index: 100;
}

.Endurancedetoure {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;

}

.TextEndurancedetoure {
    font-family: "Orbitron", sans-serif;
    position: absolute;
    top: -70%;
    left: 5%;

    margin: 0;
    z-index: 1;

}

.TextEndurancedetoure h2:first-child {
    font-size: 4.5rem;
    font-weight: bold;

}

.TextEndurancedetoure h2:last-child {
    font-size: 2.5rem;
    font-weight: bold;
    color: #969696;

}


.EnduranceInfo {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 3rem;
    padding: 3rem 2rem;
    background-color: black;
    width: 100%;

}


.EnduranceInfo div {
    text-align: center;
    flex: 1;
}

.EnduranceInfo div p:first-child {
    font-family: "Orbitron", sans-serif;
    font-weight: bold;

    font-size: 3rem;
    color: white;
    margin: 0;
    letter-spacing: -2px;

}

.EnduranceInfo div p:last-child {
    font-family: "Orbitron", sans-serif;

    font-size: 1rem;
    color: #969696;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    font-weight: 300;
}

.Endurancecontainer {
    position: relative;
    display: inline-block;
}

.Endurancecontainer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0) 30%), linear-gradient(to bottom, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.0) 30%);
    ;

    pointer-events: none;
}

.Enduranceimg {
    cursor: pointer;

    max-width: 100%;
    height: auto;

}

.Endurancetextbox {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 2rem;
    padding: 20px 30px;
    z-index: 20;
    width: 60vw;
    max-width: 900px;
    min-width: 600px;
    min-height: 30vh;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.Endurancetextbox h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid white;
}

.Endurancetextbox p {
    margin: 0;
    flex: 1;
    line-height: 1.5;
}

/* ========================================================================================
============================================Formulaire============================================
   ========================================================================================*/


.formulaire {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 3rem 2rem;
    margin: 4rem auto;
    max-width: 1000px;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(128, 128, 128, 0.7);
    border: 1px solid #3a3a3a;
}

.formulaire h2 {
    font-family: "Orbitron", sans-serif;
    text-align: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 2rem;
    letter-spacing: 1px;
}

.formulaire p:first-of-type {
    font-family: "Orbitron", sans-serif;
    margin-bottom: 3rem;
    color: #969696;
    text-align: center;
    font-size: 1.1rem;
}

.formulaire p {
    margin-bottom: 2rem;
}

.formulaire label {
    color: white;
    font-family: "Orbitron", sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 500;
}

.formulaire input,
.formulaire textarea,
.formulaire select {
    width: 100%;
    padding: 0.4rem;
    background-color: #2a2a2a;
    border: 2px solid #3a3a3a;
    border-radius: 0.5rem;
    color: white;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    margin-top: 0.3rem;
}

.formulaire select {
    cursor: pointer;
}

.formulaire input:focus,
.formulaire textarea:focus,
.formulaire select:focus {
    outline: none;
    border-color: #571212;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.formulaire input:hover,
.formulaire textarea:hover,
.formulaire select:hover {
    border-color: #571212;
}

.formulaire textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.2;
}

.error-message {
    color: red;
    font-size: 0.9em;
    display: none;
}

.show-errors .error-message {
    display: none;
}

.show-errors input:invalid+.error-message,
.show-errors textarea:invalid+.error-message,
.show-errors select:invalid+.error-message {
    display: block;
}


.btn-submit {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #571212 0%, #e00101 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-family: "Orbitron", sans-serif;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 5px;
    cursor: pointer;
    margin-top: 1rem;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.required {
    color: #ff0000;
    margin-left: 0.2rem;
}

.preview-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.preview-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0) 30%),
        linear-gradient(to bottom, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.0) 30%);
    pointer-events: none;
}

.preview-img {
    max-width: 100%;
    height: auto;
    display: block;
    min-height: 400px;
    object-fit: cover;
    background-color: #1a1a1a;
}

.preview-textbox {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 2rem;
    padding: 20px 30px;
    z-index: 2;
    width: 60vw;
    max-width: 900px;
    min-width: 600px;
    min-height: 30vh;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-textbox h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid white;
}

.preview-textbox p {
    margin: 0;
    flex: 1;
    line-height: 1.5;
}

.preview-title {
    font-family: "Orbitron", sans-serif;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: white;
}


/* ========================================================================================
============================================Flou============================================
   ========================================================================================*/


.fade-in-element {
    opacity: 0;
    filter: blur(50px);
    transition: opacity 0.8s ease-out, filter 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
    filter: blur(0);
}


/* ========================================================================================
============================================Zoom============================================
   ========================================================================================*/

.popup {
    position: fixed;
    inset: 0;
    top: -35vh;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;

}

.popup-visible {
    opacity: 1;
    pointer-events: auto;
}

.popup-invisible {
    display: none;
}

.popup-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 90%;
    max-height: 5vh;
    align-items: center;
    margin-bottom: 50%;
}

.image-grande {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    cursor: pointer;
}

.popup-info {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 400px;
    color: white;
}

.popup-info h3 {
    font-family: "Orbitron", sans-serif;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid white;
    padding-bottom: 0.5rem;
}

.popup-info p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.popup-source {
    font-size: 0.9rem;
    color: #969696;
    font-style: italic;
}

.popup-source a {
    color: #ff4444;
    text-decoration: underline;
}

.popup-source a:hover {
    color: #ff6666;
}

.popup-close {
    position: absolute;
    top: 5vh;
    right: 5vw;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.2s ease;
}

.popup-close:hover {
    transform: scale(1.2);
    color: #ff4444;
}

.F1Grand {
    width: 100%;
    margin-top: 30vh;
}

#popup-f1-normal .popup-close {
    top: 55vh;
    right: 10vh;
}

.RallyGrand {
    width: 100%;
    margin-top: 25vh;
}

#popup-rally-normal .popup-close {
    top: 40vh;
    right: 15vh;
}

.EnduranceGrand {
    width: 100%;
    margin-top: 30vh;
}

#popup-endurance-normal .popup-close {
    top: 45vh;
    right: 10vh;
}

/* ========================================================================================
============================================Footer========================================
   ========================================================================================*/

.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 4rem 2rem 2rem 2rem;
    margin-top: 8rem;
    border-top: 2px solid #3a3a3a;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content h2 {
    font-family: "Orbitron", sans-serif;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: white;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mentions-section {
    background-color: rgba(42, 42, 42, 0.5);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    border-left: 4px solid #571212;
}

.mentions-section h3 {
    font-family: "Orbitron", sans-serif;
    font-size: 1.2rem;
    color: #ff2f2f;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mentions-section p {
    font-family: Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.3;
    color: #cccccc;
    margin-bottom: 0.5rem;
}

.MyEmail {
    color: #ff0000;

}

a .new-window-warning {
    font-size: 0.8em;
    color: #ff0000 !important;
    margin-left: 5px;
}

.external-link:hover .new-window-warning {
    text-decoration: underline;
}



@media (min-width: 1024px) {

    body {
        overflow-x: hidden;
    }

    .acceuil h1 {
        font-size: clamp(3rem, 5vw, 5rem);
    }

    .TextF1detoure h2:first-child,
    .TextRallydetoure h2:first-child,
    .TextEndurancedetoure h2:first-child {
        font-size: clamp(3rem, 4vw, 4.5rem);
    }

    .TextF1detoure h2:last-child,
    .TextRallydetoure h2:last-child,
    .TextEndurancedetoure h2:last-child {
        font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    }

    .F1detourecontainer,
    .Rallydetourecontainer,
    .Endurancedetourecontainer {
        margin-bottom: 0;
        padding-bottom: clamp(2rem, 6vh, 6rem);
    }

    .F1Info,
    .RallyInfo,
    .EnduranceInfo {
        flex-wrap: wrap;
        gap: clamp(1.5rem, 2vw, 3rem);
        padding: clamp(2rem, 3vw, 3rem) clamp(1rem, 2vw, 2rem);
    }

    .F1Info div,
    .RallyInfo div,
    .EnduranceInfo div {
        min-width: 240px;
    }

    .F1Info div p:first-child,
    .RallyInfo div p:first-child,
    .EnduranceInfo div p:first-child {
        font-size: clamp(2rem, 2.8vw, 3rem);
    }

    .F1textbox,
    .Rallytextbox,
    .Endurancetextbox,
    .preview-textbox {
        width: min(60vw, 900px);
        min-width: 0;
        max-height: min(60vh, 560px);
        overflow: auto;
    }

    .popup {
        top: 0;
        align-items: center;

    }


    .popup-content {
        max-height: 90vh;
        margin-bottom: 0;
        overflow: visible;
        padding: clamp(1rem, 2vw, 2rem);
    }

    .F1textbox,
    .Rallytextbox,
    .Endurancetextbox,
    .preview-textbox {
        width: min(60vw, 900px);
        min-width: 0;
        max-height: min(60vh, 560px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    #popup-accueil .popup-info {
        position: absolute;
        top: 3rem;
        right: 3rem;
        max-width: 320px;
        background-color: rgba(0, 0, 0, 0.7);
        border-radius: 1rem;
        width: 28vw;
        max-width: 450px;
        min-width: 320px;
        max-height: 35vh;
        padding: 1.2rem 1.6rem;
        overflow-y: auto;
    }

    #popup-accueil .popup-close,
    #popup-f1-normal .popup-close,
    #popup-rally-normal .popup-close,
    #popup-endurance-normal .popup-close {
        top: 5vh;
        right: 5vw;
    }

    .F1Grand,
    .RallyGrand,
    .EnduranceGrand,
    .AccueilGrand {
        margin-top: 0;
    }

    #popup-accueil .popup-content {
        position: relative;
        display: inline-block;
    }

    #popup-accueil .popup-close {
        top: 5vh;
        right: 5vw;
    }

    #popup-f1-detoure .popup-content,
    #popup-rally-detoure .popup-content,
    #popup-endurance-detoure .popup-content {
        transform: translateY(-35vh);
    }

    .TextF1detoure {
        top: clamp(-35vh, -35vh, 40vh);
    }

    .TextRallydetoure {
        top: clamp(-45vh, -50vh, -55vh);
    }

    .TextEndurancedetoure {
        top: clamp(-30vh, -55vh, -70vh);
    }

    .F1detourecontainer {
        margin-top: clamp(3vh, -12vh, 12vh);
        margin-bottom: clamp(-40vh, -20vh, -10vh);
    }

    .Rallydetourecontainer {
        margin-top: clamp(8vh, 10vh, 10vh);
        margin-bottom: clamp(-10vh, -10vh, 0vh);
    }

    .Endurancedetourecontainer {
        margin-top: clamp(-15vh, -10vh, 0vh);
        margin-bottom: clamp(-10vh, -13vh, -150vh);
    }


}