/* Global reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Palette de couleurs R2-D2 */
:root {
    --r2d2-blue: #0A4D9E;
    --r2d2-silver: #B4B9C2;
    --r2d2-white: #FFFFFF;
    --background-dark: #0d1117; /* Un fond sombre, type espace */
    --text-color: #f0f0f0;
    --header-bg: #161b22;
}

/* Typographie et couleurs globales */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- Header et Navigation (Styles adaptés) --- */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 40px;
    background-color: var(--header-bg); /* Nouvelle couleur */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--r2d2-blue); /* Liseré bleu */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.header-hidden {
    transform: translateY(-100%);
}

.title {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 20px;
}

.logo-header {
    max-width: 70px;
    height: auto;
}

.header-left, .header-right {
    display: flex;
    list-style: none;
}

.header-left { margin-right: 30px; }
.header-right { margin-left: 25px; }

nav ul li a {
    text-decoration: none;
    color: var(--text-color); /* Couleur de texte adaptée */
    font-size: 18px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: 0.3s;
}

/* Hover des liens du header sur le thème R2-D2 */
nav ul li a:hover {
    color: var(--header-bg);
    background-color: var(--r2d2-silver);
}

/* Cacher le menu mobile sur desktop par défaut */
.mobile-header {
    display: none;
}

/* --- Menu Mobile (Styles adaptés) --- */
@media (max-width: 768px) {
    header { display: none; }
    .mobile-header {
        display: block;
        background-color: var(--header-bg); /* Nouvelle couleur */
        color: white;
        padding: 10px;
        border-bottom: 1px solid var(--r2d2-blue);
    }
    .mobile-header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .mobile-logo img { height: 40px; margin-right: 10px; }
    .burger { font-size: 28px; cursor: pointer; }
    .mobile-menu {
        display: none;
        flex-direction: column;
        margin-top: 10px;
    }
    .mobile-menu.open { display: flex; }
    .mobile-menu a {
        color: white;
        padding: 10px 0;
        text-decoration: none;
        border-top: 1px solid #444;
        font-weight: bold;
    }
    .mobile-menu a:hover {
        background-color: var(--r2d2-blue);
    }
}

/* --- NOUVELLES SECTIONS : PRÉCOMMANDE --- */

.preorder-main {
    padding: 40px 20px;
}

/* Section Hero */
.preorder-hero {
    text-align: center;
}

.container {
    max-width: 900px;
    margin: auto;
}

.hero-title {
    font-size: 3em;
    color: var(--r2d2-white);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 15px var(--r2d2-blue);
}

.hero-subtitle {
    font-size: 1.2em;
    color: var(--r2d2-silver);
    margin-bottom: 30px;
}

.main-product-image {
    max-width: 100%;
    /* Taille augmentée pour une meilleure qualité visuelle */
    width: 500px;
    height: auto;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: none; /* Ombre retirée car maintenant dans un conteneur */
}

/* Nouvelle "fenêtre" qui englobe l'image et la box de précommande */
.product-preorder-window {
    background-color: var(--header-bg);
    border: 2px solid var(--r2d2-blue);
    border-radius: 15px;
    padding: 30px;
    /* Largeur max augmentée pour s'adapter à la nouvelle taille de l'image */
    max-width: 560px;
    margin: 30px auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.preorder-box {
    /* Les styles de la boîte ont été déplacés vers .product-preorder-window */
}

.price {
    font-size: 3.5em;
    font-weight: 700;
    color: var(--r2d2-white);
    margin-bottom: 10px;
}

.preorder-counter {
    font-size: 1.3em;
    color: var(--r2d2-silver);
    margin-bottom: 25px;
}

.preorder-button {
    display: inline-block;
    background-color: var(--r2d2-blue);
    color: var(--r2d2-white);
    padding: 15px 50px;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.preorder-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--r2d2-blue);
    background-color: #1A6DCE;
}

.limited-note {
    margin-top: 15px;
    color: var(--r2d2-silver);
    font-style: italic;
}

/* Sections Galerie et Specs */
.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-top: 80px;
    margin-bottom: 40px;
    color: var(--r2d2-white);
    text-shadow: 0 0 10px var(--r2d2-blue);
}

.gallery-grid {
    display: grid;
    /* Taille minimale des colonnes augmentée pour des images plus grandes */
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 30px;
    /* Largeur max augmentée */
    max-width: 1400px;
    margin: auto;
}

.gallery-item {
    background-color: var(--header-bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #2a2f36;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(10, 77, 158, 0.4);
}

.gallery-item img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.gallery-item h3 {
    font-size: 1.5em;
    color: var(--r2d2-blue);
    margin-bottom: 10px;
}

.product-specs {
    max-width: 800px;
    margin: auto;
    padding-bottom: 50px;
    text-align: center;
}

.product-specs ul {
    list-style: none;
    padding: 0;
}

.product-specs li {
    background-color: var(--header-bg);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid var(--r2d2-blue);
    font-size: 1.1em;
}

.preorder-cta {
    text-align: center; /* Centers the button */
    margin: 40px 0; /* Adds some space above and below */
}

.preorder-cta .preorder-button {
    /* You can reuse styles from your existing .preorder-button or add new ones */
    display: inline-block;
    padding: 15px 30px;
    background-color: #007bff; /* Example background color */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.preorder-cta .preorder-button:hover {
    background-color: #0056b3; /* Example hover color */
}

/* --- Footer (Styles adaptés) --- */
footer {
    background-color: var(--header-bg);
    padding: 20px;
    position: relative;
    color: #aaa;
    border-top: 1px solid #2a2f36;
}

footer p {
    text-align: center;
    margin-bottom: 10px;
}

footer .socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

footer .socials a img {
    width: 30px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

footer .socials a img:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.legal-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.legal-button {
    display: inline-block;
    padding: 5px 15px;
    background-color: #1A6DCE;
    color: #201d22;
    font-size: 16px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
    width: fit-content;
}

.legal-button:hover {
    background-color: #1A6DCE;
}

/* Ajustements responsives pour les nouvelles sections */
@media (max-width: 768px) {
    .hero-title { font-size: 2.2em; }
    .price { font-size: 2.8em; }
    .preorder-button { font-size: 1.2em; padding: 12px 40px; }
    .section-title { font-size: 2em; }
    /* Ajustement de la grille pour mobile */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}