/* ==========================================================================
   abonnements_client.css — Formules d'Abonnement Repas (Design Reference)
   ========================================================================== */

/* --- Bouton "Voir tout le catalogue" (Section Populaire) --- */
.see-all-catalogue-box {
    text-align: center;
    margin: 36px auto 20px;
    max-width: 650px;
    padding: 0 16px;
}

.btn-see-all-catalogue {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: #1e293b;
    border: 2px solid #b91c1c;
    border-radius: 16px;
    padding: 14px 26px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.12);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-see-all-catalogue i {
    font-size: 1.25rem;
    color: #b91c1c;
    transition: transform 0.25s ease;
}

.btn-see-all-catalogue:hover {
    background: #b91c1c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(185, 28, 28, 0.22);
}

.btn-see-all-catalogue:hover i {
    color: #fff;
    transform: translateX(5px);
}

/* --- Grille des Formules --- */
.abonnements-client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    margin: 28px 0 48px;
}

/* =========================================================
   CARTE ABONNEMENT — Design Conforme à l'Image de Référence
   ========================================================= */
.abo-client-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1.5px solid #111827;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease;
}

.abo-client-card:hover {
    transform: translateY(-3px);
    box-shadow: none !important;
}

/* --- Zone photo en haut de la carte --- */
.abo-card-photo {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #f8fafc url('assets/default-food-bg.jpg') center/cover no-repeat;
    flex-shrink: 0;
}

/* Dégradé doux en bas de la photo pour fondre avec le blanc */
.abo-card-photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to bottom, transparent 0%, #ffffff 100%);
    pointer-events: none;
}

/* Badge type de repas — coin supérieur gauche */
.abo-meal-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #9b1c1c;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 8px;
    letter-spacing: 0.2px;
    z-index: 2;
    box-shadow: none !important;
    line-height: 1.2;
}

/* Badge Livraison Gratuite Épuré — Coin supérieur droit */
.abo-free-shipping-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #ffffff;
    color: #15803d;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    line-height: 1.2;
    box-shadow: none !important;
}

.abo-free-shipping-badge i {
    font-size: 0.9rem;
    color: #16a34a;
}

/* --- Corps de la carte (sous la photo) --- */
.abo-card-body {
    padding: 14px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Ligne titre + icône info */
.abo-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.abo-title-col {
    flex: 1;
    min-width: 0;
}

.abo-client-title {
    font-size: 1.28rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.abo-stats-line {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    margin: 0;
    letter-spacing: 0.1px;
}

/* Bouton info ⓘ — icône RemixIcon nette */
.abo-info-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s ease, transform 0.15s ease;
}

.abo-info-btn:hover {
    color: #9b1c1c;
    transform: scale(1.08);
}

.abo-info-btn:focus-visible {
    outline: 2px solid #9b1c1c;
    border-radius: 50%;
}

/* Description */
.abo-client-desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    margin: 14px 0 0;
    flex: 1;
}

/* --- Pied de carte : prix à gauche + bouton S'abonner à droite --- */
.abo-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.abo-price-block {
    line-height: 1.15;
    flex-shrink: 0;
}

.abo-client-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.abo-currency {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.abo-price-per-meal {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 600;
    margin-top: 3px;
}

/* Bouton S'abonner — rouge bordeaux, sans ombre */
.btn-subscribe-now {
    flex-shrink: 0;
    padding: 10px 22px;
    background: #9b1c1c;
    color: #ffffff;
    border: none;
    border-radius: 9px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s ease;
    box-shadow: none !important;
    min-height: 42px;
    white-space: nowrap;
}

.btn-subscribe-now:hover {
    background: #7f1d1d;
    box-shadow: none !important;
}

.btn-subscribe-now:active {
    transform: scale(0.98);
}

.btn-subscribe-now:focus-visible {
    outline: 2px solid #9b1c1c;
    outline-offset: 2px;
}


/* =========================================================
   MODALES COMMUNES (Backdrop)
   ========================================================= */
.abo-client-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.abo-client-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.abo-client-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: none;
    border: 1.5px solid #e5e7eb;
    padding: 24px 24px 28px;
    position: relative;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #111827;
}

.abo-client-modal-backdrop.active .abo-client-modal {
    transform: translateY(0) scale(1);
}

/* Bouton fermeture */
.abo-client-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    padding: 0;
}

.abo-client-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.abo-client-modal-close:focus-visible {
    outline: 2px solid #9b1c1c;
}

