/* =====================================================
   ONI CALENDAR — Réservations membres (front)
   Charte : fonds #0d1a26 / texte #f2e4c9 / or #ffbe7a
===================================================== */

/* ---- Bouton d'ouverture ---- */
.co-member-cta {
    display: flex;
    justify-content: flex-end;
    padding: 0 4px 14px;
}
.ocm-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--co-font-body, 'Inter', sans-serif);
    font-size: .95rem;
    font-weight: 600;
    color: var(--co-btn-text, #152635);
    background: var(--co-btn-bg, #f2e4c9);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.ocm-add-btn:hover {
    background: var(--co-btn-hover, #ffbe7a);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,.32);
}
.ocm-add-btn .iconify { font-size: 1.2em; }

/* ---- Overlay & modale ---- */
.ocm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 12, 18, .78);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
    animation: ocmFade .18s ease;
}
@keyframes ocmFade { from { opacity: 0; } to { opacity: 1; } }

.ocm-modal {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: linear-gradient(180deg, #0d2633 0%, #0a131c 100%);
    border: 1px solid rgba(255, 190, 122, .28);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
    padding: 28px 30px 30px;
    color: var(--co-cream, #f2e4c9);
    font-family: var(--co-font-body, 'Inter', sans-serif);
    animation: ocmSlide .22s ease;
}
@keyframes ocmSlide { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.ocm-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(242, 228, 201, .08);
    color: var(--co-cream, #f2e4c9);
    font-size: 22px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.ocm-close:hover { background: rgba(224, 82, 82, .85); color: #fff; }

.ocm-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 190, 122, .18);
}
.ocm-head-ic { font-size: 30px; color: var(--co-gold, #ffbe7a); }
.ocm-head h3 {
    margin: 0;
    font-family: var(--co-font-title, 'Marcellus SC'), serif;
    font-size: 1.5rem;
    color: var(--co-gold, #ffbe7a);
    font-weight: 400;
    letter-spacing: .5px;
}

.ocm-intro { margin: 0 0 18px; font-size: .95rem; line-height: 1.5; color: #cbbfa2; }

/* ---- Champs ---- */
.ocm-field { margin-bottom: 16px; }
.ocm-field > label {
    display: block;
    margin-bottom: 6px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .3px;
    color: #cbbfa2;
    text-transform: uppercase;
}
.ocm-req { color: var(--co-gold, #ffbe7a); }

.ocm-field input[type="text"],
.ocm-field input[type="date"],
.ocm-field input[type="time"],
.ocm-field textarea {
    width: 100%;
    padding: 11px 13px;
    background: rgba(242, 228, 201, .06);
    border: 1px solid rgba(255, 190, 122, .22);
    border-radius: 9px;
    color: var(--co-cream, #f2e4c9);
    font-family: inherit;
    font-size: .95rem;
    transition: border-color .15s ease, background .15s ease;
    box-sizing: border-box;
}
.ocm-field input:focus,
.ocm-field textarea:focus {
    outline: none;
    border-color: var(--co-gold, #ffbe7a);
    background: rgba(242, 228, 201, .1);
}
.ocm-field input::placeholder,
.ocm-field textarea::placeholder { color: rgba(203, 191, 162, .5); }
.ocm-field textarea { resize: vertical; min-height: 70px; }

/* champ code : gros et centré */
#ocm-code {
    text-align: center;
    font-size: 1.3rem;
    letter-spacing: 3px;
    font-weight: 600;
    text-transform: uppercase;
    font-family: var(--co-font-title, 'Marcellus SC'), serif;
}

.ocm-row { display: flex; gap: 14px; }
.ocm-row .ocm-field { flex: 1; }
.ocm-time { margin-top: 8px; }

/* Grille du formulaire (2 colonnes, responsive) */
.ocm-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px 12px; align-items:start; }
.ocm-grid .ocm-field { margin-bottom:0; }
.ocm-col-full { grid-column:1 / -1; }

/* Typo réduite dans tout le formulaire pour gagner de la place */
#ocm-step-form .ocm-field > label { font-size:.7rem; margin-bottom:4px; }
#ocm-step-form input[type="text"],
#ocm-step-form input[type="date"],
#ocm-step-form input[type="time"],
#ocm-step-form input[type="number"],
#ocm-step-form textarea,
#ocm-step-form select {
    padding:8px 11px;
    font-size:.86rem;
    border-radius:8px;
}
#ocm-step-form .ocm-zone { padding:6px 11px; font-size:.8rem; }
#ocm-step-form .ocm-time { margin-top:6px; }

/* Select & nombre : même hauteur/rendu que les inputs */
.ocm-field select {
    width:100%;
    background:rgba(242,228,201,.06);
    border:1px solid rgba(255,190,122,.22);
    color:var(--co-cream,#f2e4c9);
    font-family:inherit;
    cursor:pointer;
    -webkit-appearance:none; appearance:none;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffbe7a' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat:no-repeat;
    background-position:right 11px center;
    padding-right:30px;
}
.ocm-field select:focus { outline:none;border-color:var(--co-gold,#ffbe7a); }
.ocm-field select option { background:#0d2633;color:var(--co-cream,#f2e4c9); }
.ocm-field input[type="number"] { width:100%; }

/* Champ couleur aligné proprement à côté de l'icône */
.ocm-field-color { align-self:stretch; display:flex; flex-direction:column; max-width:none; flex:1 1 auto; }
.ocm-field-color #ocm-color { flex:1; min-height:38px; width:100%; }

@media (max-width:520px){
    .ocm-grid { grid-template-columns:1fr; }
}

/* ---- Picker icône + couleur ---- */
.ocm-icon-picker { display: flex; align-items: center; gap: 10px; }
.ocm-icon-preview-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: rgba(242, 228, 201, .06);
    border: 1px solid rgba(255, 190, 122, .22);
    border-radius: 9px;
}
#ocm-icon-preview { font-size: 24px; color: var(--co-gold, #ffbe7a); }
.ocm-icon-picker input { flex: 1; }
.ocm-hint { margin: 6px 0 0; font-size: .76rem; color: rgba(203, 191, 162, .7); }
.ocm-hint a { color: var(--co-gold, #ffbe7a); }

.ocm-field-color { max-width: 90px; flex: 0 0 auto !important; }
#ocm-color {
    width: 100%;
    height: 46px;
    padding: 4px;
    background: rgba(242, 228, 201, .06);
    border: 1px solid rgba(255, 190, 122, .22);
    border-radius: 9px;
    cursor: pointer;
}

.ocm-check {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    text-transform: none !important;
    font-weight: 500 !important;
    color: var(--co-cream, #f2e4c9) !important;
    cursor: pointer;
}
.ocm-check input { width: auto !important; }

/* ---- Sélecteur de zones ---- */
.ocm-zones { display: flex; flex-wrap: wrap; gap: 8px; }
.ocm-zone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border: 1.5px solid rgba(255, 190, 122, .22);
    border-radius: 50px;
    background: rgba(242, 228, 201, .04);
    cursor: pointer;
    font-size: .88rem;
    color: #cbbfa2;
    transition: all .15s ease;
    user-select: none;
}
.ocm-zone .iconify { font-size: 1.1em; }
.ocm-zone:hover { border-color: var(--zone-color, #ffbe7a); color: var(--co-cream, #f2e4c9); }
.ocm-zone.active {
    border-color: var(--zone-color, #ffbe7a);
    background: color-mix(in srgb, var(--zone-color, #ffbe7a) 18%, transparent);
    color: #fff;
    box-shadow: 0 0 0 1px var(--zone-color, #ffbe7a) inset;
}

/* ---- Messages ---- */
.ocm-msg { margin: 4px 0 14px; font-size: .9rem; line-height: 1.45; display: none; }
.ocm-msg.show { display: block; }
.ocm-msg.error {
    color: #ffb4b4;
    background: rgba(224, 82, 82, .12);
    border: 1px solid rgba(224, 82, 82, .35);
    border-radius: 9px;
    padding: 11px 13px;
}
.ocm-msg.error ul { margin: 8px 0 0; padding-left: 4px; list-style: none; }
.ocm-msg.error li { margin: 3px 0; }
.ocm-msg.success {
    color: #b8e6bb;
    background: rgba(46, 125, 50, .14);
    border: 1px solid rgba(46, 125, 50, .4);
    border-radius: 9px;
    padding: 11px 13px;
}

.ocm-code-ok {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 9px 13px;
    background: rgba(46, 125, 50, .14);
    border: 1px solid rgba(46, 125, 50, .35);
    border-radius: 9px;
    font-size: .88rem;
    color: #b8e6bb;
}

/* ---- Boutons ---- */
.ocm-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.ocm-btn {
    padding: 11px 22px;
    border: none;
    border-radius: 50px;
    font-family: var(--co-font-body, 'Inter', sans-serif);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .16s ease;
}
.ocm-btn-primary {
    background: var(--co-btn-bg, #f2e4c9);
    color: var(--co-btn-text, #152635);
    width: 100%;
}
.ocm-actions .ocm-btn-primary { width: auto; flex: 1; }
.ocm-btn-primary:hover { background: var(--co-btn-hover, #ffbe7a); }
.ocm-btn-primary:disabled { opacity: .55; cursor: wait; }
.ocm-btn-ghost {
    background: transparent;
    color: #cbbfa2;
    border: 1px solid rgba(255, 190, 122, .3);
}
.ocm-btn-ghost:hover { color: var(--co-cream, #f2e4c9); border-color: var(--co-gold, #ffbe7a); }

/* ---- Confirmation ---- */
.ocm-done { text-align: center; padding: 20px 10px; }
.ocm-done-ic { font-size: 60px; color: #4caf6a; }
.ocm-done p { margin: 16px 0 22px; font-size: 1.02rem; line-height: 1.55; color: var(--co-cream, #f2e4c9); }

/* ---- Icônes de zone dans les cases du calendrier ---- */
.co-day-zones {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 3px;
    z-index: 2;
}
.co-zone-chip {
    font-size: 15px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

/* ---- Badges liste ---- */
.co-event-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.co-event-zone-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    font-size: .72rem;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid;
    line-height: 1.5;
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
    .ocm-modal { padding: 24px 20px 26px; }
    .ocm-row { flex-direction: column; gap: 0; }
    .ocm-head h3 { font-size: 1.3rem; }
}
