/* VARIABLES */
:root {
    --main-bg: linear-gradient(120deg, #e0f7fa 0%, #e3fcec 100%);
    --container-bg: #fff;
    --header-gradient: linear-gradient(120deg, #009688 0%, #43e97b 100%);
    --header-color: #fff;
    --primary: #009688;
    --primary-dark: #00796b;
    --secondary: #43e97b;
    --secondary-dark: #38b87c;
    --accent: #00bcd4;
    --form-bg: #f6fffa;
    --info-bg: #e0f7fa;
    --info-border: #00bcd4;
    --error-bg: #ffeaea;
    --error-color: #c0392b;
    --button-gradient: linear-gradient(120deg, #009688 0%, #43e97b 100%);
    --button-hover: #38b87c;
    --button-text: #fff;
    --result-gradient: linear-gradient(120deg, #43e97b 0%, #00bcd4 100%);
    --result-shadow: 0 2px 12px rgba(0, 188, 212, 0.10);
    --border-radius: 12px;
    --input-border: #b2dfdb;
    --input-focus: #009688;
    --label: #333;
    --text: #222;
    --muted: #888;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--main-bg);
    min-height: 100vh;
    padding: 24px;
}
/* Harmonisation boutons fréquence desktop */
@media (min-width: 1024px) {
    .frequency-option label {
        min-width: 140px;
        max-width: 160px;
        height: 48px;
        white-space: normal;
        word-break: break-word;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
        padding: 8px 12px;
    }
}

/* Illustration éponge centrée */
.waiting-illustration-img {
    display: block;
    margin: 32px auto 16px auto;
}

/* Encart Le saviez-vous sous le devis */
#tip-below-devis {
    margin-top: 32px;
    display: block;
}


.waiting-extra {
    background: linear-gradient(120deg, #e0f7fa 0%, #e3fcec 100%);
    border-left: 4px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 16px 18px 14px 18px;
    color: #222;
    box-shadow: 0 1px 4px rgba(0, 150, 136, 0.07);
    font-size: 1rem;
    margin: 0;
    margin-top: 22px;
}

.waiting-extra strong {
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: block;
}

#tip-below-devis {
    display: block !important;
    margin-top: 32px;
    animation: slideIn 0.5s ease;
}

/* --- BOUTONS + ENCARt EN LIGNE --- */
.form-actions-tip {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-top: 18px;
}

.form-actions-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 220px;
    flex-shrink: 0;
}

.form-tip {
    flex: 1;
    background: linear-gradient(120deg, #e0f7fa 0%, #e3fcec 100%);
    border-left: 4px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 16px 18px 14px 18px;
    color: #222;
    box-shadow: 0 1px 4px rgba(0, 150, 136, 0.07);
    font-size: 1rem;
    margin: 0;
    margin-top: 22px;
}

.form-tip h4 {
    margin: 0 0 7px 0;
    font-size: 1.05rem;
    color: var(--primary);
}

.form-tip p {
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 800px) {
    .form-actions-tip {
        flex-direction: column;
        gap: 10px;
    }

    .form-tip {
        margin-top: 10px;
        width: 100%;
    }
}

/* --- ILLUSTRATION D'ATTENTE --- */
.waiting-illustration {
    background: var(--result-gradient);
    border-radius: var(--border-radius);
    color: #fff;
    padding: 32px 28px 28px 28px;
    min-height: 340px;
    box-shadow: var(--result-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: slideIn 0.5s ease;
    text-align: center;
}

/* Accessibilité : éléments cachés et focus visible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- BOUTON RESET --- */
.reset-btn {
    width: 100%;
    padding: 13px;
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
}

.reset-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 150, 136, 0.10);
}


.container {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(60, 60, 120, 0.10);
    overflow: hidden;
}

.header {
    background: var(--header-gradient);
    color: var(--header-color);
    padding: 38px 32px 30px 32px;
    text-align: center;
}

.header h1 {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.92;
}

/* --- GRID LAYOUT --- */
.content {
    padding: 40px 32px;
}

.simulator-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    align-items: flex-start;
}

.simulator-left {
    min-width: 0;
}

.simulator-right {
    min-width: 0;
}

/* --- INFO SECTION --- */
.info-section {
    background: var(--info-bg);
    padding: 18px 20px 18px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 28px;
    border-left: 4px solid var(--info-border);
}

.info-section h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.08rem;
}

