/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    padding: 20px 15px;
    color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-image {
    width: 180px;
    height: auto;
    margin-bottom: 0px;
    filter: drop-shadow(0 4px 20px rgba(59, 130, 246, 0.3));
}

.logo {
    font-size: 2.5em;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.tagline {
    color: #94a3b8;
    font-size: 1.1em;
    font-weight: 300;
}

/* Timeline */
.checkout-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
    padding: 0 20px;
}

.checkout-timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 80px;
    right: 80px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    z-index: 0;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
    flex: 1;
}

.timeline-step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.3s;
    font-size: 1.5em;
    position: relative;
    z-index: 2;
}

.timeline-icon {
    width: 28px;
    height: 28px;
    stroke: #ffffff;
    color: #ffffff;
}

.timeline-step-label {
    font-size: 0.9em;
    color: #64748b;
    font-weight: 600;
    transition: all 0.3s;
}

.timeline-step.active .timeline-step-circle {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: #8b5cf6;
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.timeline-step.active .timeline-step-label {
    color: #fff;
}

.timeline-step.completed .timeline-step-circle {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
}

.timeline-step.completed .timeline-step-label {
    color: #94a3b8;
}

.timeline-step:not(.active):not(.completed):hover .timeline-step-circle {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.1);
}

/* Steps */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.section {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.section-title {
    font-size: 1.5em;
    margin-bottom: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Upload - Compact version */
.upload-zone-compact {
    border: 2px dashed rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(139, 92, 246, 0.05);
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.upload-zone-compact:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.upload-zone-compact.has-image {
    padding: 0;
    border: 2px solid rgba(139, 92, 246, 0.5);
}

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-icon-container svg {
    width: 48px;
    height: 48px;
    stroke: #8b5cf6;
    margin-bottom: 12px;
}

.preview-container {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
}

.preview-container.active {
    display: block;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.remove-image:hover {
    background: #dc2626;
    transform: scale(1.1);
}

#imageInput {
    display: none;
}

/* Product Form */
.product-form {
    max-width: 600px;
    margin: 0 auto;
}

.image-quality-notice {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #93c5fd;
    line-height: 1.6;
}

.image-quality-notice svg {
    stroke: #60a5fa;
    flex-shrink: 0;
    margin-top: 2px;
}

.image-quality-notice strong {
    color: #dbeafe;
}

.custom-size-notice {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: #c4b5fd;
    line-height: 1.5;
}

.custom-size-notice svg {
    stroke: #a78bfa;
    fill: none;
    flex-shrink: 0;
}

.material-options-radio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.material-option-radio {
    position: relative;
    cursor: pointer;
}

.material-option-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.material-radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    min-height: 80px;
}

.material-option-radio:hover .material-radio-content {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

.material-option-radio input[type="radio"]:checked + .material-radio-content {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.material-name {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.material-multiplier {
    font-size: 0.85em;
    color: #94a3b8;
}

.product-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid rgba(139, 92, 246, 0.3);
}

.form-total-price {
    text-align: left;
}

.form-total-label {
    font-size: 0.9em;
    color: #94a3b8;
    margin-bottom: 5px;
}

.form-total-value {
    font-size: 2em;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-add-to-cart {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-add-to-cart:disabled {
    background: rgba(100, 116, 139, 0.3);
    cursor: not-allowed;
}

.added-items-message {
    margin-top: 25px;
    padding: 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #10b981;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

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

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.05);
    padding: 8px;
    border-radius: 12px;
    width: fit-content;
    margin-bottom: 25px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(139, 92, 246, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2em;
}

.quantity-btn:hover {
    background: rgba(139, 92, 246, 0.4);
}

.quantity-display {
    font-size: 1.2em;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.total-price-label {
    font-size: 0.85em;
    color: #94a3b8;
    margin-bottom: 5px;
}

.total-price-value {
    font-size: 1.8em;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.add-to-cart {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.add-to-cart:disabled {
    background: rgba(100, 116, 139, 0.3);
    cursor: pointer;
}

/* Button */
.btn-submit {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    color: white;
    padding: 18px 40px;
    border-radius: 16px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-submit:disabled {
    background: rgba(100, 116, 139, 0.3);
    cursor: not-allowed;
}

/* Grid layout for steps 2 and 3 */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 360px);
    gap: 25px;
    align-items: start;
    max-width: 100%;
}

.sticky-summary {
    position: sticky;
    top: 20px;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #cbd5e1;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.form-input {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1em;
    transition: all 0.3s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.form-input::placeholder {
    color: #64748b;
}

.form-input option {
    background: #1e293b; /* Fond sombre pour la lisibilité */
}

/* Summary box */
.order-summary-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 25px;
}

.form-section-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 20px;
}

.summary-item-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #94a3b8;
}

.summary-item-line .value {
    color: #fff;
    font-weight: 600;
}

.cart-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.cart-item:last-of-type {
    margin-bottom: 20px;
}

.cart-item-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-item-title {
    font-weight: 600;
    color: #fff;
    font-size: 0.95em;
    margin-bottom: 4px;
}

.cart-item-specs {
    font-size: 0.85em;
    color: #94a3b8;
}

.cart-item-price {
    font-weight: 700;
    color: #fff;
    align-self: center;
}

.cart-item-remove {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: scale(1.1);
}

.cart-item-removed-message {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 600;
    z-index: 3000;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

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

.summary-item-line.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(139, 92, 246, 0.3);
    font-size: 1.3em;
    font-weight: 700;
    color: #fff;
}

/* Payment */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.payment-method-option {
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.payment-method-option:hover {
    border-color: rgba(139, 92, 246, 0.5);
}

.payment-method-option.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.2);
}

/* Success */
.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3em;
}

.success-title {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 10px;
}

.success-text {
    color: #94a3b8;
    line-height: 1.6;
}

/* Inspiration */
.inspiration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.inspiration-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.inspiration-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.inspiration-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: rgba(255,255,255,0.05);
}

.inspiration-title {
    padding: 20px;
    font-weight: 600;
    text-align: center;
}

/* Reminder popup */
.upload-reminder {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 23, 42, 0.98);
    border: 2px solid #f59e0b;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.7);
    z-index: 3000;
    text-align: center;
    max-width: 500px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.upload-reminder-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: #f59e0b;
}

.upload-reminder-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 15px;
}

.upload-reminder-text {
    color: #94a3b8;
    margin-bottom: 25px;
    line-height: 1.6;
}

.upload-reminder-button {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s;
}

.upload-reminder-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Cropper Modal */
.cropper-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cropper-modal-content {
    background: #1e293b;
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 1000px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.cropper-modal-body {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    margin-top: 20px;
    height: 50vh; /* Hauteur définie pour le corps de la modale */
    max-height: 600px;
}

.cropper-image-container {
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
}

#imageToCrop {
    display: block;
    max-width: 100%;
}

.cropper-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rotation-buttons {
    display: flex;
    gap: 10px;
}

.rotation-buttons .quantity-btn {
    width: 100%;
    font-size: 1.5em;
    padding: 5px;
}

.cropper-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 1200px) {
    .two-column-layout {
        grid-template-columns: 1fr minmax(280px, 320px);
        gap: 20px;
    }

    .container {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }

    .sticky-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .checkout-timeline::before {
        display: none;
    }

    .material-options {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .payment-methods-grid {
        grid-template-columns: 1fr;
    }

    body {
        padding: 20px 10px;
    }

    .section {
        padding: 25px;
    }
}
