:root {
    --primary: #111111;
    --primary-light: #2a2a2a;
    --accent: #2075BF;
    --accent-hover: #2E8AD4;
    --steel: #9CA3AF;
    --steel-light: #D1D5DB;
    --dark: #F5F5F5;
    --card: #FFFFFF;
    --card-hover: #F9F9F9;
    --text: #111111;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --success: #10b981;
    --warning: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(32, 117, 191, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(32, 117, 191, 0.02) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E5E7EB' fill-opacity='0.6'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: white;
    letter-spacing: -1px;
    box-shadow: 0 0 20px rgba(32, 117, 191, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111111;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

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

.nav-links a {
    color: #4B5563;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #111111;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: #4B5563;
    border: 1px solid #D1D5DB;
}

.btn-ghost:hover {
    background: #F9F9F9;
    color: #111111;
    border-color: #9CA3AF;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: 0 0 20px rgba(32, 117, 191, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(32, 117, 191, 0.4);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* Main Layout */
.main {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
}

/* Wizard */
.wizard-header {
    margin-bottom: 2rem;
}

.wizard-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #111111 0%, #6B7280 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wizard-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.steps-indicator {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    background: #FFFFFF;
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 1rem;
}

.step-item.completed:not(:last-child)::after {
    background: var(--accent);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    background: #F3F4F6;
    color: #9CA3AF;
    border: 2px solid #E5E7EB;
    transition: all 0.3s;
}

.step-item.active .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 15px rgba(32, 117, 191, 0.3);
}

.step-item.completed .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.step-item.active .step-label {
    color: var(--text);
}

.step-item.completed .step-label {
    color: var(--text);
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    animation: fadeIn 0.4s ease-out;
}

.card:hover {
    border-color: #D1D5DB;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

/* Shape Grid */
.shape-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.shape-card {
    background: #FFFFFF;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.shape-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.25s;
}

.shape-card:hover {
    border-color: #2075BF;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(32, 117, 191, 0.12);
}

.shape-card.selected {
    border-color: var(--accent);
    background: rgba(32, 117, 191, 0.04);
}

.shape-card.selected::before {
    transform: scaleX(1);
}

.shape-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-icon svg {
    width: 100%;
    height: 100%;
    stroke: #D1D5DB;
    fill: none;
    stroke-width: 1.5;
    transition: stroke 0.25s;
}

.shape-card:hover .shape-icon svg,
.shape-card.selected .shape-icon svg {
    stroke: var(--accent);
}

.shape-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: capitalize;
}

.shape-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Dimensions */
.dimensions-panel {
    background: #F9FAFB;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.dimensions-panel.hidden {
    display: none;
}

.dimensions-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
}

.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.dim-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.dim-field label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dim-input-wrap {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s;
}

.dim-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(32, 117, 191, 0.1);
}

.dim-input-wrap input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0 0.75rem;
    color: #111111;
    font-size: 0.9375rem;
    outline: none;
    font-family: inherit;
    height: 100%;
}

.dim-input-wrap input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

.dim-unit {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-width: 45px;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    border-left: 1px solid var(--border);
    background: #F9FAFB;
    flex-shrink: 0;
}

.dim-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.option-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.option-card:hover {
    border-color: #2075BF;
}

.option-card.selected {
    border-color: var(--accent);
    background: rgba(32, 117, 191, 0.04);
}

.option-check {
    width: 22px;
    height: 22px;
    border: 2px solid #D1D5DB;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
}

.option-card.selected .option-check {
    background: var(--accent);
    border-color: var(--accent);
}

.option-check svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.option-card.selected .option-check svg {
    opacity: 1;
}

.option-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.option-info p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.option-price {
    margin-left: auto;
    font-weight: 700;
    color: var(--accent);
    font-size: 0.9375rem;
    white-space: nowrap;
}

/* Quantity */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}

.quantity-control button {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #374151;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control button:hover {
    background: #F3F4F6;
}

