/* ==========================================================================
   JDVC TOOLBOX - CPT BOX (CPTbox Manager + modules cpt-*)
   Chargé par cptbox-manager.php : admin (après apps.css si présent) et front (priorité 999, après le thème).

   Répartition (critère mesuré sur les modules) :
   - Ce fichier : styles réutilisés par au moins deux CPT (structure des pages de réglages, aides,
     titres, archives front, utilitaires) + les styles du CPTbox Manager lui-même.
   - Chaque module cpt-* : ses styles propres, dans /css/cpt/{cpt}.css, chargé par le module lui-même
     (après ce fichier), donc uniquement si ce CPT est actif — et mis en cache par le navigateur.

   Conventions :
   - Classes partagées : .jdvc-cpt-* ; propres à un CPT : .jdvc-{cpt}-{balise}{n} ; manager : .jdvc-cptbox-*
   - Classes issues d'anciens styles inline en !important (conservent la priorité de l'inline), sauf
     display / opacity / visibility / transform, animés en JS.
   - Champs et boutons : variante #wpbody pour repasser devant les surcharges d'admin.css.
   - Restent inline : valeurs dynamiques (dont celles construites par concaténation), display:none basculés
     en JS, e-mails et documents autonomes (impression des cartes fidélité, tickets d'atelier, document de
     signature, pages publiques autonomes).
   ========================================================================== */


/* ==========================================================================
   1. STYLES PARTAGÉS ENTRE CPT
   ========================================================================== */
