/* ===================================================
   CEREMONY REPORT — MISSION ROW
   Modern style: dark blue bg, grey-silver accents,
   Montserrat + Poppins fonts, 1920x1080 landscape
   =================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    background: #111;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 1.5rem;
}

/* ---------- UI Header ---------- */
.page-header { text-align: center; margin-bottom: 1.5rem; }
.page-header h1 { font-family: 'Montserrat', sans-serif; font-size: 1.3rem; font-weight: 700; color: #b0b8c0; }
.page-header .subtitle { color: #888; margin-top: 0.15rem; font-size: 0.82rem; }

/* ---------- Layout ---------- */
.layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 1600px;
    margin: 0 auto;
}

/* ---------- Editor ---------- */
#editor-panel {
    flex: 0 0 420px;
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    background: #1a1a2a;
    border-radius: 8px;
    padding: 1.4rem;
    border: 1px solid #2a2a3a;
}
#editor-panel::-webkit-scrollbar { width: 4px; }
#editor-panel::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.form-group { margin-bottom: 0.9rem; }
.form-group > label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: #b0b8c0;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #2a2a3a;
    border-radius: 5px;
    background: #12121f;
    color: #ddd;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    resize: vertical;
}
.form-group select { cursor: pointer; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: #b0b8c0; }

/* ---------- Group header (label + add button) ---------- */
.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}
.group-header label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #b0b8c0;
}

/* ---------- + Button ---------- */
.btn-add {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: #b0b8c0;
    color: #111;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.btn-add:hover { background: #c8cfd6; }

/* ---------- Dynamic list ---------- */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Single entry row */
.entry-row {
    display: flex;
    gap: 5px;
    align-items: center;
    background: #12121f;
    border: 1px solid #2a2a3a;
    border-radius: 5px;
    padding: 5px 6px;
}
.entry-row select,
.entry-row input {
    border: 1px solid #2a2a3a;
    border-radius: 4px;
    background: #1a1a2a;
    color: #ddd;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    padding: 0.35rem 0.45rem;
}
.entry-row select { cursor: pointer; min-width: 0; }
.entry-row input { min-width: 0; }
.entry-row select:focus,
.entry-row input:focus { outline: none; border-color: #b0b8c0; }

/* Flex proportions inside entry rows */
.entry-row .field-grade { flex: 1.2; }
.entry-row .field-division { flex: 1.2; }
.entry-row .field-matricule { flex: 0 0 50px; text-align: center; }
.entry-row .field-name { flex: 2; }
.entry-row .field-stripes { flex: 1.2; }

/* Delete button */
.btn-remove {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #3a2030;
    color: #e06070;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.btn-remove:hover { background: #5a2040; }

/* ---------- Buttons ---------- */
.btn-row { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.btn {
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary { background: #b0b8c0; color: #111; }
.btn-primary:hover { background: #c8cfd6; }
.btn-secondary { background: #2a2a3a; color: #888; }
.btn-secondary:hover { background: #3a3a4a; color: #bbb; }

/* ---------- Preview ---------- */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;700&display=swap');

.ui-panel {
    width: 1050px;
    height: 520px;
    background: linear-gradient(180deg, #0f2147 0%, #050a16 100%);
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

/* HEADER */
.lspd-header {
    height: 55px;
    display: flex;
    margin-top: 30px;
    margin-right: 75px;
    margin-left: 0;
    background-color: transparent;
    position: relative;
    z-index: 5;
}

.header-black-part {
    background-color: #464a55;
    display: flex;
    align-items: center;
    flex-grow: 1;
    padding-left: 10px;
    clip-path: polygon(0% 0%, 100% 0%, calc(100% - 25px) 100%, 0% 100%);
    margin-right: -25px;
    position: relative;
}

.logo-overflow {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 75px;
    width: auto;
    z-index: 100;
}

.title-text {
    color: #fff;
    font-size: 20px;
    letter-spacing: 1px;
    margin-left: 100px;
}

.summary-box {
    background: #fff;
    color: #141d26;
    padding: 0 50px;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 19px;
    clip-path: polygon(25px 0%, 100% 0%, calc(100% - 25px) 100%, 0% 100%);
}

/* GRILLE */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    flex-grow: 1;
    padding: 30px 20px 20px 20px;
}

.col {
    padding: 0 15px;
    position: relative;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.bottom-section {
    margin-top: 15px;
}

.v-divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5%;
    height: 90%;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
}

h2 {
    font-size: 18px;
    border-bottom: 2px solid #6db5d8;
    margin-bottom: 15px;
    padding-bottom: 5px;
    letter-spacing: 1px;
}

h3 {
    font-size: 15px;
    color: #6db5d8;
    margin-bottom: 10px;
    margin-top: 10px;
    letter-spacing: 1px;
    text-align: center;
}

/* =========================
   ITEMS — STYLE UNIFIÉ CEREMONY
   ========================= */

.item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* PROMOTIONS / ARRIVÉES / DÉPARTS / CONVOCATIONS */
.item.status {
    justify-content: space-between;
}

/* Bloc central (nom + grade) */
.names {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* NOM */
.main-n {
    font-size: 13px;          /* ↓ réduit pour tenir en 1080p */
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* GRADE / INFO */
.sub-n {
    font-size: 9px;
    color: #adb5bd;
    letter-spacing: 0.4px;
}

/* Lignes simples (arrivées / stripes / convocations) */
.center-name {
    flex: 1;
    text-align: center;
    font-size: 12.5px;
    letter-spacing: 0.4px;
}


/* =========================
   SERVICE STRIPES — même style que départs
   ========================= */

.stripes {
    display: none; /* on cache les ///// old school */
}


/* =========================
   DOTS CEREMONIAL STYLE
   ========================= */

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.g-full {
    background: #34c759;
    box-shadow: 0 0 4px rgba(52,199,89,0.6);
}

.r-full {
    background: #ff3b30;
    box-shadow: 0 0 4px rgba(255,59,48,0.6);
}

.star { display: none; } /* on retire les étoiles */
.stars-right { display: none; }


/* LISTS (Rappels) */
.list { list-style: none; padding-left: 15px; margin: 0; }
.list li { font-size: 11px; color: #cbd5e0; margin-bottom: 8px; position: relative; }
.list li::before { content: "•"; position: absolute; left: -12px; color: #6db5d8; }

/* CONVOCATIONS */
.convocation .icon { font-size: 18px; margin-right: 10px; opacity: 0.8; }



.stripe-item {
    display: flex;
    align-items: center;
    justify-content: space-between; /* space-between peut casser html2canvas */
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12.5px;
}

.stripe-name {
    font-weight: normal;
}

.stripe-slashes {
    font-weight: bold;
    color: #fff; /* s'assurer que html2canvas prend bien la couleur */
}





/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1400px) { #document { transform: scale(0.45); } }
@media (max-width: 1100px) {
    .layout { flex-direction: column; align-items: center; }
    #editor-panel {
        flex: none; width: 100%; max-width: 500px;
        position: static; max-height: none; overflow-y: visible;
        margin-bottom: 1.5rem;
    }
    #preview-panel { width: 100%; overflow-x: auto; }
    #document { transform: scale(0.38); }
}
@media (max-width: 700px) { #document { transform: scale(0.25); } }
