/*
 * Audit SEO & GEO : front.
 *
 * - Pas de fond sur l'outil : le site hote gere le fond. Les titres et le formulaire heritent
 *   de sa couleur. Les cartes, elles, ont leur propre fond beige et texte noir (charte Premiere.Page),
 *   donc restent lisibles sur n'importe quel fond.
 * - Compact et pilote par la largeur du conteneur (container queries), pas par celle de l'ecran :
 *   l'outil peut vivre dans une colonne de 320 px comme en pleine largeur.
 * - Chargement inspire de "Loading State" de Beautiful UI (beautifului.dev, licence MIT) :
 *   grille de pixels, libelle scintillant, chronometre.
 */

.asg-tool {
    --asg-ink: #1b1b1b;
    --asg-paper: #fcfaf4;
    --asg-violet: #8f86fa;
    --asg-violet-light: #f4ebff;
    --asg-violet-soft: #d9d5ff;
    --asg-anis: #e2f14f;
    --asg-anis-light: #f3f9b1;
    --asg-rose: #f09cf9;
    --asg-rose-light: #fce0ff;
    --asg-track: #ece9e2;
    --asg-muted: #5f5d58;
    --asg-hairline: rgba(27, 27, 27, 0.12);
    --asg-line: rgba(128, 128, 128, 0.4);
    --asg-line: color-mix(in srgb, currentColor 28%, transparent);
    --asg-radius: 16px;

    container: asg / inline-size;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 15px;
    line-height: 1.45;
    width: 100%;
    max-width: 100%;
}

.asg-tool *,
.asg-tool *::before,
.asg-tool *::after {
    box-sizing: border-box;
}

.asg-tool p {
    margin: 0;
}

.asg-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Intro et formulaire ---------- */

.asg-form {
    margin-top: 0;
}

.asg-form__row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.asg-form__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 2.875rem;
    padding: 0 1rem;
    border: 1px solid var(--asg-line);
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: max(16px, 1rem); /* pas de zoom automatique sur iOS */
}

.asg-form__input::placeholder {
    color: inherit;
    opacity: 0.45;
}

.asg-form__input:focus {
    outline: none;
    border-color: var(--asg-violet);
    box-shadow: 0 0 0 3px rgba(143, 134, 250, 0.3);
}

.asg-form__message {
    margin-top: 0.5rem !important;
    font-size: 0.875rem;
    font-weight: 600;
}

.asg-turnstile {
    margin-top: 0.6rem;
    min-height: 65px;
}

.asg-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.875rem;
    padding: 0 1.25rem;
    border: 1px solid var(--asg-ink);
    border-radius: 12px;
    background: var(--asg-violet);
    color: var(--asg-ink);
    font: inherit;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.asg-button:hover {
    background: #a49dfb;
    color: var(--asg-ink);
}

.asg-button:active {
    transform: translateY(1px);
}

.asg-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.asg-button:focus-visible,
.asg-chip:focus-visible,
.asg-tool summary:focus-visible {
    outline: 2px solid var(--asg-violet);
    outline-offset: 2px;
}

/* ---------- En-tete du rapport ---------- */

.asg-report:empty {
    display: none;
}

.asg-report {
    margin-top: 1.5rem;
    scroll-margin-top: 1.5rem;
}

