/* ════════════════════════════════════════════════════════════
   ATH Quick Checkout — style.css
   Design "ACHETER MAINTENANT" recréé d'après la maquette
   Palette teal : #034E5A
   ════════════════════════════════════════════════════════════ */

:root {
    --ath-teal:       #034E5A;
    --ath-teal-dark:  #023B45;
    --ath-teal-soft:  #E6F0F1;
    --ath-white:      #FFFFFF;
    --ath-bg:         #F7F7F9;
    --ath-text:       #1F2937;
    --ath-heading:    #111827;
    --ath-muted:      #6B7280;
    --ath-border:     #E5E7EB;
    --ath-green:      #16A34A;
    --ath-error:      #DC2626;
    --ath-radius:     10px;
    --ath-font:       'Poppins', 'Segoe UI', -apple-system, sans-serif;
}

.ath-qc-box {
    background: transparent;
    font-family: var(--ath-font);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    color: var(--ath-text);
}
.ath-qc-box *, .ath-qc-box *::before, .ath-qc-box *::after { box-sizing: border-box; }

.ath-qc-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
}
.ath-qc-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--ath-heading);
}
.ath-qc-subtitle {
    font-size: 13px;
    color: var(--ath-muted);
    line-height: 1.4;
}

.ath-qc-perks {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ath-qc-perks li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--ath-text);
}
.ath-qc-perks li svg {
    width: 17px;
    height: 17px;
    color: var(--ath-teal);
    flex-shrink: 0;
}
.ath-qc-perks li strong { font-weight: 600; }

.ath-qc-divider {
    height: 1px;
    background: var(--ath-border);
    margin: 18px 0;
}
.ath-qc-section-title {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--ath-heading);
    margin: 0 0 16px;
}

.ath-qc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.ath-qc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.ath-qc-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ath-text);
}
.ath-qc-field label .req {
    color: var(--ath-error);
    margin-left: 2px;
}

.ath-qc-field input[type="text"],
.ath-qc-field input[type="tel"] {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ath-border);
    border-radius: var(--ath-radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--ath-text);
    background: var(--ath-white);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.ath-qc-field input:focus {
    border-color: var(--ath-teal);
    box-shadow: 0 0 0 3px rgba(3, 78, 90, .10);
}
.ath-qc-field input::placeholder { color: #9CA3AF; }

.ath-qc-field input.ath-error,
.ath-qc-field select.ath-error {
    border-color: var(--ath-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
    animation: athShake .35s ease;
}

.ath-select-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.ath-select-wrap select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 38px 12px 14px;
    border: 1px solid var(--ath-border);
    border-radius: var(--ath-radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--ath-text);
    background-color: var(--ath-white);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.ath-select-wrap select:focus {
    border-color: var(--ath-teal);
    box-shadow: 0 0 0 3px rgba(3, 78, 90, .10);
}
.ath-select-wrap select:disabled {
    background-color: var(--ath-bg);
    color: #9CA3AF;
    cursor: not-allowed;
}
.ath-select-arrow { display: none; }

/* ── BARRE FLOTTANTE "COMMANDER MAINTENANT" ──
   Reste collée en bas de l'écran (mobile ET desktop) pendant le scroll
   et disparaît dès que le formulaire #ath-quick-checkout entre dans le
   viewport (voir script.js — IntersectionObserver). Structure :
   #ath-buy-now-bar (barre) > #ath-buy-now-price (prix actuel + prix
   barré si promo) + #ath-buy-now-btn (bouton pleine largeur restante). */
.ath-buy-now-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 10px 16px 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    background: rgba(255,255,255,.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--ath-border);
    box-shadow: 0 -4px 24px rgba(0,0,0,.10);
    transform: translateY(0);
    opacity: 1;
    transition: transform .25s ease, opacity .25s ease;
}
.ath-buy-now-bar.ath-buy-now-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.ath-buy-now-price {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    line-height: 1.2;
}
.ath-buy-now-price strong {
    font-size: 20px;
    font-weight: 900;
    color: var(--ath-teal);
    display: block;
}
.ath-buy-now-price del {
    font-size: 12px;
    color: #9CA3AF;
}
.ath-buy-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 20px;
    background: var(--ath-teal);
    color: var(--ath-white);
    border: none;
    border-radius: var(--ath-radius);
    font-family: var(--ath-font);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(3, 78, 90, .3);
    transition: background .2s, transform .15s;
}
.ath-buy-now-btn:hover { background: var(--ath-teal-dark); }
.ath-buy-now-btn:active { transform: scale(.98); }
.ath-buy-now-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
@media (max-width: 480px) {
    .ath-buy-now-bar { padding: 8px 14px 12px; gap: 10px; }
    .ath-buy-now-price strong { font-size: 17px; }
    .ath-buy-now-btn { font-size: 12.5px; height: 44px; padding: 0 14px; }
}


