/* ==========================================================================
   FECIS OFFICIAL DOCUMENTS STYLESHEET
   Charte de couleur alignée sur le Logo FECIS :
   - Bleu Royal Institutionnel : #1E3A8A / #2563EB
   - Bleu Sombre / Nuit        : #0F172A
   - Accent Doré               : #D97706
   - Bordures & Surfaces       : #E2E8F0 / #F8FAFC
   ========================================================================== */

@page {
    size: A4 portrait;
    margin: 20mm;
}

body.doc-body {
    font-family: 'Times New Roman', Times, serif;
    color: #0F172A;
    background-color: #FFFFFF;
    margin: 0;
    padding: 30px;
    font-size: 13px;
    line-height: 1.6;
}

/* Bandeau d'action navigateur (masqué à l'impression) */
.no-print {
    font-family: Arial, sans-serif;
    background-color: #EFF6FF;
    border: 1px solid #BFDBFE;
    padding: 12px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-print {
    background-color: #1E3A8A;
    color: #FFFFFF;
    border: none;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.btn-print:hover {
    background-color: #2563EB;
}

/* En-tête consulaire République du Cameroun */
.republic-header {
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
    border-bottom: 1px solid #000000;
    padding-bottom: 12px;
}

.republic-institution {
    font-weight: bold;
    margin: 4px 0;
}

/* Métadonnées & Direction */
.fecis-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.dest-box {
    margin-left: auto;
    width: 50%;
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.title-subject {
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 15px;
    font-size: 14px;
}

.content-body {
    text-align: justify;
}

.content-body p {
    margin-bottom: 14px;
}

/* Bloc de signatures & sceau */
.signature-block {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    page-break-inside: avoid;
}

.seal-box {
    border: 2px dashed #D97706;
    color: #D97706;
    padding: 15px;
    width: 140px;
    height: 80px;
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.signer-block {
    text-align: right;
    width: 250px;
}

.signer-name {
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: #1E3A8A;
    font-weight: bold;
}

.footer-note {
    margin-top: 50px;
    border-top: 1px solid #CBD5E1;
    padding-top: 10px;
    font-size: 10px;
    color: #64748B;
    text-align: center;
    font-family: Arial, sans-serif;
}

/* En-tête générique document / devis */
.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #1E3A8A;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.doc-title {
    font-size: 20px;
    font-weight: bold;
    color: #1E3A8A;
    margin: 0;
}

.doc-subtitle {
    font-size: 12px;
    color: #D97706;
    font-weight: bold;
    margin-top: 4px;
}

.doc-tutelle {
    font-size: 11px;
    color: #64748B;
    margin-top: 4px;
}

.doc-meta-right {
    text-align: right;
    font-size: 11px;
    color: #475569;
}

/* Grille d'information émetteur / destinataire */
.doc-grid-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.doc-info-card {
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 12px;
}

.doc-info-card h4 {
    margin: 0 0 8px 0;
    color: #1E3A8A;
    font-size: 12px;
    text-transform: uppercase;
}

/* Tableaux de données officiels */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 12px;
}

.doc-table th {
    background-color: #1E3A8A;
    color: #FFFFFF;
    padding: 10px 14px;
    font-weight: bold;
}

.doc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #E2E8F0;
}

.doc-table tbody tr:nth-child(even) {
    background-color: #F8FAFC;
}

/* Alignements colonnes tableaux */
.col-desc {
    width: 60%;
    text-align: left;
}

.col-qty {
    width: 10%;
    text-align: center;
}

.col-price {
    width: 15%;
    text-align: right;
}

.col-total {
    width: 15%;
    text-align: right;
}

.col-time {
    width: 120px;
    font-weight: bold;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: bold;
}

.color-primary {
    color: #1E3A8A;
}

.color-muted {
    color: #64748B;
}

/* Lignes de totalisation */
.doc-total-sub {
    text-align: right;
    font-weight: bold;
}

.doc-total-highlight {
    background-color: #EFF6FF;
    border-top: 2px solid #1E3A8A;
}

.doc-total-price {
    text-align: right;
    font-weight: bold;
    font-size: 13px;
    color: #1E3A8A;
}

/* Encadré modalité de paiement */
.doc-payment-box {
    background-color: #FEF3C7;
    border: 1px solid #FCD34D;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 30px;
    font-size: 11px;
}

/* Signatures pour devis */
.doc-signature-section {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    page-break-inside: avoid;
}

.doc-sig-box {
    width: 220px;
    border-top: 1px solid #000000;
    padding-top: 8px;
    text-align: center;
    font-size: 11px;
}

/* Pied de page devis */
.doc-footer {
    margin-top: 40px;
    border-top: 1px solid #E2E8F0;
    padding-top: 10px;
    text-align: center;
    font-size: 10px;
    color: #64748B;
}

/* Session types badges for programme */
.day-header {
    background-color: #F1F5F9;
    color: #1E3A8A;
    font-size: 13px;
    font-weight: bold;
    padding: 8px 14px;
    border-left: 4px solid #D97706;
    margin-top: 25px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-card {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-left: 4px solid #1E3A8A;
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 4px;
    page-break-inside: avoid;
}

.session-time {
    font-weight: bold;
    color: #1E3A8A;
    font-size: 12px;
}

.session-room {
    font-size: 11px;
    color: #64748B;
    margin-left: 10px;
}

.session-title {
    font-size: 13px;
    font-weight: bold;
    margin: 6px 0;
    color: #0F172A;
}

.session-desc {
    font-size: 11px;
    color: #475569;
    margin-bottom: 6px;
}

.speakers-list {
    font-size: 11px;
    color: #D97706;
    font-weight: bold;
}

.doc-empty-session {
    font-style: italic;
    color: #64748B;
}

/* Impression stricte */
@media print {
    .no-print {
        display: none !important;
    }
    body.doc-body {
        padding: 0 !important;
    }
}