/* Structure des pages de réglages (colonnes, carte principale, colonne d'aide) */
.jdvc-cpt-settings-cols { display: flex; gap: 24px !important; margin-top: 20px !important; flex-wrap: wrap !important; }
.jdvc-cpt-settings-main { flex: 2 !important; min-width: 450px !important; background: #fff !important; padding: 25px !important; border-radius: 8px !important; box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important; }
.jdvc-cpt-settings-side { flex: 1 !important; min-width: 320px !important; background: #f8fafc !important; padding: 25px !important; border-radius: 10px !important; border: 1px solid #e2e8f0 !important; font-family: system-ui, sans-serif !important; }
.jdvc-cpt-settings-cols-20 { display: flex; gap: 20px !important; margin-top: 20px !important; flex-wrap: wrap !important; }
.jdvc-cpt-flex-1, #wpbody .jdvc-cpt-flex-1 { flex: 1 !important; }
.jdvc-cpt-flex-full { flex: 100% !important; }
.jdvc-cpt-settings-main-300 { flex: 2 !important; min-width: 300px !important; background: #fff !important; padding: 20px !important; border-radius: 8px !important; box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important; }
.jdvc-cpt-settings-main-compact { flex: 2 !important; min-width: 450px !important; background: #fff !important; padding: 20px !important; border-radius: 8px !important; box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important; }
.jdvc-cpt-settings-side-280 { flex: 1 !important; min-width: 280px !important; background: #f9f9f9 !important; padding: 20px !important; border-radius: 8px !important; border: 1px solid #e2e8f0 !important; align-self: flex-start !important; }
.jdvc-cpt-col-300 { flex: 1 !important; min-width: 300px !important; }
.jdvc-cpt-settings-side-grey { flex: 1 !important; min-width: 320px !important; background: #f9f9f9 !important; padding: 20px !important; border-radius: 8px !important; border: 1px solid #e2e8f0 !important; }

/* Aide, manuels de shortcodes, extraits de code */
.jdvc-cpt-help-list { font-size: 13px !important; color: #334155 !important; padding-left: 20px !important; line-height: 1.6 !important; }
.jdvc-cpt-help-title { margin-top: 0 !important; color: #0f172a !important; }
.jdvc-cpt-code-inline { background: #fff !important; padding: 2px 4px !important; }
.jdvc-cpt-help-subtitle { color: #1e293b !important; margin-bottom: 5px !important; }
.jdvc-cpt-shortcode-box { display: block; padding: 8px !important; background: #fff !important; border: 1px solid #cbd5e1 !important; margin-bottom: 15px !important; border-radius: 4px !important; font-weight: bold !important; }
.jdvc-cpt-help-subtitle-alt { margin-bottom: 5px !important; color: #334155 !important; }
.jdvc-cpt-code-block { background: #edf2f7 !important; padding: 8px !important; border-radius: 4px !important; font-size: 11px !important; overflow-x: auto !important; }
.jdvc-cpt-note { color: #64748b !important; font-size: 12px !important; }
.jdvc-cpt-hint-box { font-size: 11px !important; background: #f1f5f9 !important; padding: 8px !important; border-radius: 4px !important; border-left: 3px solid #3b82f6 !important; }
.jdvc-cpt-hint-box-spaced { font-size: 11px !important; background: #f1f5f9 !important; padding: 8px !important; border-radius: 4px !important; border-left: 3px solid #3b82f6 !important; margin-bottom: 8px !important; }
.jdvc-cpt-help-intro { font-size: 13px !important; color: #475569 !important; margin-top: 0 !important; line-height: 1.4 !important; }
.jdvc-cpt-help-list-sm { padding-left: 15px !important; margin-top: 0 !important; font-size: 12px !important; color: #475569 !important; line-height: 1.5 !important; }
.jdvc-cpt-help-list-xs { padding-left: 18px !important; margin-top: 5px !important; font-size: 12px !important; color: #475569 !important; line-height: 1.4 !important; }

/* Titres de section */
.jdvc-cpt-section-title { margin-top: 0 !important; color: #1e293b !important; border-bottom: 2px solid #e2e8f0 !important; padding-bottom: 8px !important; }
.jdvc-cpt-section-title-spaced { margin-top: 20px !important; border-bottom: 1px solid #eee !important; padding-bottom: 10px !important; }
.jdvc-cpt-section-title-flush { margin-top: 0px !important; border-bottom: 1px solid #eee !important; padding-bottom: 10px !important; }
.jdvc-cpt-subheading { margin: 0 0 15px 0 !important; color: #555 !important; }

/* Archives front (gabarits de liste publique) */
.jdvc-cpt-container { max-width: 1200px !important; margin: 0 auto !important; }
.jdvc-cpt-archive-title { font-size: 36px !important; margin: 0 0 10px 0 !important; font-weight: 800 !important; }
.jdvc-cpt-archive { padding: 60px 20px !important; background: #fcfcfc !important; min-height: 600px !important; box-sizing: border-box !important; }
.jdvc-cpt-archive-alt { padding: 60px 20px !important; background: #fdfdfd !important; min-height: 600px !important; box-sizing: border-box !important; }
.jdvc-cpt-archive-head { max-width: 1200px !important; margin: 0 auto 40px auto !important; text-align: center !important; font-family: system-ui, sans-serif !important; }
.jdvc-cpt-archive-head-lg { max-width: 1200px !important; margin: 0 auto 50px auto !important; text-align: center !important; font-family: system-ui, sans-serif !important; }
.jdvc-cpt-narrow { max-width: 400px !important; margin: 40px auto !important; }

/* Utilitaires (marges, largeurs, alignements, couleurs de texte, boutons) */
.jdvc-cpt-mt-0 { margin-top: 0 !important; }
.jdvc-cpt-text-right { text-align: right !important; }
.jdvc-cpt-text-muted { color: #64748b !important; }
.jdvc-cpt-empty-italic { color: #64748b !important; font-style: italic !important; }
.jdvc-cpt-d-block { display: block; }
.jdvc-cpt-text-muted-sm { color: #64748b !important; font-size: 13px !important; }
.jdvc-cpt-text-wp-danger, #wpbody .jdvc-cpt-text-wp-danger { color: #b32d2e !important; }
.jdvc-cpt-text-warning { color: #b45309 !important; }
.jdvc-cpt-text-red, #wpbody .jdvc-cpt-text-red { color: red !important; }
.jdvc-cpt-actions-row { display: flex; gap: 10px !important; margin-top: 15px !important; flex-wrap: wrap !important; }
.jdvc-cpt-btn-split, #wpbody .jdvc-cpt-btn-split { flex: 1 !important; text-align: center !important; }
.jdvc-cpt-text-slate { font-size: 13px !important; color: #475569 !important; }
.jdvc-cpt-field-label { font-weight: bold !important; display: block; margin-bottom: 5px !important; }
.jdvc-cpt-mb-15 { margin-bottom: 15px !important; }
.jdvc-cpt-mb-25 { margin-bottom: 25px !important; }
.jdvc-cpt-mt-10, #wpbody .jdvc-cpt-mt-10 { margin-top: 10px !important; }


/* ==========================================================================
   2. CPTBOX MANAGER (page de gestion des univers et post types)
   ========================================================================== */
.jdvc-cptbox-div1 { border-left-color: #9b59b6 !important; background: #fff !important; padding: 20px !important; margin-bottom: 20px !important; box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important; font-family: sans-serif !important; }
.jdvc-cptbox-h31 { color: #9b59b6 !important; margin-top: 0 !important; margin-bottom: 15px !important; }
.jdvc-cptbox-div2 { background: #fdfbfd !important; padding: 15px !important; border: 1px solid #ebdcf2 !important; border-radius: 6px !important; margin-bottom: 25px !important; }
.jdvc-cptbox-h41 { margin: 0 0 12px 0 !important; color: #7d3c98 !important; display: flex; align-items: center !important; gap: 8px !important; }
.jdvc-cptbox-p1 { font-size: 12px !important; color: #666 !important; margin: 0 0 15px 0 !important; }
.jdvc-cptbox-p2 { font-size: 12px !important; color: #999 !important; font-style: italic !important; margin: 0 !important; }
.jdvc-cptbox-div3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 15px !important; }
.jdvc-cptbox-div4 { display: grid; grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
.jdvc-cptbox-div5 { background: #fafafa !important; padding: 15px !important; border: 1px solid #e5e5e5 !important; border-radius: 6px !important; }
.jdvc-cptbox-h51 { margin: 0 0 10px 0 !important; font-size: 13px !important; color: #444 !important; }
.jdvc-cptbox-table1, #wpbody .jdvc-cptbox-table1 { margin-bottom: 0 !important; box-shadow: none !important; border: 1px solid #e5e5e5 !important; }
.jdvc-cptbox-td1 { font-size: 12px !important; color: #999 !important; font-style: italic !important; }
.jdvc-cptbox-details1 { border-top: 1px solid #eee !important; padding-top: 15px !important; margin-top: 20px !important; }
.jdvc-cptbox-summary1 { font-weight: 600 !important; color: #0073aa !important; font-size: 13px !important; cursor: pointer !important; outline: none !important; user-select: none !important; }
.jdvc-cptbox-div6 { display: grid; grid-template-columns: 1fr 1fr !important; gap: 20px !important; margin-top: 15px !important; }
.jdvc-cptbox-div7 { background: #fff !important; padding: 15px !important; border: 1px solid #ddd !important; border-radius: 6px !important; box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important; }
.jdvc-cptbox-h52 { margin: 0 0 10px 0 !important; font-size: 12px !important; color: #333 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; }
.jdvc-cptbox-input1, #wpbody .jdvc-cptbox-input1 { width: 100% !important; margin-bottom: 5px !important; height: 28px !important; font-size: 12px !important; }
.jdvc-cptbox-input2, #wpbody .jdvc-cptbox-input2 { width: 100% !important; margin-bottom: 10px !important; height: 28px !important; font-size: 12px !important; }
.jdvc-cptbox-div8 { display: grid; grid-template-columns: 1fr !important; gap: 4px !important; margin-top: 8px !important; }
.jdvc-cptbox-label1 { font-size: 10px !important; color: #666 !important; font-weight: bold !important; }
.jdvc-cptbox-label2 { font-size: 10px !important; color: #666 !important; }
.jdvc-cptbox-label3 { font-size: 11px !important; display: block; margin-bottom: 3px !important; color: #666 !important; }
.jdvc-cptbox-div9 { max-height: 65px !important; overflow-y: auto !important; background: #fff !important; padding: 4px !important; border: 1px solid #ddd !important; margin-bottom: 10px !important; font-size: 11px !important; }
.jdvc-cptbox-label4 { display: block; font-weight: normal !important; margin-bottom: 2px !important; }
