/* ============================================================
   AUDIT.CSS — section #audit
   Chargé après home.css (surcharge les anciennes règles #audit).
   ============================================================ */

#audit {
    position: relative;
    isolation: isolate;
    overflow: clip;
    scroll-margin-top: 80px;
    background:
        radial-gradient(40rem 28rem at 8% 12%, rgba(60, 140, 220, .10), transparent 66%),
        radial-gradient(34rem 26rem at 96% 70%, rgba(129, 114, 221, .08), transparent 66%),
        linear-gradient(180deg, #fff 0%, #fafcff 100%);
}

/* Trame de points */
#audit::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(rgba(37, 107, 176, .16) 1px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse at 75% 30%, #000, transparent 65%);
    mask-image: radial-gradient(ellipse at 75% 30%, #000, transparent 65%);
}

#audit .container {
    display: block;
}

.audit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
}

/* --- Intro --- */
.audit-intro h2 {
    max-width: 19ch;
    margin-bottom: .45em;
    font-size: clamp(2.1rem, 4.2vw, 3.6rem);
    letter-spacing: -.048em;
    line-height: 1.03;
}

.audit-lede {
    color: #4b5d70;
    font-size: 1.04rem;
    max-width: 52ch;
}

.audit-points {
    display: grid;
    gap: 12px;
    margin-top: 32px;
}

.audit-point {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(23, 37, 54, .04), 0 18px 36px -28px rgba(23, 37, 54, .28);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), border-color .3s ease, box-shadow .3s ease;
}

.audit-point:hover {
    transform: translateX(5px);
    border-color: rgba(60, 140, 220, .45);
    box-shadow: var(--shadow-md);
}

.audit-point h3 {
    margin: 0 0 3px;
    font-size: 1.02rem;
    letter-spacing: -.01em;
}

.audit-point p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}

/* --- Scène : carte formulaire + rapport flottant --- */
.audit-stage {
    position: relative;
    padding-top: 52px;
}

.audit-report {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 3;
    width: min(380px, 92%);
    padding: 14px 22px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 50px -26px rgba(23, 37, 54, .4);
    transform: translateX(-50%);
    animation: auditFloat 6s ease-in-out infinite;
}

@keyframes auditFloat {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, -6px);
    }
}

.audit-report-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.audit-report-title i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 4px rgba(60, 140, 220, .14);
}

.audit-rings {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.audit-ring {
    position: relative;
    flex: 1;
    display: grid;
    justify-items: center;
    gap: 4px;
}

.audit-ring .audit-svg-container{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;    
}

.audit-ring svg {
    /* width: 62px;
    height: 62px; */
}

.audit-ring circle {
    fill: none;
    stroke-width: 3.4;
}

.audit-ring .bg {
    stroke: #e7eef4;
}

.audit-ring .fg {
    stroke: var(--c);
    stroke-linecap: round;
    stroke-dasharray: var(--s) 100;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dasharray 1.5s cubic-bezier(.22, 1, .36, 1) .3s;
}

.audit-ring .audit-data-container{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
}

.audit-ring b {
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1;
}

.audit-ring span {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 600;
}

.ring-ok {
    --c: var(--green);
}

.ring-mid {
    --c: var(--amber);
}

.ring-low {
    --c: var(--coral);
}

.audit.is-ready:not(.is-in) .audit-ring .fg {
    stroke-dasharray: 0 100;
}

/* --- Carte formulaire --- */
.audit-card {
    position: relative;
    padding: clamp(104px, 11vw, 112px) clamp(24px, 3.4vw, 40px) clamp(26px, 3.4vw, 36px);
    border: 1px solid var(--line-strong);
    border-radius: 30px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    box-shadow: 0 1px 2px rgba(23, 37, 54, .05), 0 44px 80px -48px rgba(23, 37, 54, .4);
}

/* Filet lumineux supérieur */
.audit-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 14%;
    right: 14%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--blue), var(--violet), transparent);
}

/* La carte démarre sous le rapport : on compense son décalage */
.audit-stage {
    --lift: 52px;
}

.audit-card {
    margin-top: calc(var(--lift) * -1 + 52px);
}

.audit-card-title {
    margin: 0 0 4px;
    font-size: 1.5rem;
    letter-spacing: -.03em;
}

.audit-card-sub {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: .92rem;
}

.audit .field {
    margin-bottom: 16px;
}

.audit .field label {
    color: var(--ink-soft);
    font-size: .84rem;
}

.field-control {
    position: relative;
}

.field-control svg {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 19px;
    height: 19px;
    color: #8ea3b8;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color .2s ease;
}

.audit .field input {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px 14px 46px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #fff;
    font-size: .98rem;
}

.field-control:focus-within svg {
    color: var(--blue-deep);
}

.audit-submit {
    min-height: 58px;
    margin-top: 6px;
    border-radius: 14px;
    font-size: 1rem;
}

.audit-submit .audit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auditSpin .7s linear infinite;
}

.audit-submit.is-loading {
    pointer-events: none;
    opacity: .85;
}

.audit-submit.is-loading .audit-spinner {
    display: inline-block;
}

@keyframes auditSpin {
    to {
        transform: rotate(360deg);
    }
}

.audit .form-note {
    margin: 12px 0 0;
    text-align: center;
}

.audit-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.audit-trust li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 500;
}

.audit-trust svg {
    width: 16px;
    height: 16px;
    color: var(--green);
}

/* --- État de succès --- */
.audit-success {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 8px 0;
    text-align: center;
}

.audit-success h3 {
    margin: 6px 0 0;
    font-size: 1.5rem;
}

.audit-success p {
    margin: 0 0 12px;
    color: var(--muted);
}

.audit-success-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-bg);
    color: var(--green);
    box-shadow: 0 0 0 8px rgba(41, 150, 101, .1);
    animation: auditPop .6s cubic-bezier(.22, 1, .36, 1);
}

.audit-success-icon svg {
    width: 30px;
    height: 30px;
}

@keyframes auditPop {
    from {
        transform: scale(.5);
        opacity: 0;
    }
}

/* --- FAQ --- */
.audit-faq {
    margin-top: clamp(56px, 7vw, 96px);
    padding-top: 40px;
    border-top: 1px solid var(--line-strong);
}

.audit-faq h3 {
    margin-bottom: 22px;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    letter-spacing: -.03em;
}

.audit-faq-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: start;
}

.audit-faq details {
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: #fff;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.audit-faq details[open] {
    border-color: rgba(60, 140, 220, .45);
    box-shadow: var(--shadow-md);
}

.audit-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    list-style: none;
}

.audit-faq summary::-webkit-details-marker {
    display: none;
}

.audit-faq summary::after {
    content: "+";
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue-deep);
    font-size: 1.1rem;
    transition: transform .3s ease, background .2s ease, color .2s ease;
}

.audit-faq details[open] summary::after {
    content: "−";
    background: var(--blue-deep);
    color: #fff;
}

.audit-faq details p {
    margin: 0;
    padding: 0 20px 20px;
    color: #4b5d70;
    font-size: .9rem;
}

/* --- Responsive --- */
@media (max-width: 1000px) {
    .audit-grid {
        grid-template-columns: 1fr;
    }

    .audit-faq-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .audit-card {
        border-radius: 24px;
    }

    .audit-point {
        padding: 16px;
    }

    .audit-ring svg {
        width: 54px;
        height: 54px;
    }

    .audit-ring b {
        top: 15px;
        font-size: .95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .audit-report {
        animation: none;
    }

    .audit-ring .fg,
    .audit-point,
    .audit-success-icon {
        transition: none;
        animation: none;
    }
}