/* Calculator Hero Section */
.calculator-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.calculator-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
}

.calculator-hero-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.calculator-hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -2;
}

.calculator-hero-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 116, 95, 0.8) 0%, rgba(62, 51, 42, 0.9) 100%);
    z-index: -1;
}

.calculator-hero-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
}

.calculator-hero-content {
    color: white;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
}

.calculator-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1.1;
    margin: 1.5rem 0;
}

.calculator-hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.calculator-hero-benefits {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.benefit-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.calculator-preview-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    min-width: 280px;
}

.preview-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.preview-result {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    text-align: center;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-text {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.scroll-line {
    width: 2px;
    height: 30px;
    background: white;
    margin: 0 auto;
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
    60% { opacity: 0.6; }
}

/* Calculator Form Section */
.calculator-form-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Steps Progress */
.calculator-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 25px;
    border: 2px solid #e5e5e5;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.step.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: #666;
}

.step.active .step-number {
    background: white;
    color: var(--primary-color);
}

/* Form Steps */
.form-step {
    display: none;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-step h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.form-step p {
    color: #666;
    margin-bottom: 2rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Shape Options */
.shape-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.shape-option {
    cursor: pointer;
}

.shape-option input {
    display: none;
}

.shape-card {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.shape-option input:checked + .shape-card {
    border-color: var(--primary-color);
    background: #f9f7f5;
}

.shape-card:hover {
    border-color: #ccc;
}

.shape-visual {
    height: 60px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-1L, .shape-2L, .shape-3L {
    background: var(--primary-color);
    opacity: 0.8;
    border-radius: 3px;
}

.shape-1L {
    width: 60px;
    height: 15px;
}

.shape-2L {
    width: 40px;
    height: 40px;
    position: relative;
}

.shape-2L::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    width: 15px;
    height: 40px;
    background: var(--primary-color);
    opacity: 0.8;
    border-radius: 3px;
}

.shape-3L {
    width: 30px;
    height: 30px;
    position: relative;
}

.shape-3L::after,
.shape-3L::before {
    content: '';
    position: absolute;
    background: var(--primary-color);
    opacity: 0.8;
    border-radius: 3px;
}

.shape-3L::after {
    right: -15px;
    top: 0;
    width: 12px;
    height: 30px;
}

.shape-3L::before {
    bottom: -15px;
    left: 0;
    width: 30px;
    height: 12px;
}

/* Dimensions */
.dimensions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.dimension-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dimension-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.dimension-group input {
    padding: 0.8rem;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.dimension-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Openings */
.openings-container {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.opening-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.opening-section h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.opening-group {
    margin-bottom: 1.5rem;
}

.opening-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.opening-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.opening-item h5 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.8rem;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.opening-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-add-opening,
.btn-remove-opening {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-opening:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-remove-opening {
    background: #fee;
    color: #d32f2f;
    border-color: #ffcdd2;
}

.btn-remove-opening:hover {
    background: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Model Options */
.model-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.model-option {
    cursor: pointer;
}

.model-option input {
    display: none;
}

.model-card {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.model-option input:checked + .model-card {
    border-color: var(--primary-color);
    background: #f9f7f5;
}

.model-image {
    height: 80px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.casquette-visual,
.deux-niveaux-visual {
    width: 60px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary-color) 0%, var(--primary-color) 40%, transparent 40%);
    border-radius: 4px;
    position: relative;
}

.deux-niveaux-visual {
    background: linear-gradient(to bottom, var(--primary-color) 0%, var(--primary-color) 30%, transparent 30%, transparent 70%, var(--primary-color) 70%);
}

.model-multiplier {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Materials */
.materials-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.material-group h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.material-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.material-option,
.thickness-option,
.feature-option {
    cursor: pointer;
}

.material-option input,
.thickness-option input,
.feature-option input {
    display: none;
}

.material-card {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.material-option input:checked + .material-card {
    border-color: var(--primary-color);
    background: #f9f7f5;
}

.material-sample {
    width: 100%;
    height: 30px;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}

.material-sample.melamine {
    background: linear-gradient(45deg, #f5f5f5, #e0e0e0);
}

.material-sample.bois {
    background: linear-gradient(45deg, #8d7053, #6b5233);
}

.material-sample.laque {
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    border: 1px solid #ddd;
}

.material-price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.8rem;
}

.thickness-options,
.features-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.thickness-option,
.feature-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.thickness-option input:checked + span,
.feature-option input:checked + .checkbox-custom + span {
    font-weight: 600;
}

.thickness-option:has(input:checked),
.feature-option:has(input:checked) {
    border-color: var(--primary-color);
    background: #f9f7f5;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

.btn-secondary,
.btn-primary,
.btn-calculate {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e5e5e5;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background: #8b745f;
    border-color: #8b745f;
    transform: translateY(-1px);
}

.btn-calculate {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: 2px solid #28a745;
    font-weight: 600;
}

.btn-calculate:hover {
    background: linear-gradient(135deg, #218838, #1ea880);
    border-color: #218838;
    transform: translateY(-1px);
}

.btn-secondary svg,
.btn-primary svg,
.btn-calculate svg {
    width: 16px;
    height: 16px;
}

/* Results Sidebar */
.calculator-results {
    position: sticky;
    top: 2rem;
}

.results-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.calculation-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-label {
    color: #666;
    font-size: 0.9rem;
}

.breakdown-value {
    font-weight: 600;
    color: #333;
}

.price-result {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #8b745f);
    border-radius: 10px;
    color: white;
    margin: 1.5rem 0;
}

.price-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.price-note {
    font-size: 0.8rem;
    opacity: 0.8;
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.help-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.help-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
}

.help-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.help-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 1px solid rgba(139, 116, 95, 0.2);
    transition: all 0.3s ease;
}

.help-link:hover {
    color: #8b745f;
    border-bottom-color: #8b745f;
}

.help-link:last-child {
    border-bottom: none;
}

/* Current Calculator Indicator */
.calculator-option.current {
    border-color: var(--primary-color);
    background: rgba(139, 116, 95, 0.05);
    pointer-events: none;
}

.calculator-option.current .option-icon {
    background: var(--primary-color);
}

.calculator-option.current::after {
    content: 'Actuel';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Calculator Messages */
.calculator-message {
    position: fixed;
    top: 120px;
    right: 32px;
    padding: 16px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: var(--transition-medium);
    box-shadow: var(--shadow-large);
    max-width: 300px;
}

.calculator-message.success {
    background: #48bb78;
    border-left: 4px solid #38a169;
}

.calculator-message.error {
    background: #f56565;
    border-left: 4px solid #e53e3e;
}

.calculator-message.show {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .calculator-message {
        right: 16px;
        left: 16px;
        max-width: none;
        transform: translateY(-120px);
    }
    
    .calculator-message.show {
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .calculator-hero-container {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .calculator-hero-title {
        font-size: 2.5rem;
    }
    
    .calculator-hero-benefits {
        flex-direction: column;
        gap: 1rem;
    }
    
    .calculator-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .step span {
        display: none;
    }
    
    .shape-options,
    .model-options {
        grid-template-columns: 1fr;
    }
    
    .material-options {
        grid-template-columns: 1fr;
    }
    
    .dimensions-container {
        grid-template-columns: 1fr;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .calculator-form-section {
        padding: 2rem 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .opening-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-add-opening,
    .btn-remove-opening {
        justify-content: center;
    }
    
    .openings-container {
        gap: 1.5rem;
    }
    
    .opening-section {
        padding: 1rem;
    }
    
    .opening-item {
        padding: 1rem;
    }
}
