/**
 * A Forms — Quiz AV (V8.1)
 * CSS de production — Source de vérité
 * Dérivé de V7.5, nettoyé de tout scaffolding de démo.
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ==================== CARD ==================== */
.ah-card {
    border-radius: 12px;
    padding: 28px 28px 22px;
    font-family: 'Poppins', sans-serif;
    position: relative;
    margin: 0 auto;
}

.ah-card-light {
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.ah-card-dark {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ==================== PROGRESS BAR ==================== */
.ah-progress {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
}

.ah-card-light .ah-progress {
    background: #eee;
}

.ah-card-dark .ah-progress {
    background: rgba(255, 255, 255, 0.08);
}

.ah-progress-bar {
    height: 100%;
    background: #dd0000;
    width: 10%;
    transition: width 0.4s ease;
}

/* ==================== STEPS ==================== */
.ah-step {
    display: none;
    animation: ahSlide 0.35s ease;
}

.ah-step.active {
    display: block;
}

@keyframes ahSlide {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ah-step-title {
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 8px;
}

.ah-card-light .ah-step-title {
    color: #1a1a1a;
}

.ah-card-dark .ah-step-title {
    color: #fff;
}

.ah-step-sub {
    font-size: 13px;
    text-align: center;
    margin: 0 0 22px;
    line-height: 1.5;
}

.ah-card-light .ah-step-sub {
    color: #444;
}

.ah-card-dark .ah-step-sub {
    color: #bbb;
}

/* ==================== CARD TITLE ==================== */
.ah-card-title {
    font-size: 19px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 6px;
    line-height: 1.3;
}

.ah-card-light .ah-card-title {
    color: #1a1a1a;
}

.ah-card-dark .ah-card-title {
    color: #fff;
}

/* ==================== INTENT BUTTONS (Slide 1) ==================== */
.ah-intent-row {
    display: grid;
    grid-template-columns: 1.10fr 0.90fr;
    gap: 0;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    max-width: 90%;
    margin: 0 auto;
}

.ah-card-light .ah-intent-row {
    border-color: #ddd;
    background: #f0f0f0;
}

.ah-intent-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
    letter-spacing: 0.5px;
}

.ah-intent-sell {
    background: #dd0000;
    color: #fff;
    border-radius: 50px;
}

.ah-intent-sell:hover {
    background: #c00000;
}

.ah-intent-buy {
    background: transparent;
    border-radius: 50px;
}

.ah-card-light .ah-intent-buy {
    color: #222;
}

.ah-card-dark .ah-intent-buy {
    color: #fff;
}

.ah-intent-buy:hover {
    opacity: 0.8;
}

/* ==================== BIG BUTTONS (Legacy) ==================== */
.ah-big-btn {
    display: block;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ah-card-light .ah-big-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

.ah-card-dark .ah-big-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ah-big-btn:hover {
    border-color: #dd0000;
    color: #dd0000;
}

.ah-card-light .ah-big-btn:hover {
    background: rgba(221, 0, 0, 0.05);
}

.ah-card-dark .ah-big-btn:hover {
    background: rgba(221, 0, 0, 0.1);
}

/* ==================== IMAGE GRID ==================== */
.ah-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.ah-img-card {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.ah-card-light .ah-img-card {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

.ah-card-dark .ah-img-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ah-img-card:hover {
    border-color: #dd0000;
    transform: translateY(-2px);
}

.ah-img-card.selected {
    border-color: #dd0000;
    box-shadow: 0 0 12px rgba(221, 0, 0, 0.25);
}

.ah-img-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.ah-img-card div {
    padding: 7px;
    font-size: 12px;
    font-weight: 500;
}

/* ==================== FIELDS ==================== */
.ah-field {
    position: relative;
    margin-bottom: 12px;
}

/* Input Light */
.ah-in-l {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c7c7c7;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #1a1a1a;
    background: #f9fafb;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ah-in-l:focus {
    border-color: #dd0000;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(221, 0, 0, 0.08);
}

.ah-in-l::placeholder {
    color: #777;
}

/* Input Dark */
.ah-in-d {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #c1c1c1;
    background: rgba(255, 255, 255, 0.06);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ah-in-d:focus {
    border-color: #dd0000;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(221, 0, 0, 0.12);
}

.ah-in-d::placeholder {
    color: #aaa;
}

select.ah-in-d option {
    color: #1a1a1a;
    background: #fff;
}

/* Select Arrow */
.ah-sel {
    position: relative;
}

.ah-sel::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 18px;
    color: #dd0000;
}

.ah-sel select {
    appearance: none;
    cursor: pointer;
    padding-right: 32px;
}

/* Address Icon */
.ah-addr-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 14px;
    color: #dd0000;
}

.ah-field-addr input {
    padding-right: 34px;
}

/* ==================== NAVIGATION ==================== */
.ah-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
}

.ah-btn-back {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    transition: color 0.2s;
    padding: 10px 0;
}

.ah-card-light .ah-btn-back {
    color: #888;
}

.ah-card-dark .ah-btn-back {
    color: #777;
}

.ah-btn-back:hover {
    color: #dd0000;
}

.ah-btn-next {
    background: #dd0000;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    transition: background 0.2s;
    text-transform: uppercase;
}

.ah-btn-next:hover {
    background: #b30000;
}

/* ==================== SUBMIT BUTTON ==================== */
.ah-btn {
    width: 100%;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    background: #dd0000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

.ah-btn:hover {
    background: #b80000;
    transform: translateY(-1px);
}

.ah-btn-submit {
    border-radius: 50px;
    max-width: 280px;
    margin: 0 auto;
}

/* ==================== VALIDATION ==================== */
.ah-error {
    display: none;
    font-size: 11px;
    color: #dd0000;
    margin-top: 3px;
}

.ah-field.invalid .ah-error {
    display: block;
}

.ah-field.invalid .ah-in-l,
.ah-field.invalid .ah-in-d {
    border-color: #dd0000;
}

/* ==================== CONSENT & FOOTER ==================== */
.ah-consent {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 4px;
    text-align: center;
}

.ah-card-light .ah-consent {
    color: #444;
}

.ah-card-dark .ah-consent {
    color: #bbb;
}

.ah-consent a {
    color: #4a90cc;
    text-decoration: none;
}

.ah-lock-footer {
    font-size: 11px;
    text-align: center;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ah-card-light .ah-lock-footer {
    color: #444;
}

.ah-card-dark .ah-lock-footer {
    color: #bbb;
}

.ah-card-dark .ah-lock-footer svg {
    fill: #dd0000;
}

/* ==================== SUCCESS ==================== */
.ah-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
    animation: ahSlide 0.4s ease;
}

.ah-success.show {
    display: block;
}

.ah-success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.ah-success-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ah-card-light .ah-success-title {
    color: #1a1a1a;
}

.ah-card-dark .ah-success-title {
    color: #fff;
}

.ah-success-text {
    font-size: 13px;
    line-height: 1.6;
}

.ah-card-light .ah-success-text {
    color: #666;
}

.ah-card-dark .ah-success-text {
    color: #aaa;
}

/* ==================== SPINNER ==================== */
.ah-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ahSpin 0.6s linear infinite;
    margin-right: 8px;
}

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

/* ==================== INTL-TEL-INPUT ==================== */
.iti {
    width: 100%;
    display: block;
}

.ah-card-light .iti input[type="tel"] {
    width: 100%;
    padding: 10px 14px 10px 52px;
    border: 1px solid #c7c7c7;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #1a1a1a;
    background: #f9fafb;
    outline: none;
    box-sizing: border-box;
}

.ah-card-light .iti input[type="tel"]:focus {
    border-color: #dd0000;
}

.ah-card-dark .iti input[type="tel"] {
    width: 100%;
    padding: 10px 14px 10px 52px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #c1c1c1;
    background: rgba(255, 255, 255, 0.06);
    outline: none;
    box-sizing: border-box;
}

.ah-card-dark .iti input[type="tel"]:focus {
    border-color: #dd0000;
}

/* ==================== HONEYPOT ==================== */
.ah-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ==================== ARROW ACCENT ==================== */
.ah-arrow {
    color: #dd0000;
    font-size: 22px;
    font-weight: 700;
    margin-right: 4px;
}

/* ==================== MODE TOGGLE (Eva) ==================== */
.ah-mode-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 10;
}

.ah-mode-toggle:hover {
    transform: scale(1.1);
}

.ah-mode-toggle img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* ==================== MODE AI PLACEHOLDER ==================== */
.ah-card-light .ah-mode-ai-placeholder {
    color: #444;
    border-color: rgba(0, 0, 0, 0.1);
}

.ah-card-dark .ah-mode-ai-placeholder {
    color: #ccc;
    border-color: rgba(255, 255, 255, 0.15);
}

.ah-mode-ai-placeholder img {
    border-radius: 50%;
}
