/* Encadré coordonnées calculateurs (spécifique) */
.contact-info-highlight {
    background: #fff;
    border-radius: 24px;
    max-width: 400px;
    margin: 2.5rem auto 2.5rem auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 2.5rem 2rem 2rem 2rem;
    text-align: center;
}
.contact-info-highlight h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.7rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    font-family: 'Inter','Segoe UI',Arial,sans-serif;
}
.contact-info-highlight h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    text-align: center;
    margin-top: 1.5rem;
}
.contact-info-highlight p {
    color: var(--text-light);
    margin-bottom: 0.5em;
    text-align: center;
}
/* Calculateurs Page Styles */

.hero-small {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.hero-small h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.hero-small p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.calculator-page {
    padding: 3rem 0;
}

.calculator-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.calculator-desc {
    color: var(--text-light);
    font-size: 1rem;
}

.calculator-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.calculator-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.1);
}

.form-group small {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.info-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.info-box h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-box ul li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.btn-calculate {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #d14045 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(193, 39, 45, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 39, 45, 0.4);
}

.btn-calculate:active {
    transform: translateY(0);
}

.result-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    border: 2px solid #e9ecef;
}

.result-container h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.result-grid {
    display: grid;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

.result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.result-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
}

.result-item.highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #fffaeb 100%);
    border: 2px solid #ffc107;
    padding: 1.2rem 1.5rem;
}

.result-item.highlight .result-value {
    font-size: 1.2rem;
    color: #d68500;
}

.result-item.highlight.primary {
    background: linear-gradient(135deg, #d4edda 0%, #e7f5e9 100%);
    border: 2px solid var(--secondary-color);
}

.result-item.highlight.primary .result-label {
    color: var(--secondary-color);
    font-size: 1.05rem;
}

.result-item.highlight.primary .result-value {
    color: var(--secondary-color);
    font-size: 1.4rem;
}

/* Sub-info inside a result-item (explanatory text) */
.result-item .result-info {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    color: #555;
    font-size: 0.95rem;
}

/* For conformity short status + detail inline */
.mc-status {
    font-weight:700;
    margin-right:0.6rem;
}
.mc-detail {
    color:#555;
    font-weight:500;
}

.result-item.highlight.warning {
    background: linear-gradient(135deg, #f8d7da 0%, #fdeaeb 100%);
    border: 2px solid var(--primary-color);
}

.result-item.highlight.warning .result-value {
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* Result summary (used by API fragments) */
.result-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: start;
}
.result-summary.summary-compact {
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
    border: 1px solid #e6eef6;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(12,38,63,0.04);
}
.result-summary-item {
    display: block;
    padding: 6px 8px;
}
.result-summary-label {
    display: block;
    font-weight: 700;
    color: #0b5c8a;
    font-size: 0.9rem;
    letter-spacing: 0.1px;
    text-transform: none;
}
.result-summary-value {
    display: block;
    margin-top: 6px;
    color: #06282f;
    font-weight: 800;
    font-size: 1.12rem;
}

.result-container.prixref-design .result-summary {
    justify-content: center;
    text-align: center;
    grid-auto-flow: row;
}

@media (max-width: 640px) {
    .result-summary { grid-template-columns: 1fr; }
}

.alert-box {
    background: linear-gradient(135deg, #fff3cd 0%, #fffaeb 100%);
    border-left: 4px solid #ffc107;
    padding: 1.2rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    color: #856404;
}

.alert-box.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #e8f4f8 100%);
    border-left-color: #17a2b8;
    color: #0c5460;
}

.alert-box strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* concurrent name inline style to avoid unwanted line breaks inside alert boxes */
.concurrent-name {
    display: inline;
    font-weight: 700;
}

.amount-inline {
    display: inline;
    font-weight: 700;
}

/* Affichage du classement: masquer la numérotation automatique de l'ol
   car les rangs sont gérés manuellement pour supporter les ex æquo */
.classement-offres ol {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}
.classement-offres li {
    margin-bottom: 0.4rem;
}

/* Timeline Visualization */
.timeline-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.timeline-container h4 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-align: center;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    position: relative;
    padding: 1rem 0 1rem 3rem;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 1.2rem;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item:last-child {
    border-left-color: transparent;
}

.timeline-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
}

.timeline-duration {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-card {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .result-value {
        font-size: 1.2rem !important;
    }

    .hero-small h2 {
        font-size: 1.5rem;
    }

    .calculator-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calculator-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .result-container {
        padding: 1rem;
    }

    .btn-calculate {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-container {
    animation: slideInUp 0.5s ease-out;
}

.result-item {
    animation: slideInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.result-item:nth-child(1) { animation-delay: 0.1s; }
.result-item:nth-child(2) { animation-delay: 0.15s; }
.result-item:nth-child(3) { animation-delay: 0.2s; }
.result-item:nth-child(4) { animation-delay: 0.25s; }
.result-item:nth-child(5) { animation-delay: 0.3s; }
.result-item:nth-child(6) { animation-delay: 0.35s; }
.result-item:nth-child(7) { animation-delay: 0.4s; }
