/* CODClic v4 */

.cc-wrapper {
    border: 2px solid #e63946;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0 28px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
}

.cc-form-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    border: none !important;
    text-align: center;
    line-height: 1.4 !important;
}

/* ── Champs ── */
.cc-field {
    display: flex;
    align-items: center;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.cc-field:focus-within {
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230,57,70,.1);
}
.cc-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-right: 1px solid #dde1e7;
    flex-shrink: 0;
    color: #aaa;
    transition: color .2s;
}
.cc-field:focus-within .cc-icon { color: #e63946; }
.cc-field input {
    flex: 1;
    border: none !important;
    outline: none !important;
    padding: 0 12px !important;
    font-size: .92rem !important;
    color: #2d3748 !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 44px !important;
    font-family: inherit;
    min-width: 0;
}
.cc-field input::placeholder { color: #b0bac7; }

/* ── Upsell radios ── */
.cc-upsell-radios {
    background: #f7fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.cc-upsell-title {
    font-size: .8rem !important;
    font-weight: 700 !important;
    color: #718096 !important;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin: 0 0 8px !important;
}
.cc-radio-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 7px;
    cursor: pointer;
    margin-bottom: 4px;
    border: 1.5px solid transparent;
    transition: background .15s, border-color .15s;
    font-size: .88rem;
    color: #2d3748;
}
.cc-radio-opt:hover { background: #edf2f7; }
.cc-radio-opt.cc-checked,
.cc-radio-opt:has(input:checked) {
    background: #fff5f6;
    border-color: #e63946;
}
.cc-radio-opt input[type="radio"] {
    width: 16px; height: 16px;
    margin: 0; cursor: pointer;
    accent-color: #e63946; flex-shrink: 0;
}
.cc-radio-opt em {
    font-style: normal;
    font-weight: 700;
    background: #e63946;
    color: #fff;
    padding: 1px 7px;
    border-radius: 50px;
    font-size: .74rem;
}

/* ── Total ── */
.cc-total-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .88rem;
    color: #718096;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.cc-total-amount {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -.5px;
}

/* ── Bouton submit ── */
.cc-submit {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.cc-submit::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
    animation: cc-shimmer 3s ease-in-out infinite;
}
@keyframes cc-shimmer {
    0%  { left: -100%; }
    55% { left: 200%; }
    100%{ left: 200%; }
}
.cc-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230,57,70,.35);
}
.cc-submit:disabled { opacity: .72; cursor: not-allowed; transform: none; }
.cc-submit:disabled::after { display: none; }

/* ── Messages ── */
.cc-message {
    margin-top: 10px;
    text-align: center;
    font-size: .88rem;
    min-height: 1rem;
    border-radius: 7px;
}
.cc-message:not(:empty) { padding: 10px 12px; }
.cc-ok  { background:#f0fff4; border:1px solid #9ae6b4; color:#276749; font-weight:600; }
.cc-err { background:#fff5f5; border:1px solid #fed7d7; color:#c53030; font-weight:600; }

/* ── Badges ── */
.cc-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}
.cc-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .73rem;
    color: #718096;
    font-weight: 600;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 4px 10px;
}
.cc-badge svg { color: #aaa; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   BOUTON STICKY MOBILE — pilule compacte + wiggle rapide
══════════════════════════════════════════════════════════ */
.cc-mobile-btn {
    /* Position : centré, flottant, PAS toute la largeur */
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 9999;

    /* Taille pilule */
    width: auto;
    min-width: 190px;
    max-width: 260px;
    padding: 13px 26px;
    white-space: nowrap;

    border: none;
    border-radius: 50px;
    font-size: .93rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;

    /* Ombre marquée pour visibilité */
    box-shadow: 0 6px 24px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.18);

    opacity: 0;
    transition: transform .4s cubic-bezier(.34,1.3,.64,1), opacity .3s ease;
}

/* Apparition */
.cc-mobile-btn.cc-mobile-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;

    /* Wiggle rapide toutes les 3s */
    animation: cc-wiggle 3s ease-in-out infinite;
}

/* Wiggle : rapide et visible — 5 oscillations en 0.5s */
@keyframes cc-wiggle {
    0%,  42%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    44%            { transform: translateX(-50%) translateY(0) rotate(-6deg); }
    46%            { transform: translateX(-50%) translateY(0) rotate(6deg); }
    48%            { transform: translateX(-50%) translateY(0) rotate(-5deg); }
    50%            { transform: translateX(-50%) translateY(0) rotate(5deg); }
    52%            { transform: translateX(-50%) translateY(0) rotate(-3deg); }
    54%            { transform: translateX(-50%) translateY(0) rotate(3deg); }
    56%            { transform: translateX(-50%) translateY(0) rotate(0deg); }
}

.cc-mobile-btn:active {
    transform: translateX(-50%) scale(.96) !important;
    animation: none !important;
}

body.has-cc-mobile { padding-bottom: 80px; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .cc-wrapper { padding: 14px; margin: 14px 0; }
    .cc-form-title { font-size: 1rem !important; }
}
@media (min-width: 768px) {
    .cc-mobile-btn { display: none !important; }
}

/* ── Textarea (note de commande) ── */
.cc-field-textarea { align-items: flex-start; }
.cc-field-textarea textarea {
    flex: 1;
    border: none !important;
    outline: none !important;
    padding: 11px 12px !important;
    font-size: .92rem !important;
    color: #2d3748 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
    width: 100%;
    line-height: 1.5;
}
.cc-field-textarea textarea::placeholder { color: #b0bac7; }

/* ── Bouton loop (archives/boutique) ── */
.cc-loop-btn {
    display: inline-block !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-size: .88rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: opacity .2s, transform .2s !important;
    cursor: pointer !important;
}
.cc-loop-btn:hover {
    opacity: .88 !important;
    transform: translateY(-1px) !important;
    color: inherit !important;
}