/* En-tête de modale */
.abo-modal-header {
    margin-bottom: 18px;
    padding-right: 40px;
}

.abo-modal-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px 0;
}

.abo-modal-header p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* Capsule résumé de la formule (dans le modal souscription) */
.abo-modal-summary {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.abo-modal-summary-name {
    font-weight: 700;
    font-size: 0.98rem;
    color: #111827;
}

.abo-modal-summary-sub {
    font-size: 0.78rem;
    color: #9b1c1c;
    margin-top: 1px;
}

.abo-modal-summary-price {
    font-weight: 800;
    font-size: 1.15rem;
    color: #9b1c1c;
    white-space: nowrap;
}

/* Champs de formulaire */
.abo-field {
    margin-bottom: 14px;
}

.abo-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 5px;
}

.abo-field input,
.abo-field select,
.abo-field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.92rem;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 44px;
}

.abo-field input:focus,
.abo-field select:focus,
.abo-field textarea:focus {
    border-color: #9b1c1c;
    box-shadow: 0 0 0 3px rgba(155, 28, 28, 0.12);
}

.abo-field textarea {
    min-height: 72px;
    resize: vertical;
}

/* Grille 2 colonnes */
.abo-fields-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Options avancées (drawer) */
.abo-advanced-toggle {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    margin-bottom: 6px;
    transition: color 0.18s;
    width: 100%;
    text-align: left;
}

.abo-advanced-toggle:hover {
    color: #9b1c1c;
}

.abo-advanced-toggle i {
    font-size: 0.9rem;
    transition: transform 0.25s ease;
}

.abo-advanced-toggle.open i {
    transform: rotate(180deg);
}

.abo-advanced-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.abo-advanced-panel.open {
    max-height: 400px;
    opacity: 1;
}

.abo-time-fields-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 10px;
}

/* Message d'erreur/feedback dans le modal */
.abo-form-feedback {
    display: none;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.87rem;
    font-weight: 600;
}

.abo-form-feedback.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

.abo-form-feedback.success {
    background: #dcfce7;
    color: #166534;
    display: block;
}

/* Bouton submit (dans modal) — full width */
.btn-modal-submit {
    width: 100%;
    padding: 14px 20px;
    background: #9b1c1c;
    color: #fff;
    border: none;
    border-radius: 11px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.18s;
    box-shadow: none;
    min-height: 48px;
    margin-top: 6px;
}

.btn-modal-submit:hover {
    background: #7f1d1d;
    transform: translateY(-1px);
}

.btn-modal-submit:active {
    transform: scale(0.98);
}

.btn-modal-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-modal-submit:focus-visible {
    outline: 3px solid #fca5a5;
    outline-offset: 2px;
}

/* =========================================================
   MODALE INFO (Détails de la formule)
   ========================================================= */
.abo-info-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.abo-info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.abo-info-section h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin: 0 0 8px 0;
}

.abo-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.abo-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 7px;
    line-height: 1.45;
}

.abo-info-list li i {
    color: #9b1c1c;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Stat pills dans la modale info */
.abo-info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.abo-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #9b1c1c;
}

/* =========================================================
   MODALE SUCCÈS
   ========================================================= */
.abo-success-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 18px;
}

.abo-success-code-box {
    background: #f9fafb;
    border: 1.5px dashed #d1d5db;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    margin: 16px 0;
}

.abo-success-code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 1.3rem;
    font-weight: 800;
    color: #9b1c1c;
    letter-spacing: 2px;
}

/* Bouton WhatsApp */
.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 11px;
    padding: 13px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-dismiss {
    width: 100%;
    padding: 12px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-dismiss:hover {
    background: #e5e7eb;
}

/* =========================================================
   ÉTATS VIDE / CHARGEMENT
   ========================================================= */
.abo-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 18px;
    border: 1.5px dashed #d1d5db;
}

.abo-empty-state i {
    font-size: 3rem;
    color: #9ca3af;
    display: block;
    margin-bottom: 12px;
}

.abo-empty-state h3 {
    color: #111827;
    margin: 0 0 6px;
}

.abo-empty-state p {
    color: #6b7280;
    margin: 0;
    font-size: 0.9rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 600px) {
    .abonnements-client-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .abo-fields-2col {
        grid-template-columns: 1fr;
    }

    .abo-client-modal {
        padding: 20px 18px 24px;
        border-radius: 16px;
    }
}

/* Animation spin pour l'icône de chargement */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ri-spin {
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
