/*==================Main=================*/

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    border: 1px solid #DDDDDD;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

h1 {
    color: #1B1F3B;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
}


label {
    margin: 10px 0 5px;
}


input, select, button {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #DDD;
    border-radius: 5px;
}

button {
    background-color: #1B1F3B;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background-color: #D4AF37;
    color: #1A1A1A;
}

.result {
    text-align: center;
    margin-top: 20px;
    font-size: 1.5em;
    color: #E10600;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    padding-top: 80px; /* Fixe la navbar qui cache le contenu */
}

/*==================Header=================*/


header.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #222;
    padding: 15px 30px;
    color: white;
}

header .logo {
    font-size: 1.5rem;
    color: #00ffcc;
    text-decoration: none;
    font-weight: bold;
}

.nav-links a {
    margin-left: 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
}


.nav-links img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.nav-links a:hover {
    color: #00ffcc;
    transition: 0.3s;
}

main {
    padding: 30px;
}


/* ===================== Footer ====================== */

footer {
    text-align: center;
    padding: 20px;
    background-color: #eee;
    font-size: 0.9rem;
}


footer a {
    color: #555;
    text-decoration: none;
}

footer a:hover {
    color: #00ffcc;
    text-decoration: underline;
}

footer p copyright {
    text-align: left;
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/*==================Header/Navbar=================*/

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}


.logo {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
    color: #00ffcc;
    transition: color 0.3s ease;
}



.logo:hover {
    color: #66fff6;
}



.logo-image {
    height:0px; /*0 px to hide the image*/
    width: auto;
    margin-right: 10px;
    filter: drop-shadow(0 0 3px #00ffccaa);
}



/* Navigation links */

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}



.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}



.nav-links li a:hover {
    color: #00bcd4;
}

/* ===================== container ====================== */

.container {
    max-width: 1200px;
    margin: auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
}


/* ===================== Car List ====================== */

.car-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}


.car-card {
    width: 100%;
    margin-top: 20px;  
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}


.car-card:hover {
    transform: none;
}



.car-image img {
    width: 100%;
    height: auto; 
    object-fit: contain; 
}



.car-info {
    padding: 1rem;
    text-align: center;
}



.car-info h2 {
    font-size: 1.1rem;
    color: #1B1F3B;
}





/* ===================== Car small liste  ====================== */



/* Container pour les petites cartes */

#carList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
}



/* Média queries pour contrôler le nombre de colonnes */

@media (min-width: 1200px) {
    #carList {
        grid-template-columns: repeat(4, 1fr);
    }
}



@media (min-width: 900px) and (max-width: 1199px) {
    #carList {
        grid-template-columns: repeat(3, 1fr);
    }
}



@media (min-width: 600px) and (max-width: 899px) {
    #carList {
        grid-template-columns: repeat(2, 1fr);
    }
}



@media (max-width: 599px) {
    #carList {
        grid-template-columns: 1fr;
    }
}



.car-card.small-card {
    width: 100%; /* Prend toute la largeur de sa cellule grid */
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fafafa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease;
    margin: 0; /* Supprime le margin auto */
    display: flex;
    flex-direction: column;
}



.car-card.small-card:hover {
    transform: scale(1.03);
}

.specs-grid-small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    background: rgba(0,0,0,0.03);
    padding: 0.5rem;
    border-radius: 4px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    color: #555;
}

.score-badge {
    background: #1B1F3B;
    color: #00ffcc;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}


/* --- Filter Section --- */
.filter-section {
    margin-bottom: 2rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.filter-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #1B1F3B;
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

.filter-header:hover {
    background: #2a3055;
}

.filter-arrow {
    transition: transform 0.4s ease;
}

.filter-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 20px;
    transition: all 0.5s ease-in-out;
}

.filter-content.open {
    max-height: 1000px;
    opacity: 1;
    padding: 20px;
}

.filter-instruction {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-align: center;
}

.cyber-slider {
    width: 100%;
    margin-top: 10px;
    accent-color: #00ffcc;
}

.cyber-slider.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
}

.cyber-btn {
    background: #00ffcc;
    color: #111;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
    transition: 0.3s;
    width: auto;
}

.cyber-btn:hover {
    background: #00dbaf;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
}

.reset-link {
    color: #666;
    text-decoration: underline;
    font-size: 0.9rem;
    margin-left: 15px;
}

.filter-actions {
    text-align: center;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    padding: 10px 15px;
    background: #1B1F3B;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
}

.page-btn:hover {
    background: #00ffcc;
    color: #111;
}

.current-page {
    padding: 10px 15px;
    background: #eee;
    color: #333;
    border-radius: 5px;
    font-weight: bold;
}