.ath-recap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.ath-recap-product {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ath-recap-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border: 1px solid var(--ath-border);
    border-radius: 8px;
    background: var(--ath-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ath-recap-thumb img,
.ath-recap-thumb .ath-recap-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.ath-recap-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ath-recap-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ath-heading);
    line-height: 1.3;
}
.ath-recap-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ath-recap-variant {
    font-size: 13px;
    color: var(--ath-muted);
}
.ath-recap-color-label {
    font-weight: 600;
    color: var(--ath-heading);
}
.ath-recap-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ath-recap-label {
    font-size: 13.5px;
    color: var(--ath-muted);
    font-weight: 500;
}
.ath-price-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--ath-text);
    white-space: nowrap;
}
.ath-price-divider {
    height: 1px;
    background: var(--ath-border);
    margin: 2px 0;
}
.ath-price-value--free { color: var(--ath-green) !important; font-weight: 600; }
.ath-price-label--total {
    font-size: 15px;
    font-weight: 700;
    color: var(--ath-heading);
}
.ath-price-value--total {
    font-size: 18px;
    font-weight: 800;
    color: var(--ath-teal);
    letter-spacing: -.3px;
}

.ath-qc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 20px;
    margin-top: 4px;
    background: var(--ath-teal) !important;
    color: var(--ath-white);
    border: none;
    border-radius: var(--ath-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.ath-qc-btn:hover { background: var(--ath-teal-dark) !important; transform: translateY(-1px); }
.ath-qc-btn:active { transform: translateY(0); }
.ath-qc-btn:disabled { background: #9CA3AF !important; cursor: not-allowed; transform: none; }
.ath-btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.ath-qc-btn .ath-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
    border-radius: 50%; animation: athSpin .7s linear infinite;
}

/* ── SÉPARATEUR "OU" ── */
.ath-qc-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    color: var(--ath-muted);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.ath-qc-or::before,
.ath-qc-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ath-border);
}

/* ── BOUTON SECONDAIRE — redirection vers la page checkout ── */
.ath-qc-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: transparent;
    color: var(--ath-teal);
    border: 1.5px solid var(--ath-teal);
    border-radius: var(--ath-radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
}
.ath-qc-btn-outline:hover { background: var(--ath-teal-soft); transform: translateY(-1px); }
.ath-qc-btn-outline:active { transform: translateY(0); }

.ath-payment-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--ath-teal-soft);
    border-radius: var(--ath-radius);
    padding: 12px 14px;
    margin-top: 4px;
}
.ath-payment-badge svg { width: 20px; height: 20px; color: var(--ath-teal); flex-shrink: 0; }
.ath-payment-badge__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.35;
}
.ath-payment-badge__text strong { font-size: 13px; font-weight: 700; color: var(--ath-teal); }
.ath-payment-badge__text small { font-size: 12px; color: var(--ath-muted); }

.ath-payment-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 6px;
}
.ath-pay-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    min-width: 44px;
    padding: 0 8px;
    background: var(--ath-white);
    border: 1px solid var(--ath-border);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .3px;
}
.ath-pay-visa  { color: #1A1F71; font-style: italic; }
.ath-pay-cmi   { color: #444; font-weight: 700; }
.ath-pay-mc    { gap: 0; position: relative; }
.ath-pay-mc .ath-mc-red,
.ath-pay-mc .ath-mc-yellow {
    width: 14px; height: 14px; border-radius: 50%; display: inline-block;
}
.ath-pay-mc .ath-mc-red    { background: #EB001B; }
.ath-pay-mc .ath-mc-yellow { background: #F79E1B; margin-left: -6px; mix-blend-mode: multiply; }

.ath-qc-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.5;
    animation: athSlideIn .25s ease;
    width: 100%;
}
.ath-qc-message.ath-success   { background: #DCFCE7; border: 1px solid #86EFAC; color: #166534; }
.ath-qc-message.ath-error-msg { background: #FEE2E2; border: 1px solid #FCA5A5; color: #991B1B; }

@keyframes athSpin { to { transform: rotate(360deg); } }
@keyframes athSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes athShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

@media (max-width: 640px) {
    .ath-qc-btn { font-size: 13px; }
    .ath-qc-field input[type="text"],
    .ath-qc-field input[type="tel"],
    .ath-qc-textarea,
    .ath-select-wrap select { font-size: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}