/* ═══════════════════════════════════════════════════════
   AGC — Formulaire carte cadeau (front-end)
════════════════════════════════════════════════════════ */

.agc-form {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: inherit;
    position: relative;
}

/* ── Indicateur d'étapes ── */
.agc-steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.agc-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: .4;
    transition: opacity .2s;
}
.agc-step--active,
.agc-step--completed { opacity: 1; }

.agc-step__number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    transition: background .2s, color .2s;
}
.agc-step--active    .agc-step__number { background: #1a1a2e; color: #fff; }
.agc-step--completed .agc-step__number { background: #4caf50; color: #fff; }

.agc-step__label {
    font-size: .75rem;
    text-align: center;
    color: #555;
}

/* ── Barre de progression ── */
.agc-progress {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 32px;
    overflow: hidden;
}
.agc-progress__bar {
    height: 100%;
    background: #1a1a2e;
    transition: width .3s ease;
}

/* ── Panels ── */
.agc-panel h2 { margin-top: 0; font-size: 1.4rem; }
.agc-subsection-title {
    font-size: .9rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 24px 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8e8;
}

/* ── Sélecteur type ── */
.agc-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.agc-type-option {
    flex: 1;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transition: border-color .15s;
}
.agc-type-option:has(input:checked) { border-color: #1a1a2e; background: #f5f5ff; }
.agc-type-option input { accent-color: #1a1a2e; }

/* ── Champs ── */
.agc-field { margin-bottom: 18px; }
.agc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.agc-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: .9rem;
}
.agc-required { color: #c0392b; }
.agc-hint { font-size: .8rem; color: #777; margin: 4px 0 0; }

.agc-field input[type="text"],
.agc-field input[type="email"],
.agc-field input[type="tel"],
.agc-field input[type="number"],
.agc-field select,
.agc-field textarea {
    width: 100%;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 1rem;
    transition: border-color .15s;
    box-sizing: border-box;
}
.agc-field input:focus,
.agc-field select:focus,
.agc-field textarea:focus {
    outline: none;
    border-color: #1a1a2e;
}

/* ── Livraison ── */
.agc-delivery-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.agc-delivery-option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .15s;
}
.agc-delivery-option:has(input:checked) { border-color: #1a1a2e; background: #f5f5ff; }
.agc-delivery-option input { accent-color: #1a1a2e; }
.agc-delivery-option__title { font-weight: 600; flex: 1; }
.agc-delivery-option__desc  { font-size: .85rem; color: #666; }
.agc-delivery-option__price { font-weight: 700; color: #1a1a2e; white-space: nowrap; }

.agc-address-block {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
}
.agc-address-block h3 { margin-top: 0; font-size: 1rem; }

/* ── Récapitulatif ── */
.agc-total-recap,
.agc-total-preview {
    background: #f0f4ff;
    border-left: 4px solid #1a1a2e;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}
.agc-total-recap p { margin: 4px 0; }
.agc-total-line { font-size: 1.1rem; }

.agc-summary-box {
    background: #fafafa;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 24px;
}
.agc-summary-box h3 { margin-top: 0; }
.agc-summary-box ul { margin: 0; padding: 0 0 0 18px; }
.agc-summary-box li { margin-bottom: 6px; }
.agc-summary-total  { font-size: 1.15rem; margin-top: 12px; }

/* ── Stripe Element ── */
.agc-stripe-element {
    border: 1.5px solid #ccc;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
    min-height: 44px;
}

/* ── RGPD ── */
.agc-rgpd-field { margin-top: 12px; }
.agc-checkbox-label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: .9rem; }
.agc-checkbox-label input { margin-top: 2px; flex-shrink: 0; }

/* ── Boutons ── */
.agc-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    gap: 12px;
}
.agc-btn {
    padding: 12px 28px;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.agc-btn:active { transform: scale(.98); }
.agc-btn--primary   { background: #1a1a2e; color: #fff; }
.agc-btn--primary:hover { background: #2d2d52; }
.agc-btn--secondary { background: #eee; color: #333; }
.agc-btn--secondary:hover { background: #ddd; }
.agc-btn--pay       { background: #4caf50; color: #fff; font-size: 1.05rem; padding: 14px 36px; }
.agc-btn--pay:hover { background: #43a047; }
.agc-btn:disabled   { opacity: .6; cursor: not-allowed; }

/* ── Erreur ── */
.agc-error-message {
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: .9rem;
}

/* ── Loader ── */
.agc-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}
.agc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: #1a1a2e;
    border-radius: 50%;
    animation: agc-spin .8s linear infinite;
}
@keyframes agc-spin { to { transform: rotate(360deg); } }

/* ── Confirmation ── */
.agc-confirmation {
    text-align: center;
    padding: 48px 24px;
}
.agc-confirmation__icon {
    width: 72px;
    height: 72px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

/* ── Responsive ── */
@media ( max-width: 560px ) {
    .agc-field-row  { grid-template-columns: 1fr; }
    .agc-type-selector { flex-direction: column; }
    .agc-step__label { display: none; }
    .agc-btn--pay { width: 100%; }
}