/* --- Toggle Switch (Cyber Style) --- */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.tgl {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.tgl input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-tgl {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider-tgl:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.tgl input:checked + .slider-tgl {
    background-color: #1B1F3B;
}

.tgl input:checked + .slider-tgl:before {
    transform: translateX(20px);
    background-color: #00ffcc;
}


/* ===================== Formulas pages ====================== */



.formulas-section {

    max-width: 1000px;

    margin: 0 auto;

    padding: 3rem 2rem;

    background: #fdfdfd;

    border-radius: 12px;

    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);

    font-family: 'Georgia', serif;

    color: #2c2c2c;

}



.main-title {

    font-size: 2.5em;

    text-align: center;

    margin-bottom: 2rem;

    color: #3e3e3e;

}

main {

    padding: 30px;

    animation: fadeIn 0.8s ease-in;

}



@keyframes fadeIn {

    from {

        opacity: 0;

        transform: translateY(20px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



.intro {

    font-style: italic;

    text-align: center;

    margin-bottom: 3rem;

    color: #555;

}



.formula-block {

    margin-bottom: 3rem;

    padding-left: 1rem;

}



.formula-block h2 {

    color: #222;

    border-left: 4px solid #a51c30;

    padding-left: 10px;

    margin-bottom: 1rem;

}



.formula-entry {

    margin-bottom: 2rem;

    background-color: #fafafa;

    border-left: 3px solid #ccc;

    padding: 1rem;

    border-radius: 8px;

}



.formula-entry h3 {

    font-size: 1.3rem;

    color: #2c2c2c;

}



.formula-entry .math {

    font-family: monospace;

    font-size: 1.1rem;

    color: #444;

    margin: 0.5rem 0;

}



.formula-entry .desc {

    color: #666;

    font-size: 0.95rem;

}



code {

    background-color: #eee;

    padding: 2px 5px;

    border-radius: 4px;

    font-size: 0.95rem;

}





/* ===================== Credits ====================== */





.social-icons a img {

    width: 48px;

    height: 48px;

    transition: transform 0.3s ease, filter 0.3s ease;

    filter: grayscale(60%) brightness(1.2);

}



.social-icons a:hover img {

    transform: scale(1.15) rotate(2deg);

    filter: grayscale(0%) drop-shadow(0 0 6px #00ffccaa);

}







.container p:last-child {

    text-align: center;

    font-weight: 600;

    font-style: italic;

    color: #444;

    margin-top: 2rem;

    opacity: 0.8;

}



/* ===================== Donation Section ====================== */





.donation-section {

    max-width: 1000px;

    margin: 40px auto;

    padding: 30px;

    background-color: white;

    border-radius: 10px;

    border: 1px solid #DDDDDD;

    box-shadow: 0 0 10px rgba(0,0,0,0.05);

}



.donation-section:hover {

    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);

}



.donation-title {

    font-size: 2rem;

    font-weight: 700;

    color: #1B1F3B;

    margin-bottom: 1rem;

    font-family: 'Georgia', serif;

}



.donation-text {

    font-style: italic;

    color: #555;

    max-width: 1000px;

    margin: 0 auto 2rem;

    font-size: 1.1rem;

    line-height: 1.6;

}



.donation-buttons {

    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 30px;

    margin-bottom: 2rem;

}



.donation-img {

    height: 58px;

    border-radius: 8px;

    transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;

    filter: grayscale(60%) brightness(1.15);

    box-shadow: 0 2px 8px rgba(0,0,0,0.05);

}



.donation-img:hover {

    transform: scale(1.08);

    filter: grayscale(0%) drop-shadow(0 0 6px #FFD700);

    box-shadow: 0 4px 12px rgba(0,0,0,0.1);

}



.donation-thanks {

    font-size: 0.95rem;

    color: #666;

    opacity: 0.8;

    font-style: italic;

}



/* ===================== NEW SHOP STYLES (Ultra Design) ====================== */

.shop-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(27,31,59,0.1), rgba(0,255,204,0.05));
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.shop-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #00ffcc;
}

.shop-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #1B1F3B;
    color: white;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.shop-badge.gold { background: linear-gradient(45deg, #FFD700, #FFA500); color: #111; }
.shop-badge.red { background: #E10600; }

.shop-img-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-img-container img {
    width: 80%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.shop-card:hover .shop-img-container img {
    transform: scale(1.05);
}

/* Hover Overlay for image */
.overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(27,31,59,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-card:hover .overlay {
    opacity: 1;
}

.view-btn {
    color: white;
    border: 2px solid #00ffcc;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    transition: 0.3s;
}

.view-btn:hover {
    background: #00ffcc;
    color: #111;
}

.shop-details {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shop-details h3 {
    margin: 5px 0 15px;
    font-size: 1.2rem;
    color: #1B1F3B;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #1B1F3B;
}

.buy-btn {
    background: #1B1F3B;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: 0.3s;
}

.buy-btn:hover {
    background: #00ffcc;
    color: #111;
    box-shadow: 0 0 10px rgba(0,255,204,0.5);
}

.shop-footer {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 2rem;
}