/* ==========================================================
   Grimpe Planning v1.2 — styles isolés du thème WordPress
   Tous les sélecteurs sont préfixés #gp-wrap
   ========================================================== */

#gp-wrap, #gp-wrap * { box-sizing: border-box; }

#gp-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    max-width: 900px;
    margin: 0 auto;
    color: #222;
    line-height: 1.5;
}

/* ---- Navigation ---- */
#gp-wrap .gp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 1.2rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
#gp-wrap .gp-nav-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin: 0 !important;
}
#gp-wrap .gp-nav-week {
    font-size: .88rem;
    color: #666;
    font-weight: 500;
}
#gp-wrap .gp-nav-btns { display: flex; gap: .5rem; }

/* ---- Boutons ---- */
#gp-wrap .gp-btn {
    display: inline-block !important;
    padding: .45rem 1rem !important;
    border-radius: 999px !important;
    font-size: .85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    border: 1.5px solid #dee2e6 !important;
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    line-height: 1.4 !important;
    transition: filter .15s !important;
}
#gp-wrap .gp-btn:hover { filter: brightness(.93) !important; }
#gp-wrap .gp-btn-primary {
    background: #e05c2a !important;
    color: #fff !important;
    border-color: #e05c2a !important;
}
#gp-wrap .gp-btn-danger {
    background: #e74c3c !important;
    color: #fff !important;
    border-color: #e74c3c !important;
}

/* ---- Cartes ---- */
#gp-wrap .gp-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
#gp-wrap .gp-card-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin: 0 0 1rem !important;
    padding: 0 !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* ---- Formulaire ---- */
#gp-wrap .gp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    margin-bottom: 1.1rem;
}
#gp-wrap .gp-field-full { grid-column: 1 / -1; }
@media (max-width: 600px) {
    #gp-wrap .gp-form-grid { grid-template-columns: 1fr; }
    #gp-wrap .gp-field-full { grid-column: 1; }
}
#gp-wrap .gp-field { display: flex; flex-direction: column; gap: .3rem; }
#gp-wrap .gp-field label {
    font-weight: 600 !important;
    font-size: .85rem !important;
    color: #2c3e50 !important;
    margin: 0 !important;
}
#gp-wrap .gp-field input,
#gp-wrap .gp-field select {
    padding: .55rem .85rem !important;
    border: 1.5px solid #dee2e6 !important;
    border-radius: 8px !important;
    font-size: .95rem !important;
    font-family: inherit !important;
    background: #fff !important;
    color: #222 !important;
    width: 100% !important;
    transition: border-color .2s, box-shadow .2s !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}
#gp-wrap .gp-field input:focus,
#gp-wrap .gp-field select:focus {
    border-color: #e05c2a !important;
    box-shadow: 0 0 0 3px rgba(224,92,42,.15) !important;
}
#gp-wrap .gp-field small { color: #888; font-size: .78rem; }
#gp-wrap .gp-req { color: #e74c3c; }

/* ---- Messages flash ---- */
#gp-wrap #gp-msg {
    padding: .7rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: .9rem;
    display: none;
}
#gp-wrap #gp-msg.gp-ok  { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; display: block; }
#gp-wrap #gp-msg.gp-err { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; display: block; }

/* ================================================================
   ONGLETS — structure visuelle comme l'aperçu
================================================================ */

/* Barre des onglets */
#gp-wrap .gp-tabs-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: .35rem !important;
    margin-bottom: 1.1rem !important;
    padding-bottom: 0 !important;
    border-bottom: 2px solid #dee2e6 !important;
    list-style: none !important;
}

#gp-wrap .gp-tab-btn {
    /* reset complet */
    all: unset !important;
    /* style onglet */
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    padding: .5rem .95rem .45rem !important;
    border: 1.5px solid #dee2e6 !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
    background: #f4f5f7 !important;
    color: #555 !important;
    cursor: pointer !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    min-width: 72px !important;
    transition: background .15s !important;
    margin-bottom: -2px !important;
}
#gp-wrap .gp-tab-btn:hover {
    background: #e8eaed !important;
    color: #333 !important;
}
#gp-wrap .gp-tab-btn.gp-tab-active {
    background: #fff !important;
    border-color: #e05c2a !important;
    border-bottom: 2px solid #fff !important;
    color: #e05c2a !important;
    font-weight: 700 !important;
    z-index: 1 !important;
}

#gp-wrap .gp-tab-day {
    font-size: .82rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    display: block !important;
}
#gp-wrap .gp-tab-date {
    font-size: .72rem !important;
    line-height: 1.2 !important;
    display: block !important;
    opacity: .8;
}
#gp-wrap .gp-tab-btn.gp-tab-active .gp-tab-date { opacity: 1; }

/* Badge compteur */
#gp-wrap .gp-tab-badge {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: #e05c2a !important;
    color: #fff !important;
    font-size: .65rem !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    padding: .12rem .38rem !important;
    line-height: 1.4 !important;
    min-width: 18px !important;
    text-align: center !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.2) !important;
    display: block !important;
}

/* Aujourd'hui */
#gp-wrap .gp-tab-today .gp-tab-day { color: #e05c2a !important; }

/* Panneaux */
#gp-wrap .gp-tab-panel { display: none !important; }
#gp-wrap .gp-tab-panel.gp-tab-active { display: block !important; }

