:root {
    --primary-color: rgb(255, 255, 255);
    --secondly-color: rgb(0, 0, 0);
    --teirtly-color: rgba(0, 0, 0, 0.616); 
    --container-margin: 0px 20px;
    --success-color: #4CAF50;
    --error-color: #f44336;
}

::selection {
    background-color: var(--secondly-color);
    color: var(--primary-color);
    text-shadow: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto", sans-serif;
    margin: 0;
    padding: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* HEADER */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    background: linear-gradient(to bottom, rgb(255, 255, 255), rgba(255, 255, 255, 0));
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    height: 70px;
    margin: 0 10px;
}

.header-logo h1 {
    font-size: clamp(0.9rem, 1.3vw, 1.3rem);
    cursor: pointer;
}

.header-logo a {
    text-decoration: none;
    color: black;
}

header nav li {
    padding: var(--container-margin);
    list-style: none;
    display: inline-block;
    font-weight: bold;
}

header nav a {
    color: var(--secondly-color);
    text-decoration: none;
    display: inline-block;
    font-size: clamp(0.8rem, 1vw, 3rem);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border: 1px solid transparent;
}

header nav a:hover {
    border-color: var(--secondly-color);
    background-color: rgba(255, 255, 255, 0.1);
}

/* HERO */
.hero {
    margin-top: -40px;
    padding-top: 0;
}

.hero-container {
    margin: var(--container-margin);
    line-height: 1;
}

.hero-container h2 {
    padding: 0 5px;
    font-family: "Jockey One", sans-serif;
    font-size: clamp(0.5rem, 8vw, 9rem);
    transition: all 0.3s ease;
}

/* TARIFS & ABONNEMENTS */
.tarifs, .abonnements {
    background-color: var(--primary-color);
    margin-top: -5px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#abonnements {
    display: none;
}

#abonnements.active, #tarifs.active {
    display: block;
}

.tarifs-container, .abonnements-container {
    margin: var(--container-margin);
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 3rem, 4rem);
    align-content: center;
    justify-content: center;
}

.tarif, .abonnement {
    text-align: center;
    border-left: 2px solid var(--secondly-color);
    border-radius: 5px;
    padding: 1rem;
    width: min(30%, 250px);
    height: min(30%, 150px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    background: white;
}

.tarif:hover, .abonnement:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.tarif h3, .abonnement h3 {
    font-family: "Jockey One", sans-serif;
    font-size: clamp(1rem, 1.5vw, 2rem);
    margin: 0.5rem 0;
}

.tarif button, .abonnement button {
    background-color: var(--secondly-color);
    color: var(--primary-color);
    padding: 0.5em 1.5em;
    border-radius: 2.5px;
    font-weight: 600;
    font-size: clamp(0.7rem, 0.8vw, 2rem);
    border: 1px solid var(--secondly-color);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.tarif button:hover, .abonnement button:hover {
    background-color: transparent;
    color: var(--secondly-color);
    padding-inline: clamp(1.5rem, 5vw, 6rem);
}

/* FOOTER */
footer {
    bottom: 0;
    margin-top: 2rem;
    overflow: hidden;
    background: #000;
    position: relative;
}

.marque {
    user-select: none;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marque-container {
    display: inline-block;
    font-family: 'Jockey One', sans-serif;
    animation: scroll-left 20s linear infinite;
    padding-inline: 0.3rem;
}

.outlined-text {
    font-family: 'Jockey One', sans-serif;
    color: transparent;
    -webkit-text-stroke: 0.4px rgba(255, 255, 255, 0.879);
    margin-top: -5px;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.pieds {
    display: flex;
    margin: var(--container-margin);
    justify-content: space-between;
    text-align: center;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pieds span, .pieds a {
    font-family: "Noto Sans Mono", monospace;
    color: var(--primary-color);
    font-weight: 400;
    font-size: clamp(0.6rem, 1vw, 1rem);
    opacity: 0.5;
    padding-inline: clamp(0rem, 0.3vw, 0.7rem);
    text-decoration: none;
    transition: opacity 0.3s;
}

.pieds span:hover {
    opacity: 0.9;
}

.contacts-container {
    padding-inline: clamp(0rem, 0.3vw, 0.7rem);
}

/* MODALS */
.modalInfo, .modalPay {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.modalInfo-container, .modalPay-container {
    background-color: var(--primary-color);
    border-left: 2px solid var(--secondly-color);
    border-radius: 5px;
    padding: 2rem;
    width: min(90%, 400px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: 2px solid var(--secondly-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--secondly-color);
    color: white;
}

.packprice {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 5px;
}

.userInfo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.userInfo input, .reference-form input {
    border: 1px solid #ddd;
    padding: 0.8rem;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
}

.userInfo input:focus, .reference-form input:focus {
    outline: none;
    border-color: var(--secondly-color);
}

.btn-group, .guidbtn {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 0.7rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background-color: var(--secondly-color);
    color: white;
}

.btn-primary:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondly-color);
    border: 1px solid var(--secondly-color);
}

.btn-secondary:hover {
    background-color: var(--secondly-color);
    color: white;
}

.numero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
}

.numero p {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

.btn-copy {
    background-color: var(--secondly-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-copy:hover {
    background-color: #333;
    transform: scale(1.05);
}

/* ANIMATIONS */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* TOAST NOTIFICATION */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 2rem;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* LOADING */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--secondly-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }
    
    nav li {
        display: block;
        margin: 0.5rem 0;
    }
    
    .pieds {
        flex-direction: column;
        align-items: center;
    }
    
    .modalInfo-container, .modalPay-container {
        width: 95%;
        padding: 1.5rem;
    }
    
    .btn-group, .guidbtn {
        flex-direction: column;
    }
}


@media (max-width: 400px) {
    .tarifs-container, .abonnements-container {
        margin: 0 10px;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .tarif, .abonnement {
        width: min(40% , 250px );
        height: min(40%, 150px); /* Mais pas trop large */
        margin: 0 auto; /* Centré */
        padding: 0.8rem;
        box-sizing: border-box; /* Important pour que padding soit inclus */
    }
    
    .tarif h3, .abonnement h3 {
        font-size: 1.2rem;
        word-break: break-word; /* Casse les mots trop longs */
        hyphens: auto; /* Ajoute des tirets si nécessaire */
    }
    
    .tarif button, .abonnement button {
        padding: 0.5em 1em;
        font-size: 0.9rem;
        white-space: normal; /* Permet au texte du bouton de passer à la ligne */
    }
    
    /* Le titre principal */
    .hero-container h2 {
        font-size: clamp(0.5rem, 12vw, 3rem); /* S'adapte mieux */
        line-height: 1.2;
        word-break: break-word;
    }
    
    /* Header pour mobile */
    .header-container {
        padding: 0 5px;
        margin: 0 5px;
    }
    
    header nav li {
        margin: 0 2px;
    }
    
    header nav a {
        padding: 5px;
        font-size: 0.7rem;
        white-space: nowrap; /* Empêche les liens de passer à la ligne */
    }
    
    /* Pour les icônes */
    header nav a i {
        margin-right: 3px;
    }
}
