/* --- GLOBAL --- */
#pl-app {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', 'Helvetica Neue', Roboto, Arial, sans-serif;
    padding: 20px;
    padding-bottom: 120px;
    border-radius: 8px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    min-height: 600px;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#pl-app * { box-sizing: border-box; }
#pl-app button { cursor: pointer; font-family: inherit; transition: all 0.2s ease; }
#pl-app input, #pl-app select, #pl-app textarea { font-family: inherit; }

/* --- HEADER --- */
.pl-header {
    display: flex; justify-content: center; align-items: center; gap: 20px;
    background: #2b2b2b; padding: 15px 30px; border-radius: 50px;
    margin-bottom: 40px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); border: 1px solid #333;
}
.pl-btn-nav {
    background: #0078d4; color: white; border: none; border-radius: 50%;
    width: 44px; height: 44px; font-size: 22px; display: flex; align-items: center; justify-content: center;
}
.pl-btn-nav:hover { background: #0063b1; transform: scale(1.05); }

.pl-date-input {
    background: transparent; border: none; color: white;
    font-size: 22px; font-weight: 600; text-align: center;
    cursor: pointer; padding: 5px 20px; border-radius: 8px;
}
.pl-date-input:hover { background: rgba(255,255,255,0.05); }
.pl-date-input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.6; cursor: pointer; }

/* --- GRILLE SERVICES --- */
.pl-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }

