/**
 * Alkalois Custom — Pricing stylesheet
 * ====================================
 * 1. Public grid (apc-grid)
 * 2. Admin controls & drawer (apc-admin, apc-drawer)
 * 3. Responsive (media queries)
 */


/* =============================================
   1. Public grid
   ============================================= */

.apc-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    position: relative;
}

.apc-grid__card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    width: 290px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform .25s, box-shadow .25s;
}

.apc-grid__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0,0,0,.15);
}

.apc-grid__card--featured {
    width: 320px;
    box-shadow: 0 12px 48px rgba(224,107,27,.22);
}

.apc-grid__badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #e06b1b;
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    padding: 6px 14px 6px 22px;
    clip-path: polygon(16px 0%,100% 0%,100% 100%,0% 100%);
    z-index: 3;
}

.apc-grid__header {
    background: linear-gradient(150deg,#6c7a7d 0%,#8d9ea0 100%);
    padding: 50px 24px 26px;
    text-align: center;
    color: #fff;
    flex-shrink: 0;
}

.apc-grid__card--featured .apc-grid__header {
    background: linear-gradient(150deg,#5a6c6e 0%,#7b8d8f 100%);
}

.apc-grid__title {
       margin: 0;
    font-size: 19px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    line-height: 1.2;
    color: #fff !important;
    padding: 0;
}

.apc-grid__subtitle {
    margin: 0;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 1.45;
    opacity: .88;
    color: #fff;
}

.apc-grid__body {
    background: #f5f4f0;
    padding: 28px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.apc-grid__price {
    font-size: 35px;
    font-weight: 500;
    color: #1a1a1a;
    text-align: center;
    line-height: 1;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.apc-grid__price span {
    display: block;
    font-size: 11.5px;
    font-weight: 400;
    color: #999;
    letter-spacing: .5px;
    margin-top: 5px;
}

.apc-grid__features {
    list-style: none;
    padding: 0;
    margin: 22px 0 20px;
    border-top: 1px solid rgba(0,0,0,.08);
}

.apc-grid__features li {
    padding: 11px 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
    font-size: 13.5px;
    color: #3a3a3a;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
}

.apc-grid__features li::before {
    content: "";
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #e06b1b;
    border-radius: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l2.8 2.8L9 1' stroke='%23e06b1b' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat;
}

.apc-grid__cta {
    display: block;
    background: #e06b1b;
    color: #fff !important;
    text-align: center;
    padding: 15px 20px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 12.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background .18s,transform .12s;
    margin-top: auto;
}

.apc-grid__cta:hover {
    background: #c9581a;
    transform: scale(1.025);
}

.apc-grid__note {
    margin: 14px 0 0;
    font-size: 11.5px;
    color: #999;
    text-align: center;
    line-height: 1.55;
}


/* =============================================
   2. Admin controls & drawer
   ============================================= */

.apc-admin-actions {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity .15s;
    pointer-events: none;
}

.apc-grid__card:hover .apc-admin-actions {
    opacity: 1;
    pointer-events: all;
}

.apc-ca-btn {
    background: rgba(0,0,0,.72);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.apc-ca-btn:hover {
    background: #000;
}

.apc-add-card-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 28px;
    border: 2.5px dashed rgba(224,107,27,.4);
    border-radius: 14px;
    background: rgba(224,107,27,.04);
    color: #e06b1b;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    min-width: 180px;
    min-height: 130px;
    align-self: stretch;
    font-family: inherit;
}

.apc-add-card-btn:hover {
    background: rgba(224,107,27,.1);
    border-color: #e06b1b;
}

.apc-add-card-btn span {
    font-size: 28px;
    line-height: 1;
}

#apc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99998;
    backdrop-filter: blur(2px);
}

#apc-overlay.open {
    display: block;
}

#apc-drawer {
    position: fixed;
    top: 0;
    right: -640px;
    width: min(600px,100vw);
    height: 100dvh;
    background: #fff;
    z-index: 99999;
    box-shadow: -8px 0 40px rgba(0,0,0,.2);
    transition: right .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
}

#apc-drawer.open {
    right: 0;
}

.apc-dh {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #1d2327;
    flex-shrink: 0;
}

.apc-dh h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-family: -apple-system,sans-serif;
}

.apc-dh-close {
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: background .15s;
}

.apc-dh-close:hover {
    background: rgba(255,255,255,.25);
}

#apc-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 24px 40px;
    font-family: -apple-system,sans-serif;
}

.apc-sep {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #999;
    display: block;
    margin: 18px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.apc-sep:first-child {
    margin-top: 0;
}

.apc-row2 {
    display: flex;
    gap: 14px;
}

.apc-f {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.apc-f label {
    font-size: 11.5px;
    font-weight: 700;
    color: #1d2327;
}

.apc-f.req label::after {
    content: " *";
    color: #e06b1b;
}

.apc-f input[type=text],
.apc-f textarea,
.apc-f select {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 8px 11px;
    font-size: 13px;
    color: #1d2327;
    font-family: inherit;
    transition: border-color .15s,box-shadow .15s;
    background: #fff;
}

.apc-f input:focus,
.apc-f textarea:focus,
.apc-f select:focus {
    outline: none;
    border-color: #e06b1b;
    box-shadow: 0 0 0 3px rgba(224,107,27,.12);
}

.apc-f textarea {
    resize: vertical;
    min-height: 60px;
}

.apc-f small {
    color: #aaa;
    font-size: 11px;
}

/* Nouvelle catégorie inline */
#apc-new-cat-wrap {
    display: none;
    margin-top: 6px;
    flex-direction: column;
    gap: 4px;
}

#apc-new-cat-wrap.visible {
    display: flex;
}

#apc-new-cat-wrap input {
    border: 1.5px solid #e06b1b !important;
}

.apc-new-cat-hint {
    font-size: 11px;
    color: #e06b1b;
    font-weight: 600;
}

/* Checks */
.apc-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
}

.apc-chk {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    font-family: inherit;
}

.apc-chk input {
    width: 15px;
    height: 15px;
    accent-color: #e06b1b;
    cursor: pointer;
}

/* Répéteur */
#apc-feat-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.apc-feat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 5px 10px;
    cursor: grab;
}

.apc-feat-row:active {
    cursor: grabbing;
    opacity: .75;
}

.apc-feat-handle {
    color: #ccc;
    font-size: 16px;
    user-select: none;
    flex-shrink: 0;
}

.apc-feat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    padding: 4px 0;
    font-family: inherit;
    outline: none;
    color: #333;
}

.apc-feat-rm {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0 2px;
    flex-shrink: 0;
}

.apc-feat-rm:hover {
    color: #c0392b;
}

.apc-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 16px;
    border: 2px solid #e06b1b;
    border-radius: 6px;
    color: #e06b1b;
    font-weight: 700;
    font-size: 12px;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}

.apc-btn-ghost:hover {
    background: #fff5f0;
}

.apc-btn-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: #1d2327;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}

.apc-btn-save:hover {
    background: #2c3338;
}

#apc-factions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0 0;
    border-top: 1px solid #eee;
    margin-top: 14px;
}

#apc-fstatus {
    font-size: 13px;
    font-weight: 700;
}

#apc-fstatus.ok {
    color: #27ae60;
}

#apc-fstatus.err {
    color: #c0392b;
}


/* =============================================
   3. Responsive
   ============================================= */

@media(max-width:900px) {
    .apc-grid { gap: 20px; }
    .apc-grid__card,
    .apc-grid__card--featured { width: 100%; max-width: 420px; }
    .apc-grid__card:hover { transform: translateY(-4px); }
}