.info-section ul {
    margin-left: 18px;
    color: #444;
    font-size: 0.98rem;
}

/* --- FORMULAIRE --- */
.form-section {
    background: var(--form-bg);
    border-radius: var(--border-radius);
    padding: 24px 20px 18px 20px;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.06);
}

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

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: var(--label);
    font-size: 1rem;
}

input[type="number"] {
    width: 100%;
    padding: 13px;
    border: 2px solid var(--input-border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: #fff;
    transition: border 0.2s;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--input-focus);
    background: var(--info-bg);
}

/* --- FREQUENCE --- */
.frequency-options {
    display: flex;
    gap: 16px;
    margin-top: 7px;
    justify-content: stretch;
}

.frequency-option {
    flex: 1;
    min-width: 0;
}

.frequency-option input[type="radio"] {
    display: none;
}

.frequency-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border: 2px solid var(--input-border);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    background: #fff;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.18s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    outline: none;
    user-select: none;
    position: relative;
}

.frequency-option label:active,
.frequency-option label:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--accent);
}

.frequency-option input[type="radio"]:checked+label {
    background: var(--button-gradient);
    color: var(--button-text);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.13);
    z-index: 1;
}

.frequency-option label:hover {
    border-color: var(--primary);
    background: #e0f7fa;
    color: var(--primary-dark);
}

/* --- CHECKBOX --- */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 2px solid var(--input-border);
    transition: border 0.2s;
}

.checkbox-group:hover {
    border-color: var(--primary);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
}

/* --- BOUTON --- */
.calculate-btn {
    width: 100%;
    padding: 15px;
    background: var(--button-gradient);
    color: var(--button-text);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.08rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 18px;
    transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
}

.calculate-btn:hover {
    box-shadow: 0 6px 18px rgba(0, 188, 212, 0.18);
    transform: translateY(-2px);
    background: var(--button-hover);
}

/* --- ERREUR --- */
.error {
    background: var(--error-bg);
    color: var(--error-color);
    padding: 13px 14px;
    border-radius: 8px;
    margin-top: 13px;
    font-size: 0.98rem;
    display: none;
}

/* --- DEVIS (ASIDE) --- */
.results {
    background: var(--result-gradient);
    border-radius: var(--border-radius);
    color: #fff;
    padding: 32px 28px 28px 28px;
    min-height: 340px;
    box-shadow: var(--result-shadow);
    display: none;
    animation: slideIn 0.5s ease;
}

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

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

.results h3 {
    font-size: 1.35rem;
    margin-bottom: 18px;
    text-align: center;
}

.price-breakdown {
    display: grid;
    gap: 13px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 1.01rem;
}

.price-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.13rem;
    padding-top: 18px;
    border-top: 2px solid rgba(255, 255, 255, 0.22);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .simulator-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .content {
        padding: 28px 10px;
    }
}

@media (max-width: 800px) {
    .simulator-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .simulator-right {
        margin-top: 32px;
    }
}

@media (max-width: 600px) {
    .frequency-options {
        flex-direction: column;
        gap: 10px;
    }

    .frequency-option {
        width: 100%;
        min-width: 0;
    }

    .frequency-option label {
        width: 100%;
        min-width: 0;
        justify-content: center;
        align-items: center;
        font-size: 1rem;
        padding: 0;
        white-space: nowrap;
    }

    .container {
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(60, 60, 120, 0.10);
    }

    .header {
        padding: 22px 8px 16px 8px;
    }

    .content {
        padding: 12px 2px;
    }

    .results {
        padding: 18px 8px 14px 8px;
        min-height: 0;
    }
}