.pl-service {
    background: #202020; border-radius: 12px; width: 170px;
    overflow: hidden; text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); border: 1px solid #333; transition: transform 0.2s;
}
.pl-service:hover { transform: translateY(-5px); border-color: #555; }

.pl-service-head {
    height: 100px; background-size: cover; background-position: center;
    position: relative; cursor: pointer;
}
.pl-service-head:hover .pl-info-badge { background: #0078d4; opacity: 1; }

.pl-service-title {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white; font-size: 13px; font-weight: 600; padding: 5px; padding-top: 20px;
}

.pl-info-badge {
    position: absolute; top: 8px; right: 8px;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.3);
    color: white; font-size: 14px; font-weight: bold; font-family: serif;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; pointer-events: none;
}

.pl-slots { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.pl-slot {
    display: block; width: 100%; padding: 8px 0;
    border: none; border-radius: 6px; color: white;
    font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;
}
.pl-free { background-color: #2e7d32; }
.pl-free:hover { background-color: #1b5e20; }
.pl-phone { background-color: #ff9800; }
.pl-phone:hover { background-color: #f57c00; }
.pl-in-cart { background-color: #0078d4; color: white; opacity: 0.9; cursor: default; border: 2px solid rgba(255,255,255,0.2); }
.pl-busy { background-color: #c62828; opacity: 0.6; cursor: not-allowed; }

/* --- PANIER FLOTTANT (DESIGN AJUSTÉ) --- */
.pl-floating-cart {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    width: auto; min-width: 300px; max-width: 90%;
    background: #0078d4; color: white; padding: 12px 25px; border-radius: 50px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6); z-index: 99999;
    cursor: pointer; font-size: 16px; font-weight: 600;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255,255,255,0.1);
}
.pl-floating-cart:hover { background: #0063b1; transform: translateX(-50%) scale(1.02); }
@keyframes popIn { from { transform: translateX(-50%) scale(0.8); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.pl-cart-badge { background: white; color: #0078d4; padding: 5px 15px; border-radius: 20px; font-size: 13px; font-weight: bold; margin-left: 15px; }

/* --- MODALES --- */
.pl-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(8px);
}

.pl-modal-dark {
    background: #1e1e1e; width: 450px; border-radius: 20px; max-width: 95%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8); position: relative;
    padding-top: 50px; text-align: center; color: white;
    border: 1px solid #333; animation: slideUpModal 0.3s ease;
}
@keyframes slideUpModal { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.pl-modal-img-circle {
    width: 90px; height: 90px; border-radius: 50%;
    background-size: cover; background-position: center;
    border: 4px solid #1e1e1e; position: absolute;
    top: -45px; left: 50%; transform: translateX(-50%);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5); background-color: #333;
}

.pl-modal-close-btn {
    position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.1); border: none;
    color: white; font-size: 18px; cursor: pointer; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: background 0.2s; z-index: 999;
}
.pl-modal-close-btn:hover { background: rgba(255,255,255,0.3); }

.pl-modal-title { margin: 10px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.pl-modal-subtitle { margin: 5px 0 20px; color: #888; font-size: 14px; text-transform: capitalize; }
.pl-modal-content { padding: 0 30px; }
.pl-modal-count { font-size: 32px; font-weight: 800; margin-bottom: 5px; color: #fff; }
.pl-modal-limits { font-size: 13px; color: #666; margin-bottom: 25px; }

.pl-qty-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 30px; }
.pl-qty-btn {
    background: #333; border: 1px solid #444; color: white;
    width: 40px; height: 40px; border-radius: 50%; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
}
.pl-qty-btn:hover { background: #0078d4; border-color: #0078d4; }

.pl-price-box {
    background: #252525; padding: 15px; border-radius: 10px; margin-bottom: 30px;
    font-size: 15px; color: #bbb; border: 1px solid #333;
}
.pl-price-box strong { display: block; color: white; font-size: 20px; margin-top: 5px; }

.pl-modal-footer { display: flex; border-top: 1px solid #333; }
.pl-btn-action {
    flex: 1; border: none; padding: 20px; font-size: 14px; font-weight: 700;
    cursor: pointer; color: white; text-transform: uppercase; letter-spacing: 1px;
}
.pl-btn-action:first-child { border-bottom-left-radius: 20px; background: #252525; color: #aaa; }
.pl-btn-action:first-child:hover { background: #333; color: white; }
.pl-btn-action:last-child { border-bottom-right-radius: 20px; background: #0078d4; }
.pl-btn-action:last-child:hover { background: #0063b1; }

/* Modale Description */
.pl-modal-desc { width: 500px; padding: 0; overflow: hidden; text-align: left; }
.pl-desc-cover { height: 180px; background-size: cover; background-position: center; border-radius: 20px 20px 0 0; position: relative; }
.pl-desc-content { padding: 30px; }
.pl-desc-stats { display: flex; gap: 10px; margin-bottom: 20px; font-size: 12px; font-weight: bold; }
.pl-tag { background: #333; color: #ddd; padding: 5px 10px; border-radius: 6px; }
.pl-desc-text { color: #ccc; line-height: 1.6; font-size: 15px; background: #252525; padding: 15px; border-radius: 10px; border: 1px solid #333; }

/* --- CHECKOUT --- */
.pl-checkout-container { max-width: 900px; margin: 0 auto; padding-bottom: 50px; }

.pl-section-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 2px solid #0078d4; padding-bottom: 5px; margin-bottom: 20px; margin-top: 40px;
}
.pl-section-title { color: #e0e0e0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

.pl-product-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 0; border-bottom: 1px solid #333;
}
.pl-product-name { font-size: 20px; font-weight: 700; color: white; margin-bottom: 5px; }
.pl-product-date { font-size: 13px; color: #aaa; }
.pl-product-qty select { background: #252525; color: white; border: 1px solid #444; padding: 5px 10px; border-radius: 4px; }
.pl-product-price { font-size: 15px; font-weight: 600; color: #e0e0e0; text-align: right; }
.pl-product-delete { color: #ff5252; background: none; border: none; font-size: 18px; margin-left: 15px; cursor: pointer; }

.pl-client-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 600px) { .pl-client-grid { grid-template-columns: 1fr; } }

.pl-input-group { display: flex; flex-direction: column; }
.pl-input-group label { font-size: 13px; color: #ccc; margin-bottom: 6px; font-weight: 600; }
.pl-input-group input {
    background: #222; border: 1px solid #444; color: white; padding: 12px;
    border-radius: 4px; font-size: 14px; transition: border-color 0.2s;
}
.pl-input-group input:focus { border-color: #0078d4; outline: none; }

.pl-company-toggle { display: flex; align-items: center; gap: 10px; margin-top: 10px; cursor: pointer; color: #ccc; font-size: 14px; }
.pl-company-fields { display: none; margin-top: 15px; padding-top: 15px; border-top: 1px solid #333; }
.pl-company-fields.visible { display: block; }
.pl-message-box textarea { width: 100%; background: #222; border: 1px solid #444; color: white; padding: 10px; border-radius: 4px; margin-top: 10px; font-family: inherit; }

.pl-payment-options { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.pl-pay-opt {
    border: 1px solid #444; border-radius: 8px; padding: 15px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; transition: all 0.2s;
}
.pl-pay-opt.selected { border: 2px solid #0078d4; background: rgba(0, 120, 212, 0.1); }
.pl-pay-opt:hover { background: #252525; }

.pl-validation-box { background: #202020; padding: 25px; border-top: 3px solid #0078d4; margin-top: 40px; border-radius: 4px; }

/* CHECKBOX FIX */
.pl-checkbox-row {
    display: flex; align-items: flex-start; gap: 15px; margin-bottom: 15px; font-size: 14px; color: #e0e0e0; line-height: 1.5; cursor: pointer;
}
.pl-checkbox-row input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 22px; height: 22px; min-width: 22px; flex-shrink: 0;
    border: 1px solid #666; border-radius: 6px; background-color: transparent; cursor: pointer;
    position: relative; margin-top: 2px;
}
.pl-checkbox-row input[type="checkbox"]:checked { background-color: #0078d4; border-color: #0078d4; }
.pl-checkbox-row input[type="checkbox"]:checked::after { content: '✔'; position: absolute; color: white; font-size: 14px; left: 4px; top: 0px; }
.pl-checkbox-row input[disabled] { opacity: 0.3; cursor: not-allowed; border-color: #444; }
.pl-checkbox-row a { color: #4dabf7; text-decoration: none; font-weight: 600; }
.pl-checkbox-row a:hover { text-decoration: underline; }

.pl-pay-btn {
    display: block; width: 100%; max-width: 400px; margin: 30px auto 0;
    background: #333; color: #888; font-size: 16px; font-weight: 700;
    padding: 18px; border: none; border-radius: 6px; cursor: not-allowed; transition: all 0.3s;
}
.pl-pay-btn.active { background: #0078d4; color: white; cursor: pointer; box-shadow: 0 4px 15px rgba(0, 120, 212, 0.4); }
.pl-pay-btn.active:hover { background: #0063b1; transform: translateY(-2px); }

.pl-back-link { color: #0078d4; text-decoration: underline; background: none; border: none; font-size: 14px; margin-bottom: 20px; padding: 0; }
.pl-loading, .pl-error, .pl-success { text-align: center; padding: 50px; color: #aaa; }
.pl-error { color: #ff6b6b; border: 1px dashed #ff6b6b; border-radius: 8px; }
.pl-success h2 { color: #4CAF50; font-size: 28px; margin-bottom: 10px; }

/* Empty state */
.pl-no-slots {
    text-align: center; padding: 60px 20px; background: #202020; border-radius: 16px; border: 2px dashed #333; margin-top: 20px;
}
.pl-btn-tomorrow {
    background: #0078d4; color: white; border: none; padding: 15px 30px; border-radius: 50px; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 15px;
}