/* ── Réservation de salle — calendrier + modales (front & admin) ── */

.cpme-resa { max-width: 1180px; margin: 18px auto 40px; padding: 0 16px; }
.cpme-resa-head { margin-bottom: 18px; }
.cpme-resa-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #A81815; font-weight: 700; }
.cpme-resa-eyebrow strong { color: #1f8a54; }
.cpme-resa-title { margin: 8px 0 6px; font-size: clamp(24px, 3.4vw, 34px); color: #0d3a48; font-weight: 800; letter-spacing: -.015em; }
.cpme-resa-sub { margin: 0 0 16px; color: #5b7079; font-size: 14.5px; line-height: 1.6; max-width: 760px; }

.cpme-resa-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 16px; }
.cpme-resa-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #0d3a48; }
.cpme-resa-chip em { font-style: normal; font-weight: 500; color: #7f97a0; font-size: 12.5px; }
.cpme-resa-chip--busy { color: #7f97a0; font-weight: 600; }
.cpme-resa-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }

.cpme-resa-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cpme-resa-filter { display: inline-flex; flex-wrap: wrap; gap: 6px; background: #eef3f4; border-radius: 11px; padding: 4px; }
.cpme-resa-fbtn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #41575f; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 8px; cursor: pointer; transition: background .14s, color .14s; }
.cpme-resa-fbtn:hover { color: #0d3a48; }
.cpme-resa-fbtn.is-active { background: #fff; color: #0d3a48; box-shadow: 0 2px 8px rgba(13, 58, 72, .12); }
.cpme-resa-actions { display: inline-flex; gap: 10px; flex-wrap: wrap; }

.cpme-resa-btn { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 10px; padding: 11px 20px; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; transition: filter .15s, background .15s, color .15s; line-height: 1; }
.cpme-resa-btn .dashicons { font-size: 17px; width: 17px; height: 17px; }
.cpme-resa-btn--primary { background: #A81815; color: #fff; }
.cpme-resa-btn--primary:hover { filter: brightness(1.08); color: #fff; }
.cpme-resa-btn--ghost { background: #eef3f4; color: #41575f; }
.cpme-resa-btn--ghost:hover { background: #e2ecee; color: #0d3a48; }
.cpme-resa-btn--danger { background: #fbeceb; color: #A81815; }
.cpme-resa-btn--danger:hover { background: #f6dedc; }
.cpme-resa-btn[disabled] { opacity: .55; cursor: default; }
/* L'attribut [hidden] doit primer sur les règles display des composants (spécificité 0,2,0). */
.cpme-resa-btn[hidden], .cpme-resa-export[hidden], .cpme-resa-invitees[hidden] { display: none; }

/* ── Calendrier ── */
.cpme-resa-cal {
  --fc-border-color: #e6eeef;
  --fc-button-bg-color: #114D61; --fc-button-border-color: #114D61;
  --fc-button-hover-bg-color: #0d3a48; --fc-button-hover-border-color: #0d3a48;
  --fc-button-active-bg-color: #0d3a48; --fc-button-active-border-color: #0d3a48;
  --fc-today-bg-color: rgba(17, 77, 97, .06);
  --fc-now-indicator-color: #A81815;
  --fc-page-bg-color: #fff;
  background: #fff; border: 1px solid #e6eeef; border-radius: 16px; padding: 14px 16px 16px;
  box-shadow: 0 12px 34px rgba(13, 58, 72, .07);
}
.cpme-resa-cal .fc { font-family: inherit; font-size: 13.5px; }
.cpme-resa-cal .fc .fc-toolbar-title { font-size: 18px; font-weight: 800; color: #0d3a48; text-transform: capitalize; }
.cpme-resa-cal .fc .fc-button { font-weight: 700; font-size: 12.5px; text-transform: capitalize; padding: 7px 12px; box-shadow: none; }
.cpme-resa-cal .fc .fc-button-primary:focus { box-shadow: 0 0 0 3px rgba(17, 77, 97, .2); }
.cpme-resa-cal .fc .fc-col-header-cell-cushion { color: #41575f; font-weight: 700; text-decoration: none; padding: 8px 4px; }
.cpme-resa-cal .fc .fc-daygrid-day-number, .cpme-resa-cal .fc .fc-timegrid-slot-label-cushion { color: #7f97a0; text-decoration: none; }
.cpme-resa-cal .fc-event { border: none; border-radius: 6px; padding: 1px 2px; font-weight: 600; cursor: pointer; }
.cpme-resa-cal .fc-event.cpme-ev--busy { cursor: not-allowed; opacity: .92; background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .18) 0 6px, transparent 6px 12px); }
.cpme-resa-cal .fc-event.cpme-ev--mine { box-shadow: 0 2px 8px rgba(13, 58, 72, .2); }
.cpme-resa-cal .fc .fc-highlight { background: rgba(168, 24, 21, .12); }
.cpme-resa-cal--admin { margin-top: 12px; }

/* ── Modales ── */
.cpme-resa-noscroll { overflow: hidden; }
.cpme-resa-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cpme-resa-modal[hidden] { display: none; }
.cpme-resa-modal-backdrop { position: absolute; inset: 0; background: rgba(13, 40, 51, .55); backdrop-filter: blur(2px); }
.cpme-resa-modal-panel { position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; padding: 30px 30px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: cpmeResaPop .2s ease; }
.cpme-resa-modal-panel--sm { max-width: 460px; }
@keyframes cpmeResaPop { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.cpme-resa-modal-x { position: absolute; top: 14px; right: 16px; background: transparent; border: 0; font-size: 26px; line-height: 1; color: #93a7ae; cursor: pointer; }
.cpme-resa-modal-x:hover { color: #0d3a48; }
.cpme-resa-modal-title { margin: 0 0 18px; font-size: 20px; font-weight: 800; color: #0d3a48; }

.cpme-resa-field { margin-bottom: 14px; }
.cpme-resa-field > label { display: block; font-size: 12px; font-weight: 700; color: #114D61; margin: 0 0 5px; }
.cpme-resa-field .req { color: #A81815; }
.cpme-resa-field input, .cpme-resa-field textarea { width: 100%; border: 1px solid #d8e2e5; border-radius: 9px; padding: 11px 13px; font-size: 14px; font-family: inherit; color: #0e2a33; box-sizing: border-box; background: #fff; transition: border-color .15s, box-shadow .15s; }
.cpme-resa-field input:focus, .cpme-resa-field textarea:focus { outline: 0; border-color: #114D61; box-shadow: 0 0 0 3px rgba(17, 77, 97, .12); }
.cpme-resa-field textarea { resize: vertical; min-height: 46px; }
.cpme-resa-hint { margin: 6px 0 0; font-size: 12px; color: #7f97a0; line-height: 1.45; }
.cpme-resa-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.cpme-resa-row .cpme-resa-field { margin-bottom: 14px; }
.cpme-resa-field--grow { grid-column: span 2; }
.cpme-resa-field--nb { }

.cpme-resa-salleseg { display: flex; gap: 8px; flex-wrap: wrap; }
.cpme-resa-segbtn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid #dce6e9; background: #fbfdfd; color: #0e2a33; font-size: 13.5px; font-weight: 700; padding: 10px 16px; border-radius: 10px; cursor: pointer; transition: all .14s; }
.cpme-resa-segbtn:hover { border-color: #8fb4c0; }
.cpme-resa-segbtn.is-active { border-color: #114D61; background: #eef6f9; box-shadow: 0 4px 12px rgba(17, 77, 97, .16); }

.cpme-resa-invitees { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cpme-resa-invitees:empty { display: none; }
.cpme-resa-chip-email { display: inline-flex; align-items: center; gap: 6px; background: #eef3f4; color: #0d3a48; font-size: 12.5px; font-weight: 600; padding: 5px 6px 5px 11px; border-radius: 20px; }
.cpme-resa-chip-email button { border: 0; background: #d6e2e5; color: #41575f; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; }
.cpme-resa-chip-email button:hover { background: #A81815; color: #fff; }
.cpme-resa-invite-add { display: flex; gap: 8px; }
.cpme-resa-invite-add input { flex: 1; }

.cpme-resa-flash { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; min-height: 18px; }
.cpme-resa-flash.ok { color: #1f8a54; }
.cpme-resa-flash.err { color: #A81815; }

.cpme-resa-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.cpme-resa-foot-right { display: inline-flex; gap: 10px; margin-left: auto; }

.cpme-resa-export { margin-top: 16px; padding-top: 16px; border-top: 1px solid #eef3f4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cpme-resa-export-lbl { font-size: 12.5px; font-weight: 700; color: #114D61; }
.cpme-resa-xbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dce6e9; border-radius: 8px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; color: #0d3a48; text-decoration: none; background: #fbfdfd; }
.cpme-resa-xbtn:hover { border-color: #114D61; background: #eef6f9; color: #0d3a48; }

.cpme-resa-suboptions { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 18px; }
.cpme-resa-suboptions .cpme-resa-btn { justify-content: flex-start; }
.cpme-resa-sublbl { display: block; font-size: 12px; font-weight: 700; color: #114D61; margin: 0 0 6px; }
.cpme-resa-copyrow { display: flex; gap: 8px; }
.cpme-resa-copyrow input { flex: 1; border: 1px solid #d8e2e5; border-radius: 9px; padding: 10px 12px; font-size: 12.5px; color: #41575f; background: #f6f9fa; }

/* ── Admin ── */
.cpme-salle-admin-intro { color: #50646c; max-width: 720px; }
.cpme-salle-admin-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 12px 0; }
.cpme-salle-admin-feed { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #50646c; }
.cpme-salle-admin-filter { display: inline-flex; gap: 6px; background: #eef3f4; border-radius: 11px; padding: 4px; margin: 6px 0 4px; }
.cpme-admin-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 6px 0 0; }
.cpme-admin-dl dt { font-weight: 700; color: #114D61; font-size: 12.5px; }
.cpme-admin-dl dd { margin: 0; color: #0e2a33; font-size: 13.5px; }
.cpme-salle-admin-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cpme-salle-add.button { display: inline-flex !important; align-items: center; gap: 4px; }
.cpme-salle-admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 6px; }
.cpme-salle-admin-notify { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #50646c; cursor: pointer; }
.cpme-salle-admin-notify input { accent-color: #A81815; }
.cpme-adm-ac { position: relative; }
.cpme-adm-ac-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid #d8e2e5; border-top: 0; border-radius: 0 0 9px 9px; box-shadow: 0 12px 28px rgba(13, 58, 72, .14); max-height: 220px; overflow-y: auto; }
.cpme-adm-ac-item { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 9px 13px; font-size: 13px; color: #0d3a48; cursor: pointer; font-family: inherit; }
.cpme-adm-ac-item:hover { background: #eef6f9; }
.cpme-adm-notifyline { display: flex; align-items: center; gap: 9px; margin: 10px 0 2px; padding: 12px 14px; background: #f6f9fa; border: 1px solid #e2ecee; border-radius: 10px; font-size: 13.5px; color: #2b4048; cursor: pointer; line-height: 1.4; }
.cpme-adm-notifyline input { width: 17px; height: 17px; accent-color: #A81815; flex: 0 0 auto; }
.cpme-adm-foot-left { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ── Panneau config salles & indisponibilités ── */
.cpme-salle-cfg { margin: 10px 0 14px; border: 1px solid #e2ecee; border-radius: 12px; background: #fff; }
.cpme-salle-cfg > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: #0d3a48; list-style: none; display: flex; align-items: center; gap: 8px; }
.cpme-salle-cfg > summary::-webkit-details-marker { display: none; }
.cpme-salle-cfg[open] > summary { border-bottom: 1px solid #eef3f4; }
.cpme-salle-cfg-body { padding: 16px 18px; }
.cpme-salle-cfg-body h3 { margin: 0 0 4px; color: #0d3a48; font-size: 15px; }
.cpme-cfg-hint { margin: 0 0 12px; font-size: 12.5px; color: #7f97a0; line-height: 1.5; max-width: 840px; }
.cpme-cfg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; border: 1px solid #eef3f4; border-radius: 9px; margin-bottom: 8px; background: #fbfdfd; }
.cpme-cfg-srow .cfg-name, .cpme-cfg-srow .cfg-short { flex: 1 1 170px; }
.cpme-cfg-row input[type=text], .cpme-cfg-row input[type=date], .cpme-cfg-row input[type=number], .cpme-cfg-row select { border: 1px solid #d8e2e5; border-radius: 7px; padding: 8px 10px; font-size: 13px; font-family: inherit; color: #0e2a33; box-sizing: border-box; background: #fff; }
.cpme-cfg-row .cfg-cap { width: 92px; }
.cpme-cfg-row input[type=color] { width: 40px; height: 34px; border: 1px solid #d8e2e5; border-radius: 7px; padding: 2px; background: #fff; cursor: pointer; }
.cfg-active { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #41575f; white-space: nowrap; }
.cfg-count { font-size: 11px; font-weight: 700; color: #7f97a0; background: #eef3f4; border-radius: 20px; padding: 3px 9px; white-space: nowrap; }
.cpme-cfg-brow .cfg-breason { flex: 1 1 200px; }
.cfg-del { margin-left: auto; border: 0; background: #fbeceb; color: #A81815; width: 30px; height: 30px; border-radius: 7px; font-size: 17px; cursor: pointer; line-height: 1; flex: 0 0 auto; }
.cfg-del:hover { background: #f6dedc; }
.cpme-cfg-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.fc-event.cpme-blackout { background: repeating-linear-gradient(45deg, #f0d4d2, #f0d4d2 7px, #f8e7e6 7px, #f8e7e6 14px) !important; opacity: .5; border: 0 !important; }

@media (max-width: 640px) {
  .cpme-resa-row { grid-template-columns: 1fr 1fr; }
  .cpme-resa-field--grow { grid-column: span 2; }
  .cpme-resa-modal-panel { padding: 24px 18px; }
  .cpme-resa-toolbar { flex-direction: column; align-items: stretch; }
  .cpme-resa-actions { justify-content: stretch; }
  .cpme-resa-actions .cpme-resa-btn { flex: 1; justify-content: center; }
}
