/** @format */

.compteur-main {
    max-width: 100%;
    padding-bottom: 3rem;
    overflow-x: clip;
}
.compteur-main .article-hero {
    padding-bottom: 1.5rem;
}
.compteur-main .article-hero h1 {
    max-width: 27ch;
}
.compteur-lead {
    max-width: 68ch;
    font-size: 1.12rem;
}
.compteur-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(calc(100% - 2rem), 900px);
    max-width: 100%;
    margin-inline: auto;
}
.compteur-content > * {
    min-width: 0;
    max-width: 100%;
}
.compteur-content > h2 {
    margin-top: 2.4rem;
}
.compteur-content p {
    margin: 0 0 1rem;
}
.tool-panel {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    padding: clamp(1rem, 3vw, 2rem);
    background: #fff;
    border: 1px solid #e6e6eb;
    border-radius: 16px;
}
.tool-panel h2 {
    margin-top: 0;
}
#sms-text {
    display: block;
    width: 100%;
    min-height: 180px;
    margin-top: 10px;
    resize: vertical;
    padding: 14px;
    border: 1px solid #d4d4d8;
    border-radius: 10px;
    color: #1f2937;
    background: #fff;
    font: inherit;
    line-height: 1.55;
}
#sms-text:focus {
    outline: 2px solid #05c26a;
    outline-offset: 2px;
}
.tool-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}
.tool-panel .btn {
    font-size: 0.95rem;
    padding: 10px 14px;
    white-space: normal;
    text-align: center;
}
.tool-options label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.tool-options input[type="checkbox"] {
    appearance: none;
    display: grid;
    place-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 0;
    border: 1px solid #8a8a8a;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}
.tool-options input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 6px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    transform: translateY(-1px) rotate(-45deg) scale(0);
    transition: transform 120ms ease;
}
.tool-options input[type="checkbox"]:checked {
    border-color: #05c26a;
    background: #05c26a;
}
.tool-options input[type="checkbox"]:checked::before {
    transform: translateY(-1px) rotate(-45deg) scale(1);
}
.tool-options input[type="checkbox"]:focus-visible {
    outline: 2px solid #05c26a;
    outline-offset: 3px;
}
.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 1.2rem 0;
}
.metrics > div {
    min-width: 0;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 10px;
}
.metrics > div:nth-child(-n + 2) {
    padding-bottom: 7px;
}
.metrics span,
.metrics strong {
    display: block;
}
.metrics span {
    color: #66696b;
    font-size: 0.78rem;
    line-height: 1.35;
}
.metrics strong {
    margin-top: 5px;
    color: #1f2937;
    font-size: 1.2rem;
    overflow-wrap: anywhere;
}
.metrics > div:nth-child(-n + 2) span {
    font-size: 0.86rem;
}
.metrics > div:nth-child(-n + 2) strong {
    font-size: 1.4rem;
    line-height: 1.15;
}
.mobile-note,
.legend {
    font-size: 0.9rem;
}
.mobile-note {
    display: none;
}
.segment-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 48px;
}
.segment-card {
    flex: 1 1 240px;
    min-width: 0;
    padding: 10px 12px;
    background: #f5f5f5;
    border-radius: 10px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}
.segment-label {
    display: block;
    margin-bottom: 5px;
    color: #66696b;
    font-size: 0.75rem;
}
.empty-preview {
    color: #66696b;
}
.char-unicode {
    background: #ffe1e1;
    border-bottom: 2px solid #e53935;
    border-radius: 2px;
    cursor: help;
}
.char-extension {
    background: #e3efff;
    border-bottom: 2px solid #2878d0;
    border-radius: 2px;
    cursor: help;
}
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 10px !important;
}
.compliance-box {
    margin: 2rem 0;
    padding: 1.2rem 1.4rem;
    background: #f5f5f5;
    border-radius: 12px;
}
.compliance-box h2 {
    margin-top: 0;
    font-size: 1.35rem;
}
.compteur-content a.text-link,
.compliance-box a {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.compteur-content > .article-cta {
    max-width: none;
    margin: 2.2rem 0;
}
.compteur-content .article-cta-copy p {
    margin: 0;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
button:focus-visible,
a:focus-visible {
    outline: 2px solid #05c26a;
    outline-offset: 3px;
}
@media (max-width: 720px) {
    .tool-panel {
        width: 100%;
        min-width: 0;
        padding: 1rem;
    }
    #sms-text {
        box-sizing: border-box;
        min-height: 150px;
        padding: 12px;
        font-size: 16px;
    }
    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 1rem 0;
    }
    .metrics > div:last-child {
        grid-column: auto;
    }
    .metrics > div,
    .metrics > div:nth-child(-n + 2) {
        padding: 10px;
    }
    .metrics span,
    .metrics > div:nth-child(-n + 2) span {
        font-size: 0.75rem;
    }
    .metrics strong,
    .metrics > div:nth-child(-n + 2) strong {
        font-size: 1.15rem;
    }
    .tool-options {
        align-items: flex-start;
        flex-direction: column;
    }
    .mobile-note {
        display: block;
    }
}

@media (max-width: 380px) {
    .tool-panel {
        padding: 0.8rem;
    }
    .metrics > div,
    .metrics > div:nth-child(-n + 2) {
        padding: 8px;
    }
    .metrics span,
    .metrics > div:nth-child(-n + 2) span {
        font-size: 0.7rem;
    }
    .metrics strong,
    .metrics > div:nth-child(-n + 2) strong {
        font-size: 1.05rem;
    }
}