.asg-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.asg-head__domain {
    font-size: 1.1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.asg-head__meta {
    font-size: 0.8125rem;
    opacity: 0.7;
}

.asg-chip {
    display: inline-flex;
    align-items: center;
    height: 1.9rem;
    padding: 0 0.8rem;
    border: 1px solid var(--asg-line);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}

/* ---------- Chargement (d'apres Beautiful UI, MIT) ---------- */

.asg-loader {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.5rem;
}

.asg-pixels {
    display: grid;
    flex: none;
    grid-template-columns: repeat(3, 4px);
    gap: 1.5px;
}

.asg-pixels span {
    width: 4px;
    height: 4px;
    border-radius: 1px;
    background: currentColor;
    opacity: 0.15;
    animation: asg-pixel-on 650ms ease-in-out infinite;
}

.asg-shimmer {
    font-size: 0.875rem;
    font-weight: 500;
    color: transparent;
    background-image: linear-gradient(90deg, var(--asg-shimmer-base, rgba(27, 27, 27, 0.4)) 35%, var(--asg-shimmer-peak, #1b1b1b) 50%, var(--asg-shimmer-base, rgba(27, 27, 27, 0.4)) 65%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: asg-shimmer 1.4s linear infinite;
}

.asg-elapsed {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
}

@keyframes asg-pixel-on {
    0%, 100% { opacity: 0.15; }
    18%, 42% { opacity: 1; }
    62% { opacity: 0.15; }
}

@keyframes asg-shimmer {
    0% { background-position: 150% center; }
    100% { background-position: -50% center; }
}

@keyframes asg-spin {
    to { transform: rotate(360deg); }
}

/* Suivi des etapes : capsules, comme les "Task Rows" de Beautiful UI */
.asg-tasks {
    display: grid;
    gap: 0.4rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.asg-task {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.6rem;
    padding: 0.35rem 0.9rem 0.35rem 0.4rem;
    border: 1px solid var(--asg-ink);
    border-radius: 999px;
    background: var(--asg-paper);
    color: var(--asg-ink);
    font-size: 0.875rem;
    font-weight: 600;
}

.asg-task__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    font-size: 0.75rem;
}

.asg-task.is-done .asg-task__icon {
    background: var(--asg-violet);
}

.asg-task.is-running .asg-task__icon {
    border: 2px solid var(--asg-track);
    border-top-color: var(--asg-violet);
    animation: asg-spin 0.9s linear infinite;
}

.asg-task.is-pending .asg-task__icon {
    border: 1.5px solid var(--asg-hairline);
    color: var(--asg-muted);
}

.asg-task.is-pending {
    color: var(--asg-muted);
    font-weight: 500;
}

.asg-task__label {
    flex: 1 1 auto;
    min-width: 0;
}

.asg-task .asg-elapsed {
    margin-left: auto;
}

/* ---------- Grille et cartes ---------- */

.asg-card {
    position: relative;
    padding: 1rem;
    border: 1px solid var(--asg-ink);
    border-radius: var(--asg-radius);
    background: var(--asg-paper);
    color: var(--asg-ink);
    overflow: hidden;
}

.asg-card--flush {
    padding: 0;
}

.asg-card a {
    color: inherit;
}

.asg-card > * + * {
    margin-top: 0.75rem !important;
}

.asg-note {
    color: var(--asg-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.asg-card--flush .asg-note {
    padding: 0 1rem 0.9rem;
}

.asg-kicker {
    font-size: 0.8125rem;
    color: var(--asg-muted);
}

.asg-pill {
    display: inline-flex;
    align-items: center;
    height: 1.6rem;
    padding: 0 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--asg-ink);
    background: var(--asg-violet-light);
}

.asg-pill.is-ok { background: var(--asg-anis); }
.asg-pill.is-warning { background: var(--asg-rose-light); }
.asg-pill.is-error { background: var(--asg-violet-light); }
.asg-pill.is-violet { background: var(--asg-violet); }
.asg-pill.is-anis { background: var(--asg-anis); }
.asg-pill.is-ink { background: var(--asg-ink); color: var(--asg-paper); }

/* ---------- Graphiques en anneau ---------- */

.asg-ring {
    position: relative;
    width: min(150px, 58%);
    margin: 0.25rem auto 0;
    aspect-ratio: 1;
}

.asg-ring svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.asg-ring__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
}

.asg-ring__value {
    font-size: clamp(1.4rem, 7cqi, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.asg-ring__label {
    font-size: 0.6875rem;
    color: var(--asg-muted);
}

.asg-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-top: 0.9rem !important;
}

.asg-legend__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
}

.asg-verdict {
    text-align: center;
    color: var(--asg-muted);
    font-size: 0.875rem;
}

.asg-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
    font-size: 0.8125rem;
    color: var(--asg-muted);
}

.asg-facts strong {
    color: var(--asg-ink);
}

/* Metriques Core Web Vitals */
.asg-metrics {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
}

.asg-metrics li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.asg-metrics__value {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    white-space: nowrap;
}

.asg-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    border: 1px solid var(--asg-ink);
}

.asg-dot.is-ok { background: var(--asg-anis); }
.asg-dot.is-warning { background: var(--asg-rose); }
.asg-dot.is-error { background: var(--asg-violet); }

/* ---------- Tableau d'opportunites ---------- */

.asg-highlight {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.6rem;
    padding: 1rem 1rem 0;
}

.asg-highlight__value {
    font-size: clamp(1.4rem, 6cqi, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.asg-highlight__label {
    font-size: 0.875rem;
}

.asg-card--flush .asg-kicker {
    padding: 0 1rem;
}

.asg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.asg-table thead th {
    padding: 0.7rem 0.6rem;
    border-top: 1px solid var(--asg-ink);
    border-bottom: 1px solid var(--asg-ink);
    background: var(--asg-violet-light);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.asg-table td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid var(--asg-hairline);
    vertical-align: middle;
}

.asg-table th:first-child,
.asg-table td:first-child {
    padding-left: 1rem;
}

.asg-table th:last-child,
.asg-table td:last-child {
    padding-right: 1rem;
    text-align: right;
}

.asg-table th:nth-child(2),
.asg-table td:nth-child(2) {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.asg-table tbody tr:last-child td {
    border-bottom: 0;
}

.asg-table__keyword {
    display: block;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.asg-table__gain {
    display: block;
    font-size: 0.75rem;
    color: var(--asg-muted);
}

/* ---------- Lignes de statut (technique, IA) ---------- */

.asg-statuses {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.asg-status {
    border: 1px solid var(--asg-ink);
    border-radius: 12px;
    background: var(--asg-violet-light);
}

.asg-status.is-ok { background: var(--asg-anis-light); }
.asg-status.is-warning { background: var(--asg-rose-light); }
.asg-status.is-error { background: var(--asg-violet-light); }

.asg-status > summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.9rem;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
}

.asg-status > summary::-webkit-details-marker {
    display: none;
}

.asg-status__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.asg-status__icon {
    display: inline-flex;
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
}

.asg-status__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.asg-status__body {
    padding: 0 0.9rem 0.8rem;
    font-size: 0.8125rem;
}

.asg-status__body > * + * {
    margin-top: 0.5rem !important;
}

.asg-quote {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}

.asg-sublist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.asg-sublist li {
    display: flex;
    gap: 0.45rem;
    margin: 0.2rem 0;
}

.asg-sublist li::before {
    content: "";
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.38em;
    border-radius: 50%;
    border: 1px solid var(--asg-ink);
    background: var(--asg-anis);
}

.asg-sublist li.is-warning::before { background: var(--asg-rose); }
.asg-sublist li.is-error::before { background: var(--asg-violet); }

.asg-outline {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
}

.asg-outline li {
    margin: 0.1rem 0;
    overflow-wrap: anywhere;
}

.asg-outline li.is-h2 { padding-left: 0.8rem; }
.asg-outline li.is-h3 { padding-left: 1.6rem; }
.asg-outline li.is-h4,
.asg-outline li.is-h5,
.asg-outline li.is-h6 { padding-left: 2.4rem; }

.asg-outline__tag {
    display: inline-block;
    min-width: 1.8rem;
    font-weight: 700;
    color: var(--asg-muted);
}

.asg-ai__quote {
    font-style: italic;
    quotes: "\00AB\00A0" "\00A0\00BB";
}

.asg-subdetails summary {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* ---------- Concurrents ---------- */

.asg-compare {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.asg-compare__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.3rem 0.75rem;
    font-size: 0.8125rem;
}

.asg-compare__label {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.asg-compare__value {
    color: var(--asg-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.asg-compare__track {
    grid-column: 1 / -1;
    height: 10px;
    border-radius: 999px;
    background: var(--asg-track);
    overflow: hidden;
}

.asg-compare__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--asg-ink);
}

.asg-compare__row.is-own .asg-compare__fill {
    background: var(--asg-violet);
}

/* ---------- Appel a l'action et contact ---------- */

.asg-cta {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--asg-ink);
    border-radius: var(--asg-radius);
    background: var(--asg-ink);
    color: var(--asg-paper);
}

.asg-cta__title {
    font-size: clamp(1.15rem, 4cqi, 1.5rem);
    font-weight: 700;
    line-height: 1.2;
}

.asg-cta__text {
    margin-top: 0.4rem !important;
    font-size: 0.875rem;
    opacity: 0.8;
}

.asg-cta .asg-button {
    width: 100%;
    margin-top: 1rem;
    border-color: var(--asg-violet);
}

.asg-lead {
    margin-top: 0.75rem;
}

.asg-lead__title {
    font-weight: 600;
}

.asg-lead .asg-form__input {
    border-color: var(--asg-hairline);
    background: #fff;
    color: var(--asg-ink);
}

.asg-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.75rem;
    color: var(--asg-muted);
}

.asg-consent input {
    flex: none;
    width: 1rem;
    height: 1rem;
    margin: 0.1rem 0 0;
    accent-color: var(--asg-violet);
}

.asg-trap {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.asg-lead__done {
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .asg-tool *,
    .asg-tool *::before,
    .asg-tool *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
    }
}

/* ---------- Conteneur moyen et large ---------- */

@container asg (min-width: 480px) {
    .asg-form__row {
        flex-direction: row;
    }

    .asg-card {
        padding: 1.25rem;
    }

    .asg-card--flush {
        padding: 0;
    }

    .asg-cta .asg-button {
        width: auto;
    }
}

@container asg (min-width: 700px) {
    .asg-cta {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.5rem 1.5rem;
        padding: 1.5rem;
    }

    .asg-cta .asg-button {
        grid-row: 1 / span 2;
        grid-column: 2;
        margin-top: 0;
    }
}

/* ---------- Carte large : anneau a gauche, details a droite ---------- */

.asg-card {
    container: asg-card / inline-size;
}

.asg-split__side > * + * {
    margin-top: 0.75rem !important;
}

.asg-split > * + * {
    margin-top: 0.75rem;
}

@container asg-card (min-width: 520px) {
    .asg-split {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr);
        align-items: center;
        gap: 1.5rem;
    }

    .asg-split > * + * {
        margin-top: 0;
    }

    .asg-split .asg-ring {
        width: 150px;
        margin: 0;
    }

    .asg-split .asg-legend,
    .asg-split .asg-facts {
        justify-content: flex-start;
    }

    .asg-split .asg-legend {
        margin-top: 0 !important;
    }

    .asg-split .asg-verdict {
        text-align: left;
    }
}

/* ---------- Graphiques en traits (module charts-ticks.js) ---------- */

.asg-chart {
    width: min(240px, 100%);
    margin: 0 auto;
}

.asg-chart--wide {
    width: 100%;
    max-width: 420px;
    margin: 0;
}

.asg-chart svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.asg-chart text {
    font-family: inherit;
}

.asg-pill.is-faint {
    background: #e6e3da;
}

/* Graphiques en traits : chaque trait pousse depuis le centre, puis le chiffre apparait */
.asg-tk.is-animated .asg-tk__tick {
    stroke-dasharray: 1;
    animation: asg-tk-grow 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.asg-tk.is-animated .asg-tk__in {
    animation: asg-tk-in 0.6s ease 0.5s both;
}

@keyframes asg-tk-grow {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

@keyframes asg-tk-in {
    from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .asg-tk.is-animated .asg-tk__tick,
    .asg-tk.is-animated .asg-tk__in {
        animation: none;
    }
}

@container asg-card (min-width: 520px) {
    .asg-split:has(> .asg-chart) {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .asg-split > .asg-chart {
        width: 210px;
        margin: 0;
    }
}

/* ---------- Cartes larges : le contenu occupe la place ---------- */

@container asg-card (min-width: 640px) {
    .asg-statuses {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@container asg-card (min-width: 1000px) {
    .asg-statuses {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- Premiere vue : tuiles de synthese ---------- */

.asg-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.asg-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--asg-ink);
    border-radius: 14px;
    background: var(--asg-paper);
    color: var(--asg-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.asg-tile:disabled {
    cursor: default;
}

.asg-tile:focus-visible,
.asg-priority:focus-visible {
    outline: 2px solid var(--asg-violet);
    outline-offset: 2px;
}

.asg-tile__label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--asg-muted);
}

.asg-tile__value {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.asg-tile__text {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--asg-muted);
}

.asg-tile .asg-loader {
    min-height: 0;
    margin-top: 0.3rem;
}

.asg-tile .asg-shimmer {
    font-size: 0.8125rem;
}

.asg-dot.is-info {
    background: var(--asg-violet);
}

/* ---------- Premiere vue : priorites ---------- */

.asg-priorities {
    margin-top: 0.75rem;
}

.asg-priorities__title {
    font-weight: 700;
}

.asg-priorities__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.asg-priority {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.6rem 0;
    border: 0;
    border-top: 1px solid var(--asg-hairline);
    background: none;
    color: inherit;
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.asg-priority .asg-pill {
    flex: none;
    min-width: 4.6rem;
    justify-content: center;
}

.asg-priority__text {
    flex: 1 1 auto;
    min-width: 0;
}

.asg-priority__chevron,
.asg-detail__chevron {
    display: inline-flex;
    flex: none;
    width: 1rem;
    height: 1rem;
    color: var(--asg-muted);
}

.asg-priority__chevron svg,
.asg-detail__chevron svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.asg-priorities .asg-subdetails {
    margin-top: 0.4rem !important;
    font-size: 0.8125rem;
}

/* ---------- Le detail, en accordeon ---------- */

.asg-details {
    display: grid;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.asg-details__title {
    font-size: clamp(1.05rem, 3.2cqi, 1.3rem);
    font-weight: 700;
}

.asg-detail {
    border: 1px solid var(--asg-ink);
    border-radius: 14px;
    background: var(--asg-paper);
    color: var(--asg-ink);
    scroll-margin-top: 1rem;
    overflow: hidden;
}

.asg-detail > summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.6rem 1rem;
    list-style: none;
    cursor: pointer;
}

.asg-detail > summary::-webkit-details-marker {
    display: none;
}

.asg-detail__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.asg-detail__hint {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--asg-muted);
    text-align: right;
}

.asg-detail[open] .asg-detail__chevron svg {
    transform: rotate(90deg);
}

.asg-detail__body {
    container: asg-card / inline-size;
    padding: 0.25rem 1rem 1rem;
    border-top: 1px solid var(--asg-hairline);
}

.asg-detail__body.is-flush {
    padding: 0;
}

.asg-detail__body > * + * {
    margin-top: 0.75rem !important;
}

.asg-detail__body.is-flush .asg-highlight {
    padding-top: 0.9rem;
}

.asg-detail__body .asg-table thead th:first-child,
.asg-detail__body .asg-table td:first-child {
    padding-left: 1rem;
}

/* Positions et concurrents cote a cote quand la place le permet */
.asg-pair {
    display: grid;
    gap: 1.25rem;
    padding-top: 0.75rem;
}

.asg-pair__title {
    margin-bottom: 0.6rem !important;
    font-weight: 700;
    font-size: 0.875rem;
}

@container asg-card (min-width: 760px) {
    .asg-pair {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        align-items: start;
        gap: 2rem;
    }

    .asg-pair__item + .asg-pair__item {
        padding-left: 2rem;
        border-left: 1px solid var(--asg-hairline);
    }
}

.asg-detail__body.is-flush .asg-kicker {
    padding: 0 1rem;
}

.asg-detail__body.is-flush .asg-note {
    padding: 0 1rem 0.9rem;
}

/* Etiquette de theme (charte : anis, majuscules) */
.asg-tag {
    min-width: 5.2rem;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.6875rem;
}

/* ---------- Concurrents : barres de progression classees ---------- */

.asg-compare {
    gap: 0.9rem;
}

.asg-compare__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.asg-compare__rank {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border: 1px solid var(--asg-ink);
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 700;
}

.asg-compare__row.is-own .asg-compare__rank {
    background: var(--asg-violet);
}

.asg-compare__track {
    height: 14px;
    border: 1px solid var(--asg-ink);
    background: #fff;
}

.asg-compare__fill {
    border-radius: 999px 0 0 999px;
}

.asg-compare__fill[style*="width:100%"] {
    border-radius: 999px;
}

/* ---------- Ce qui se deplie doit se voir ---------- */

.asg-status > summary {
}

.asg-status__icon {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.2rem;
    border: 1px solid var(--asg-ink);
    border-radius: 50%;
    background: #fff;
}

.asg-status__more {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 0.15rem;
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--asg-muted);
}

.asg-status__more svg,
.asg-tile__more svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.asg-status[open] .asg-status__more svg {
    transform: rotate(90deg);
}

.asg-tile__more {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-top: auto;
    padding-top: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--asg-muted);
}

.asg-detail > summary {
}

.asg-detail[open] > summary .asg-detail__hint {
    visibility: hidden;
}

/* ---------- Panneau "en reflexion" (d'apres Beautiful UI, MIT) ---------- */

.asg-thinking {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--asg-ink);
    border-radius: var(--asg-radius);
    background: var(--asg-paper);
    color: var(--asg-ink);
}

.asg-thinking__head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.asg-thinking__label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.asg-thinking__progress {
    height: 3px;
    margin: 0.85rem 0 0.75rem;
    border-radius: 999px;
    background: var(--asg-track);
    overflow: hidden;
}

.asg-thinking__progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--asg-violet);
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.asg-thinking__trace {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0 0 0 0.45rem;
    border-left: 1px dashed var(--asg-hairline);
    list-style: none;
    font-size: 0.8125rem;
}

.asg-thinking__step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 1.6rem;
}

.asg-thinking__mark {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 1rem;
    height: 1rem;
    margin-left: -0.95rem;
    border-radius: 50%;
    background: var(--asg-paper);
    box-shadow: 0 0 0 2px var(--asg-paper);
}

.asg-thinking__step.is-done .asg-thinking__mark {
    background: var(--asg-violet);
    border: 1px solid var(--asg-ink);
}

.asg-thinking__step.is-done .asg-thinking__mark svg {
    width: 0.7rem;
    height: 0.7rem;
    fill: none;
    stroke: var(--asg-ink);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.asg-thinking__step.is-running .asg-thinking__mark {
    border: 1.5px solid var(--asg-track);
    border-top-color: var(--asg-violet);
    animation: asg-spin 0.9s linear infinite;
}

.asg-thinking__step.is-pending .asg-thinking__mark {
    border: 1px solid var(--asg-hairline);
}

.asg-thinking__step.is-pending {
    color: var(--asg-muted);
}

.asg-thinking__name {
    font-weight: 600;
}

.asg-thinking__step.is-pending .asg-thinking__name {
    font-weight: 500;
}

.asg-thinking__activity {
    min-width: 0;
    color: var(--asg-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asg-thinking__step.is-running .asg-thinking__activity {
    animation: asg-activity-in 0.4s ease;
}

.asg-thinking__step.is-running .asg-thinking__activity::before,
.asg-thinking__step.is-done .asg-thinking__activity::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 0.5rem 0.2em 0;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}

@keyframes asg-activity-in {
    from { opacity: 0; transform: translateY(3px); }
}

/* ---------- Encart Otrak ---------- */

.asg-otrak {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1rem !important;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--asg-hairline);
    border-radius: 12px;
    background: #fff;
    color: var(--asg-ink);
    text-decoration: none;
}

.asg-otrak img {
    flex: none;
    width: 84px;
    height: auto;
}

.asg-otrak__text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8125rem;
}

.asg-otrak__chevron {
    display: inline-flex;
    flex: none;
    width: 1rem;
    height: 1rem;
    color: var(--asg-muted);
}

.asg-otrak__chevron svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Bouton de fin de rapport ---------- */

.asg-endcta {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.asg-endcta .asg-button {
    width: 100%;
    max-width: 420px;
}

/* Positions Google sous les tuiles, avant les opportunites */
.asg-details--lead {
    margin-top: 0.75rem;
}

/* ---------- Animations de pixels par etape ---------- */

/* Lecture de la page : balayage ligne par ligne */
.asg-pixels--scan span {
    animation-duration: 960ms;
}

/* Positions Google : colonnes qui montent comme un graphique */
.asg-pixels--bars span {
    transform-origin: bottom;
    animation-name: asg-pixel-rise;
    animation-duration: 720ms;
}

/* Vitesse : balayage rapide de gauche a droite */
.asg-pixels--drive span {
    animation-name: asg-pixel-sweep;
    animation-duration: 560ms;
}

/* IA : les pixels tournent, le centre pulse en violet */
.asg-pixels--orbit span {
    animation-duration: 720ms;
}

.asg-pixels--orbit span:nth-child(5) {
    background: var(--asg-violet);
    animation-name: asg-pixel-pulse;
    animation-duration: 1100ms;
}

@keyframes asg-pixel-rise {
    0%, 100% { opacity: 0.15; transform: scaleY(0.45); }
    35%, 55% { opacity: 1; transform: scaleY(1); }
}

@keyframes asg-pixel-sweep {
    0%, 100% { opacity: 0.12; }
    25% { opacity: 1; }
    60% { opacity: 0.12; }
}

@keyframes asg-pixel-pulse {
    0%, 100% { opacity: 0.45; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* ---------- Encart d'appel a l'action : version compacte ---------- */

.asg-cta {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
}

.asg-cta__title {
    font-size: 1.05rem;
}

.asg-cta__text {
    margin-top: 0.15rem !important;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.asg-cta .asg-button {
    height: 2.5rem;
    margin-top: 0.7rem;
    padding: 0 1.1rem;
    font-size: 0.875rem;
}

@container asg (min-width: 700px) {
    .asg-cta {
        gap: 0.1rem 1.25rem;
        padding: 0.85rem 1.1rem 0.85rem 1.25rem;
    }

    .asg-cta .asg-button {
        margin-top: 0;
    }
}

/* ---------- Fin d'analyse : le panneau devient une ligne de resume ---------- */

.asg-thinking--done {
    padding: 0;
}

.asg-thinking--done > summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    list-style: none;
    cursor: pointer;
    font-size: 0.8125rem;
}

.asg-thinking--done > summary::-webkit-details-marker {
    display: none;
}

.asg-thinking__done-mark {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border: 1px solid var(--asg-ink);
    border-radius: 50%;
    background: var(--asg-violet);
}

.asg-thinking__done-mark svg {
    width: 0.8rem;
    height: 0.8rem;
    fill: none;
    stroke: var(--asg-ink);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.asg-thinking__done-text {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--asg-muted);
}

.asg-thinking__done-text strong {
    color: var(--asg-ink);
}

.asg-thinking__done-more {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.75rem;
    color: var(--asg-muted);
}

.asg-thinking__done-more svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.asg-thinking--done[open] .asg-thinking__done-more svg {
    transform: rotate(90deg);
}

.asg-thinking--done .asg-thinking__trace {
    margin: 0 1rem 0.9rem 1.5rem;
}

@container asg (max-width: 520px) {
    .asg-thinking__done-more span {
        display: none;
    }
}

/* ---------- Sections en apercu : haut du contenu en fondu + bouton ---------- */

.asg-detail__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.6rem 1rem;
}

.asg-detail__clip {
    position: relative;
    max-height: 12rem;
    overflow: hidden;
    cursor: pointer;
}

.asg-detail--teaser.is-open .asg-detail__clip,
.asg-detail--teaser.is-short .asg-detail__clip {
    max-height: none;
    cursor: auto;
}

.asg-detail__fade {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 5.5rem;
    background: linear-gradient(to bottom, rgba(252, 250, 244, 0), var(--asg-paper) 85%);
    pointer-events: none;
}

.asg-detail--teaser.is-open .asg-detail__fade,
.asg-detail--teaser.is-short .asg-detail__fade {
    display: none;
}

.asg-detail__footer {
    display: flex;
    justify-content: center;
    padding: 0.25rem 1rem 0.9rem;
}

.asg-detail--teaser.is-short .asg-detail__footer {
    display: none;
}

.asg-detail--teaser.is-open .asg-detail__footer {
    padding-top: 0.6rem;
    border-top: 1px solid var(--asg-hairline);
}

.asg-detail__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 2.2rem;
    padding: 0 1rem;
    border: 1px solid var(--asg-ink);
    border-radius: 999px;
    background: #fff;
    color: var(--asg-ink);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.asg-detail__toggle:focus-visible {
    outline: 2px solid var(--asg-violet);
    outline-offset: 2px;
}

.asg-detail__toggle svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.asg-detail--teaser.is-open .asg-detail__toggle svg {
    transform: rotate(-90deg);
}

/* ---------- Positions Google : section fixe, toujours depliee ---------- */

.asg-detail--static .asg-detail__body {
    border-top: 1px solid var(--asg-hairline);
}

/* ---------- Phrase revelee mot par mot ---------- */

.asg-reveal {
    font-size: 1.05rem;
    line-height: 1.45;
    max-width: 46ch;
}

.asg-reveal__word {
    display: inline-block;
}

.asg-reveal__word.is-strong {
    font-weight: 700;
    background: linear-gradient(transparent 62%, var(--asg-violet-light) 62%);
}

.asg-reveal.is-animated .asg-reveal__word {
    animation: asg-word-in 0.55s cubic-bezier(0.23, 1, 0.32, 1) both;
    animation-delay: calc(var(--asg-i) * 45ms);
}

@keyframes asg-word-in {
    from {
        opacity: 0;
        transform: translateY(0.45em);
        filter: blur(4px);
    }
}

@container asg-card (min-width: 520px) {
    .asg-split .asg-reveal {
        font-size: 1.15rem;
    }
}

/* ---------- Survols conserves (hors sections Visibilite IA et Technique) ---------- */

.asg-tile {
    transition: border-color 0.15s ease;
}

.asg-tile:hover:not(:disabled) {
    border-color: var(--asg-violet);
}

.asg-tile:hover .asg-tile__more {
    color: var(--asg-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.asg-priority:hover .asg-priority__text {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.asg-detail__toggle {
    transition: background-color 0.15s ease;
}

.asg-detail__toggle:hover {
    background: var(--asg-violet-light);
}

.asg-thinking--done > summary:hover .asg-thinking__done-more {
    color: var(--asg-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Encart Otrak : survol conserve (seules les lignes avec coche ou croix n'en ont pas) */
.asg-otrak {
    transition: border-color 0.15s ease;
}

.asg-otrak:hover {
    border-color: var(--asg-violet);
}

/* ---------- Focus : rien au clic, anneau violet arrondi au clavier ---------- */

.asg-tool[data-input="pointer"] summary:focus,
.asg-tool[data-input="pointer"] button:focus,
.asg-tool[data-input="pointer"] .asg-detail__clip:focus {
    outline: none;
}

.asg-status > summary:focus {
    outline: none;
}

.asg-tool:not([data-input="pointer"]) .asg-status > summary:focus {
    border-radius: 11px;
    box-shadow: inset 0 0 0 2px var(--asg-violet);
}

/* ---------- Bloc final avec l'iceberg ---------- */

.asg-endcta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    justify-content: stretch;
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--asg-ink);
    border-radius: var(--asg-radius);
    background: var(--asg-paper);
    color: var(--asg-ink);
}

.asg-endcta__art {
    overflow: hidden;
    border: 1px solid var(--asg-ink);
    border-radius: 12px;
    background: #fff;
}

.asg-endcta__art svg {
    display: block;
    width: 100%;
    height: auto;
}

.asg-endcta__art text {
    font-family: inherit;
}

.asg-endcta__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
}

.asg-endcta__text {
    font-size: clamp(1.05rem, 3.2cqi, 1.3rem);
    font-weight: 600;
    line-height: 1.35;
}

.asg-endcta .asg-button {
    width: 100%;
    max-width: none;
}

@container asg (min-width: 640px) {
    .asg-endcta {
        grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
        gap: 1.5rem;
        padding: 1.25rem;
    }

    .asg-endcta .asg-button {
        width: auto;
    }
}

/* Positions Google : respiration entre la phrase, la legende et les visites estimees */
.asg-split__side > .asg-reveal + .asg-legend {
    margin-top: 1.25rem !important;
}

.asg-split__side > .asg-facts {
    margin-top: 1.25rem !important;
}

/* Encart Otrak : badge "Offert a nos clients" */
.asg-otrak__badge {
    flex: none;
}

@container asg-card (max-width: 560px) {
    .asg-otrak {
        flex-wrap: wrap;
    }

    .asg-otrak__text {
        flex-basis: calc(100% - 100px);
    }
}

/* Lignes a coche ou croix : bordure violette et "Detail" souligne au survol */
.asg-status {
    transition: border-color 0.15s ease;
}

.asg-status:hover {
    border-color: var(--asg-violet);
}

.asg-status > summary:hover .asg-status__more-text {
    color: var(--asg-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Vos opportunites : etiquette au-dessus du texte sur ecran etroit ---------- */

@container asg (max-width: 560px) {
    .asg-priority {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 0.6rem;
        row-gap: 0.35rem;
        align-items: center;
    }

    .asg-priority .asg-pill {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        min-width: 0;
    }

    .asg-priority__text {
        grid-column: 1;
        grid-row: 2;
    }

    .asg-priority__chevron {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}

/* ---------- Encart d'appel a l'action : creme comme les autres cartes ---------- */

.asg-cta {
    background: var(--asg-paper);
    color: var(--asg-ink);
}

.asg-cta__text {
    color: var(--asg-muted);
    opacity: 1;
}

.asg-cta .asg-button {
    border-color: var(--asg-ink);
}

/* ---------- Mobile : espacements des sections du detail ---------- */

@container asg (max-width: 480px) {
    /* En-tete : le titre seul (le chiffre est deja dans la tuile) */
    .asg-detail__hint {
        display: none;
    }

    .asg-detail__header {
        min-height: 2.75rem;
        padding: 0.55rem 0.9rem;
    }

    .asg-detail__body {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .asg-detail__body.is-flush {
        padding: 0;
    }

    /* Tableau des mots-cles : cellules resserrees, coupure en fin de syllabe seulement */
    .asg-table {
        font-size: 0.8125rem;
    }

    .asg-table thead th,
    .asg-table td {
        padding: 0.5rem 0.4rem;
    }

    .asg-table th:first-child,
    .asg-table td:first-child {
        padding-left: 0.9rem;
    }

    .asg-table th:last-child,
    .asg-table td:last-child {
        padding-right: 0.9rem;
    }

    .asg-table__keyword {
        overflow-wrap: break-word;
        word-break: normal;
        -webkit-hyphens: auto;
        hyphens: auto;
    }

    .asg-highlight {
        padding: 0.9rem 0.9rem 0;
    }

    .asg-detail__body.is-flush .asg-kicker,
    .asg-detail__body.is-flush .asg-note {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    /* Lignes a coche ou croix : sans "Detail" (la ligne reste cliquable) */
    .asg-status__more {
        display: none;
    }

    .asg-status > summary {
        gap: 0.55rem;
        padding: 0.5rem 0.7rem;
    }

    .asg-status__label {
        font-size: 0.875rem;
    }

    /* Encart Otrak empile : logo, texte, badge */
    .asg-otrak {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
        justify-items: start;
    }

    .asg-otrak__text {
        flex-basis: auto;
    }

    .asg-otrak__chevron {
        display: none;
    }
}

/* ---------- Semantique : zones du top Google et courbe de la page ---------- */

.asg-sem {
    display: grid;
    gap: 0.85rem;
}

.asg-sem__chart {
    margin-top: 0.25rem;
}

.asg-sem__svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 340px;
    overflow: visible;
}

.asg-sem__svg.is-compact {
    display: none;
}

@container asg-card (max-width: 600px) {
    .asg-sem__svg.is-full { display: none; }
    .asg-sem__svg.is-compact { display: block; }
}

.asg-sem__grid {
    stroke: var(--asg-hairline);
    stroke-width: 1;
}

.asg-sem__axis {
    stroke: var(--asg-ink);
    stroke-width: 1;
    opacity: 0.35;
}

.asg-sem__band { stroke: none; }
.asg-sem__band.is-sub { fill: var(--asg-violet-soft); opacity: 0.75; }
.asg-sem__band.is-std { fill: var(--asg-anis); opacity: 0.8; }
.asg-sem__band.is-strong { fill: var(--asg-rose-light); }
.asg-sem__band.is-over { fill: var(--asg-rose); opacity: 0.75; }

.asg-sem__line {
    fill: none;
    stroke: var(--asg-ink);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.asg-sem__dot {
    fill: #fff;
    stroke: var(--asg-ink);
    stroke-width: 1.5;
}

.asg-sem__dot.is-missing {
    fill: var(--asg-ink);
}

.asg-sem__label {
    font-family: inherit;
    font-size: 11px;
    fill: var(--asg-ink);
}

.asg-sem__svg.is-animated .asg-sem__band {
    animation: asg-sem-fade 0.6s ease both;
}

.asg-sem__svg.is-animated .asg-sem__band.is-std { animation-delay: 0.08s; }
.asg-sem__svg.is-animated .asg-sem__band.is-strong { animation-delay: 0.16s; }
.asg-sem__svg.is-animated .asg-sem__band.is-over { animation-delay: 0.24s; }

.asg-sem__svg.is-animated .asg-sem__line {
    stroke-dasharray: 1;
    animation: asg-sem-draw 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.3s both;
}

.asg-sem__svg.is-animated .asg-sem__dot {
    animation: asg-sem-fade 0.4s ease 1.4s both;
}

@keyframes asg-sem-fade {
    from { opacity: 0; }
}

@keyframes asg-sem-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

.asg-sem__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    font-size: 0.75rem;
    color: var(--asg-muted);
}

.asg-sem__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.asg-sem__swatch {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 3px;
}

.asg-sem__swatch.is-sub { background: var(--asg-violet-soft); }
.asg-sem__swatch.is-std { background: var(--asg-anis); }
.asg-sem__swatch.is-strong { background: var(--asg-rose-light); }
.asg-sem__swatch.is-over { background: var(--asg-rose); }

.asg-sem__swatch.is-page {
    height: 2px;
    border-radius: 2px;
    background: var(--asg-ink);
}

.asg-sem__terms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.asg-sem__terms-label {
    margin-right: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Semantique : une vague parcourt la grille, comme une courbe qui se dessine */
.asg-pixels--wave span {
    animation-duration: 1260ms;
}

@media (prefers-reduced-motion: reduce) {
    .asg-sem__svg.is-animated .asg-sem__band,
    .asg-sem__svg.is-animated .asg-sem__line,
    .asg-sem__svg.is-animated .asg-sem__dot {
        animation: none;
    }
}

/* Version etroite : le SVG est reduit, on grossit les libelles pour rester lisible */
.asg-sem__svg.is-compact .asg-sem__label {
    font-size: 14px;
}

/* Cadran des positions explorable (charts-ticks.js) : survol, toucher ou fleches du clavier */
.asg-tk.is-explorable {
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

[data-input="keyboard"] .asg-tk.is-explorable:focus-visible {
    outline: 2px solid var(--asg-violet);
    outline-offset: 4px;
    border-radius: 50%;
}

.asg-chart {
    position: relative;
}

.asg-tk__leader {
    pointer-events: none;
}

.asg-tk-tip {
    position: absolute;
    z-index: 3;
    display: grid;
    gap: 0.1rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--asg-ink);
    border-radius: 10px;
    background: #fff;
    color: var(--asg-ink);
    white-space: nowrap;
    pointer-events: none;
    transform: translate(0, -50%);
}

.asg-tk-tip.is-left {
    transform: translate(-100%, -50%);
}

.asg-tk-tip strong {
    font-size: 0.8125rem;
    font-weight: 700;
}

.asg-tk-tip span {
    font-size: 0.7rem;
    color: var(--asg-muted);
}

/* Vitesse : les 2 principales causes de lenteur */
.asg-causes__title {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.asg-causes {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: asg-cause;
}

.asg-causes li {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.6rem;
    align-items: baseline;
    font-size: 0.875rem;
    counter-increment: asg-cause;
}

.asg-causes li::before {
    content: counter(asg-cause);
    grid-row: span 2;
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--asg-rose-light);
    font-size: 0.75rem;
    font-weight: 700;
}

.asg-causes__gain {
    grid-column: 2;
    font-size: 0.75rem;
    color: var(--asg-muted);
}

/* Visibilite IA : de l'air entre la phrase d'intro, les cartes et la note */
.asg-ai {
    display: grid;
    gap: 1rem;
}

.asg-ai > p {
    margin: 0;
}

/* Barre de progression des etapes longues (vitesse, IA) */
.asg-thinking__step {
    flex-wrap: wrap;
}

.asg-progressbar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.asg-thinking__step .asg-progressbar {
    flex: 1 1 8rem;
    max-width: 14rem;
    margin-left: auto;
}

.asg-progressbar__track {
    flex: 1;
    height: 4px;
    min-width: 4rem;
    border-radius: 999px;
    background: var(--asg-track);
    overflow: hidden;
}

.asg-progressbar__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--asg-violet);
    transition: width 0.3s linear;
}

.asg-progressbar__value {
    min-width: 2.6rem;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: var(--asg-muted);
    text-align: right;
}

.asg-tile .asg-progressbar {
    display: flex;
    margin-top: 0.5rem;
}

@container asg (max-width: 480px) {
    .asg-thinking__step .asg-progressbar {
        flex-basis: 100%;
        max-width: none;
        margin-left: 1.65rem;
    }
}

/* =========================================================
   Outil Google Ads ([audit_sea])
   ========================================================= */

.asg-presence {
    display: grid;
    gap: 1rem;
}

.asg-presence > * + * {
    margin-top: 0 !important;
}

/* Apercus d'annonces (bibliotheque publique Google) */
.asg-ads-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
}

.asg-ads-gallery__item {
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0.5rem;
    min-height: 90px;
    border: 1px solid var(--asg-hairline);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.asg-ads-gallery__item img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    height: auto;
}

/* Simulateur de budget */
.asg-budget__total {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.9rem 1rem 0;
}

.asg-budget__figure {
    display: grid;
    gap: 0.15rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--asg-ink);
    border-radius: 12px;
    background: var(--asg-violet-light);
}

.asg-budget__figure + .asg-budget__figure {
    background: var(--asg-anis-light);
}

.asg-budget__value {
    font-size: clamp(1.5rem, 7cqi, 2.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.asg-budget__label {
    font-size: 0.8125rem;
    color: var(--asg-muted);
}

.asg-budget__share {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.35rem 0.75rem;
    padding: 0 1rem;
    font-size: 0.8125rem;
}

.asg-budget__share-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.asg-budget__slider {
    grid-column: 1 / -1;
    width: 100%;
    accent-color: var(--asg-violet);
}

.asg-budget__keyword {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.asg-budget__check {
    flex: none;
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--asg-violet);
}

.asg-budget__table tr.is-off td,
.asg-budget__table td.is-off {
    color: var(--asg-muted);
}

.asg-budget__table tr:has(.asg-budget__check:not(:checked)) td {
    color: var(--asg-muted);
}

.asg-budget__cost {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.asg-budget {
    display: grid;
    gap: 0.75rem;
}

.asg-budget > p {
    margin: 0;
}

/* Curseur du simulateur : piste claire, pastille violette */
.asg-budget__slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    margin: 0.4rem 0;
    border-radius: 999px;
    background: var(--asg-track);
    cursor: pointer;
}

.asg-budget__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--asg-ink);
    border-radius: 50%;
    background: var(--asg-violet);
}

.asg-budget__slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 1px solid var(--asg-ink);
    border-radius: 50%;
    background: var(--asg-violet);
}

[data-input="keyboard"] .asg-budget__slider:focus-visible {
    outline: 2px solid var(--asg-violet);
    outline-offset: 4px;
}

/* Audit Google Ads sur ecran etroit : deux apercus suffisent */
@container asg-card (max-width: 479px) {
    .asg-presence .asg-ads-gallery__item:nth-child(n+3) {
        display: none;
    }


    .asg-budget__table th:nth-child(3),
    .asg-budget__table td:nth-child(3) {
        display: none;
    }
}

/* Presence Google Ads : reperes alignes a l'horizontale sous la phrase */
.asg-presence__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
}

.asg-presence__fact {
    display: grid;
    gap: 0.15rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--asg-hairline);
    border-radius: 10px;
    background: #fff;
}

.asg-presence__fact-label {
    font-size: 0.75rem;
    color: var(--asg-muted);
}

.asg-presence__fact strong {
    font-size: 0.9375rem;
}

.asg-presence__hint {
    margin: 0;
    font-size: 0.875rem;
    color: var(--asg-muted);
}

.asg-rival-ads {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.asg-rival-ads > p {
    margin: 0;
}

/* Apercu legende (annonces des concurrents) */
.asg-ads-gallery__item.has-caption {
    grid-template-rows: 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.asg-ads-gallery__item figcaption {
    width: 100%;
    padding-top: 0.45rem;
    border-top: 1px solid var(--asg-hairline);
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
}

/* Boutons : hauteur minimale plutot que fixe, pour qu'un libelle long passe a la ligne
   proprement sur mobile au lieu de deborder. */
.asg-button {
    height: auto;
    min-height: 2.875rem;
    padding: 0.7rem 1.25rem;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.asg-form__row .asg-button {
    white-space: nowrap;
}

/* ---------- Elements propres au theme de la DA, masques dans le theme classique ---------- */
.asg-chart__hint,
.asg-tile__trend,
.asg-tile__trend-label {
    display: none;
}

