:root {
    --primary-color: #121212;
    --secondary-color: #f5f5f7;
    --accent-color: #0071e3;
    --text-color: #1d1d1f;
    --success-color: #34c759;
    --error-color: #ff3b30;
    --border-color: #d2d2d7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* test */

.quantity-section {
    background-color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.quantity-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-color);
}

.total-quantity-selector {
    margin-bottom: 25px;
}

.total-quantity-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.total-quantity-selector select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.total-quantity-selector select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.color-distribution {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.color-distribution h4 {
    margin-bottom: 15px;
    color: var(--text-color);
}

.color-dist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 10px;
    background-color: white;
    border-radius: 8px;
}

.color-dist-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-dist-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
}

.color-dist-input {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
}

.order-summary-preview {
    text-align: right;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.total-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    height: 80px;
    width: 100%;
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.3s;
}

.header-scrolled {
    background-color: rgba(245, 245, 247, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.white-nav .nav-links a {
    color: white !important;
}

.white-nav .nav-links a:hover {
    color: var(--accent-color) !important;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo img {
    width: 240px !important;
    height: auto !important;
}

.logo-dark,
.logo-light {
    transition: opacity 0.3s ease;
}

.header.dark {
    background-color: #121212;
}

.header.dark .nav-links a {
    color: white !important;
}

.header.dark .nav-links a:hover {
    color: var(--accent-color) !important;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 40px;
}

.steps-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.step.active {
    background-color: var(--accent-color);
    color: white;
}

.step.completed {
    background-color: var(--success-color);
    color: white;
}

.step.inactive {
    background-color: #e0e0e0;
    color: #666;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 120px;
}

.main-image {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* ou 'contain' si vous ne voulez pas de rognage */
    border-radius: 12px;
    display: block;
}



/* Nouvelle galerie de miniatures */
.image-thumbnails {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail.active {
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.main-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    position: relative;
}

.color-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
    border-radius: 12px;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.product-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.stars {
    color: #ff9500;
    font-size: 1.2rem;
}

.color-selector {
    margin: 30px 0;
}

.color-selector h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.color-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.color-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
    border-color: var(--accent-color);
    transform: scale(1.2);
}

.color-option::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.color-option.selected::after {
    opacity: 1;
}

.price-section {
    background-color: rgba(0, 113, 227, 0.05);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.launch-offer {
    background-color: var(--success-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.price-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: white;
}

.price-option:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.1);
}

.price-option.selected {
    border-color: var(--accent-color);
    background-color: rgba(0, 113, 227, 0.05);
}

.checkout-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-section {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group.error input {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 5px;
}

.order-summary {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.btn-primary:hover {
    background-color: #0062c2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

.btn-secondary {
    width: 100%;
    padding: 15px;
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

#paypal-button-container {
    margin-top: 20px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-content {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.success-message {
    text-align: center;
    padding: 40px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .product-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }

    .nav-links {
        display: none;
    }

    .product-title {
        font-size: 2rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .steps-indicator {
        flex-direction: column;
        gap: 10px;
    }

    .color-options {
        justify-content: center;
    }

    .image-thumbnails {
        gap: 10px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }
}