/* =============================================================================
   article1.css - PT SLAB CALCULATOR (PT vs RC depth)
   Article : The Ultimate Guide to Post-Tension Slabs
   Chemin  : public_html/assets/css/articles/article1.css
   Dashboard, Extra stylesheets : css/articles/article1.css

   Repris de l'ancien article PHP (bloc <style> de l'en-tete), limite aux
   classes pt-calc-* du calculateur insere par js/articles/article1.js.
   Palette : #2C5370, Inter / Merriweather.
   ============================================================================= */

.pt-calc-wrapper {
    background: #f4f6f8;
    border: 1px solid #d5dde5;
    border-top: 4px solid #2C5370;
    padding: 28px 30px;
    margin: 2rem 0;
    font-family: var(--font-body, 'Inter', sans-serif);
}
.pt-calc-header {
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #d5dde5;
}
.pt-calc-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #2C5370;
    margin-bottom: 6px;
}
.pt-calc-title {
    font-family: var(--font-heading, 'Merriweather', serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 6px;
    line-height: 1.25;
}
.pt-calc-title em { font-style: italic; font-weight: 300; color: #2C5370; }
.pt-calc-subtitle { font-size: 0.875rem; color: #666; line-height: 1.55; margin: 0; }

.pt-calc-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555;
    margin-bottom: 8px;
}

/* Span input row */
.pt-calc-span-row {
    display: flex;
    align-items: stretch;
    border: 1px solid #c0cad4;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pt-calc-span-row:focus-within {
    border-color: #2C5370;
    box-shadow: 0 0 0 3px rgba(44,83,112,0.12);
}
.pt-calc-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-heading, 'Merriweather', serif);
    font-size: 1.9rem;
    font-weight: 700;
    color: #111;
    padding: 8px 14px;
    outline: none;
    width: 0;
}
.pt-calc-input::placeholder { color: #bbb; font-style: italic; font-weight: 300; }
.pt-calc-unit {
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-left: 1px solid #c0cad4;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
    background: #f9fafb;
    border-radius: 0 4px 4px 0;
}

/* Slider */
.pt-calc-slider-wrap { margin-bottom: 20px; }
.pt-calc-track {
    position: relative;
    height: 4px;
    background: #c8d4de;
    margin: 10px 0 6px;
    border-radius: 2px;
}
.pt-calc-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: #2C5370;
    border-radius: 2px;
    transition: width 0.1s;
}
input.pt-calc-range {
    position: absolute;
    top: -10px; left: 0; right: 0;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 24px;
    background: transparent;
    cursor: pointer;
    outline: none;
}
input.pt-calc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    background: #2C5370;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #2C5370;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s;
}
input.pt-calc-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.pt-calc-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
}

/* Usage pills */
.pt-calc-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.pt-calc-pill { position: relative; }
.pt-calc-pill input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.pt-calc-pill label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 8px;
    border: 1px solid #c0cad4;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #fff;
    transition: all 0.18s;
    white-space: nowrap;
}
.pt-calc-pill label:hover {
    border-color: #2C5370;
    background: #eef3f7;
    color: #2C5370;
}
.pt-calc-pill input:checked + label {
    border-color: #2C5370;
    background: #2C5370;
    color: #fff;
}