/* ================================================================
   BLOCS CRÉNEAUX
================================================================ */
#gp-wrap .gp-slots-list {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

#gp-wrap .gp-slot-block {
    border: 1.5px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
}
#gp-wrap .gp-slot-block.gp-slot-full { border-color: #f5c6cb; background: #fff8f8; }

/* En-tête créneau */
#gp-wrap .gp-slot-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: .65rem 1rem !important;
    background: #2c3e50 !important;
    color: #fff !important;
    flex-wrap: wrap !important;
    gap: .4rem !important;
}
#gp-wrap .gp-slot-full .gp-slot-header { background: #c0392b !important; }

#gp-wrap .gp-slot-time {
    font-weight: 700 !important;
    font-size: .98rem !important;
    color: #fff !important;
}
#gp-wrap .gp-slot-meta {
    display: flex !important;
    align-items: center !important;
    gap: .5rem !important;
}
#gp-wrap .gp-slot-count {
    font-size: .82rem !important;
    color: rgba(255,255,255,.85) !important;
}
#gp-wrap .gp-badge-full {
    background: #fff !important;
    color: #e74c3c !important;
    font-size: .7rem !important;
    font-weight: 700 !important;
    padding: .1rem .45rem !important;
    border-radius: 999px !important;
}

/* Barre de progression */
#gp-wrap .gp-progress-track { height: 5px; background: #e9ecef; }
#gp-wrap .gp-progress-bar { height: 100%; transition: width .4s ease; }
#gp-wrap .gp-bar-ok     { background: #27ae60; }
#gp-wrap .gp-bar-almost { background: #f39c12; }
#gp-wrap .gp-bar-full   { background: #e74c3c; }

/* Liste inscrits */
#gp-wrap .gp-no-booking {
    padding: .8rem 1rem !important;
    color: #aaa !important;
    font-style: italic !important;
    font-size: .88rem !important;
    margin: 0 !important;
}

#gp-wrap .gp-names {
    list-style: none !important;
    margin: 0 !important;
    padding: .35rem .6rem !important;
}

#gp-wrap .gp-name-item {
    display: flex !important;
    align-items: center !important;
    gap: .65rem !important;
    padding: .45rem .5rem !important;
    border-radius: 8px !important;
    transition: background .12s !important;
    border-bottom: 1px solid #f0f0f0 !important;
}
#gp-wrap .gp-name-item:last-child { border-bottom: none !important; }
#gp-wrap .gp-name-item:hover { background: #f0f4f8 !important; }

#gp-wrap .gp-avatar {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    background: #e05c2a !important;
    color: #fff !important;
    font-size: .82rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
}
#gp-wrap .gp-name-text {
    flex: 1 !important;
    font-size: .9rem !important;
    color: #222 !important;
}
#gp-wrap .gp-note {
    color: #999 !important;
    font-style: italic !important;
    font-size: .82rem !important;
}
#gp-wrap .gp-del-btn {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    border: 1px solid #dee2e6 !important;
    color: #aaa !important;
    cursor: pointer !important;
    font-size: .8rem !important;
    flex-shrink: 0 !important;
    transition: color .15s, background .15s, border-color .15s !important;
}
#gp-wrap .gp-del-btn:hover {
    color: #e74c3c !important;
    background: #fce8e8 !important;
    border-color: #f5c6cb !important;
}

/* ================================================================
   MODAL PIN
================================================================ */
.gp-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.55) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
}
.gp-modal-box {
    background: #fff !important;
    border-radius: 12px !important;
    padding: 2rem !important;
    max-width: 340px !important;
    width: 92% !important;
    box-shadow: 0 8px 40px rgba(0,0,0,.22) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
.gp-modal-box h4 { margin: 0 0 .5rem !important; color: #2c3e50 !important; font-size: 1rem !important; }
.gp-modal-box p  { margin: 0 0 .8rem !important; color: #555 !important; font-size: .9rem !important; }
.gp-modal-box input {
    display: block !important;
    width: 100% !important;
    padding: .7rem !important;
    border: 1.5px solid #dee2e6 !important;
    border-radius: 8px !important;
    font-size: 1.2rem !important;
    margin-bottom: 1rem !important;
    box-sizing: border-box !important;
    text-align: center !important;
    letter-spacing: .35rem !important;
    font-family: inherit !important;
    outline: none !important;
}
.gp-modal-box input:focus { border-color: #e05c2a !important; box-shadow: 0 0 0 3px rgba(224,92,42,.15) !important; }
.gp-modal-actions { display: flex !important; gap: .75rem !important; flex-wrap: wrap !important; }

/* ================================================================
   MODAL — boutons isolés du thème (all: unset puis re-style)
================================================================ */
.gp-modal-box .gp-btn {
    all: unset !important;
    display: inline-block !important;
    padding: .5rem 1.1rem !important;
    border-radius: 999px !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: 1.5px solid #dee2e6 !important;
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    transition: filter .15s !important;
    text-align: center !important;
}
.gp-modal-box .gp-btn:hover { filter: brightness(.92) !important; }
.gp-modal-box .gp-btn-danger {
    background: #e74c3c !important;
    color: #fff !important;
    border-color: #e74c3c !important;
}