.quantity-control input {
    width: 60px;
    height: 40px;
    background: transparent;
    border: none;
    border-left: 1px solid #E5E7EB;
    border-right: 1px solid #E5E7EB;
    color: #111111;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    font-family: inherit;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #111111;
    font-size: 0.9375rem;
    transition: all 0.2s;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    outline: none;
}

.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(32, 117, 191, 0.1);
}

.form-textarea::placeholder {
    color: #9CA3AF;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Sidebar Summary */
.sidebar {
    position: sticky;
    top: 96px;
    height: fit-content;
}

.summary-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.summary-header {
    background: linear-gradient(135deg, #111111 0%, #2a2a2a 100%);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.summary-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #FFFFFF;
}

.summary-body {
    padding: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.summary-value {
    font-weight: 600;
    font-size: 0.875rem;
    text-align: right;
}

.summary-value.highlight {
    color: var(--accent);
}

.summary-total {
    background: #F9FAFB;
    margin: 0 -1.5rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.summary-total-label {
    font-weight: 700;
    font-size: 1.125rem;
    color: #374151;
}

.summary-total-value {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent);
}

.summary-note {
    padding: 1rem 1.5rem;
    background: rgba(245, 245, 245, 0.8);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border);
}

/* Preview */
.preview-area {
    background: #F3F4F6;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.preview-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.preview-placeholder svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.preview-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Info Box */
.info-box {
    background: rgba(32, 117, 191, 0.05);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.info-box svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid #222;
    background: #111111;
    padding: 3rem 2rem;
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
}

.footer-brand .logo-title {
    font-size: 1.25rem;
}

.footer-desc {
    color: #9CA3AF;
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    color: #FFFFFF;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6B7280;
    font-size: 0.8125rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Responsive */
@media (max-width: 1024px) {
    .main {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem 0;
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .main {
        padding: 1rem;
    }

    .steps-indicator {
        padding: 1rem;
        overflow-x: auto;
    }

    .step-label {
        display: none;
    }

    .shape-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dimensions-grid {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* --- 1. HARMONISATION DES DEUX CONTENEURS --- */
.dim-input-wrap, 
.select-wrap {
    display: flex;
    align-items: center;
    height: 42px; /* Force EXACTEMENT la même hauteur pour les deux */
    box-sizing: border-box;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s;
    width: 100%;
}

/* --- 2. ALIGNEMENT DES EFFETS AU FOCUS --- */
.dim-input-wrap:focus-within,
.select-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(32, 117, 191, 0.1);
}

/* --- 3. RESET ET CORRECTION DU SELECT (HAUTEUR ET COULEUR) --- */
.select-wrap select {
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 0.75rem;
    margin: 0;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text); /* Correction ici : var(--text) au lieu de var(--text-color) */
    flex: 1;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* --- 4. AJUSTEMENT DE L'INPUT DANS SON CONTENEUR --- */
/* On force l'input à prendre 100% de la hauteur du conteneur pour s'aligner sur le select */
.dim-input-wrap input {
    height: 100%; 
    padding: 0 0.75rem; /* Aligné sur le padding du select */
}

/* --- 5. DESIGN DE LA FLÈCHE DU SELECT (Pour remplacer la flèche système disparue) --- */
.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: "";
    position: absolute;
    right: 1rem;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted); /* Crée un petit triangle propre */
    pointer-events: none;
}

.select-wrap select {
    padding-right: 2.5rem; /* Évite que le texte passe sous la flèche */
}

.quote-table {
    width: 100%;
    border-collapse: collapse;
}

.text-success {
    --bs-text-opacity: 1;
    color: rgba(25, 135, 84, var(--bs-text-opacity)) !important;
}

.text-warning {
    --bs-text-opacity: 1;
    color: rgba(255, 193, 7, var(--bs-text-opacity)) !important;
}

.text-error {
    color: rgb(239, 68, 68);
}