/* Divider */
.pt-calc-divider { border: none; border-top: 1px solid #d5dde5; margin: 18px 0; }

/* Results */
.pt-calc-results { opacity: 0; transform: translateY(6px); transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none; }
.pt-calc-results.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.pt-calc-results-hdr {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pt-calc-results-hdr::after { content: ''; flex: 1; height: 1px; background: #d5dde5; }

/* Cards grid */
.pt-calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.pt-calc-card {
    padding: 18px 16px;
    border-radius: 4px;
    border: 1px solid #d5dde5;
    background: #fff;
}
.pt-calc-card.pt { background: #2C5370; border-color: #2C5370; color: #fff; }
.pt-calc-card-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.6;
    margin-bottom: 4px;
}
.pt-calc-card-sys {
    font-family: var(--font-heading, 'Merriweather', serif);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.pt-calc-card.rc .pt-calc-card-sys { color: #2C5370; }
.pt-calc-card.pt .pt-calc-card-sys { color: #a8cce0; }

.pt-calc-depth-val {
    font-family: var(--font-heading, 'Merriweather', serif);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}
.pt-calc-depth-unit {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
    margin-left: 3px;
}
.pt-calc-ratio-line { font-size: 0.72rem; opacity: 0.55; margin-top: 6px; }
.pt-calc-bar-wrap { margin-top: 10px; height: 3px; background: rgba(255,255,255,0.15); border-radius: 2px; position: relative; overflow: hidden; }
.pt-calc-card.rc .pt-calc-bar-wrap { background: #e8edf1; }
.pt-calc-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; transition: width 0.5s cubic-bezier(.16,1,.3,1); }
.pt-calc-card.pt .pt-calc-bar { background: rgba(255,255,255,0.45); }
.pt-calc-card.rc .pt-calc-bar { background: #2C5370; }

/* Savings bar */
.pt-calc-savings {
    background: #eef3f7;
    border: 1px solid #c0cad4;
    border-left: 4px solid #2C5370;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    border-radius: 0 4px 4px 0;
}
.pt-calc-savings-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: #555; }
.pt-calc-savings-note { font-size: 0.75rem; color: #888; margin-top: 3px; }
.pt-calc-savings-val {
    font-family: var(--font-heading, 'Merriweather', serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C5370;
    white-space: nowrap;
}

/* Ratio bars */
.pt-calc-ratio-rows { margin-bottom: 16px; }
.pt-calc-ratio-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pt-calc-ratio-sys { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; width: 20px; color: #888; flex-shrink: 0; }
.pt-calc-rbar-wrap { flex: 1; height: 6px; background: #e2e8ed; border-radius: 3px; position: relative; }
.pt-calc-rbar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; transition: width 0.45s cubic-bezier(.16,1,.3,1); }
.pt-calc-rbar.pt { background: #2C5370; }
.pt-calc-rbar.rc { background: #7a9ab5; }
.pt-calc-ratio-num { font-size: 0.72rem; color: #888; width: 52px; text-align: right; flex-shrink: 0; }

/* Empty state */
.pt-calc-empty { text-align: center; padding: 28px 16px; border: 1px dashed #c0cad4; border-radius: 4px; color: #aaa; background: #fff; }
.pt-calc-empty p { font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; margin: 0; }

/* Disclaimer */
.pt-calc-disclaimer {
    font-size: 0.75rem;
    color: #999;
    line-height: 1.55;
    border-top: 1px solid #d5dde5;
    padding-top: 12px;
    margin-top: 4px;
    font-style: italic;
}

/* Firefox : curseur du slider */
input.pt-calc-range::-moz-range-thumb {
    width: 12px; height: 12px;
    background: #2C5370;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #2C5370;
    border-radius: 50%;
    cursor: pointer;
}
input.pt-calc-range::-moz-range-track { background: transparent; }

/* Focus clavier visible sur les choix d'usage */
.pt-calc-pill input:focus-visible + label { outline: 2px solid #2C5370; outline-offset: 2px; }

/* Mobile */
@media (max-width: 600px) {
    .pt-calc-wrapper { padding: 20px 16px; }
    .pt-calc-usage-grid { grid-template-columns: 1fr; }
    .pt-calc-grid { grid-template-columns: 1fr; }
    .pt-calc-depth-val { font-size: 2rem; }
    .pt-calc-slider-labels span:nth-child(even) { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .pt-calc-results, .pt-calc-fill, .pt-calc-bar, .pt-calc-rbar { transition: none; }
}

/* Ancre slug#id : marge sous l'en-tete fixe */
.pt-calc-wrapper{scroll-margin-top:90px}