.preview-area {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Aligné en haut pour permettre le scroll */
    padding: 60px 40px;
    overflow-y: auto;
    background-color: #0f172a; /* Fond sombre pour contraste */
}

#document {
    width: 800px !important;
    min-width: 800px !important;
    height: auto !important; /* Laisse le contenu définir la fin du doc */
    min-height: 0 !important; 
    background: white !important;
    padding: 40px !important;
    margin: 0 auto; /* Centre le doc */
    display: block;
}

.cert-signature {
    min-width: 250px;
    font-weight: bold;
}

.round-stamp {
    border: 2px solid #0a192f;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-code {
    width: 85px;
    height: 85px;
    margin-bottom: 5px;
    background: #f1f5f9;
}

.legal-text {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dotted #eee;
    margin-bottom: 0 !important; /* Très important pour le crop */
}

.header-cert { display: flex; align-items: center; gap: 20px; border-bottom: 2px solid #eee; padding-bottom: 20px; margin-bottom: 30px; }
.cert-tag { background: var(--omc-dark); color: white; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: bold; letter-spacing: 1px; }
.cert-main-title { font-size: 32px; margin: 5px 0; color: var(--omc-dark); text-transform: uppercase; font-weight: 900; }

.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.cert-box { border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; background: #fff; }
.cert-box label { color: #64748b; font-size: 10px; text-transform: uppercase; font-weight: bold; margin-bottom: 5px; }
.cert-val { font-size: 16px; font-weight: 600; color: #1e293b; min-height: 1.2em; }

.cert-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 60px; }


.legal-text { font-size: 10px; color: #94a3b8; line-height: 1.6; margin-top: 60px; border-top: 1px dotted #e2e8f0; padding-top: 20px; text-align: justify; }


/* Styles Popup */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}
.popup-content {
    background: #112240;
    padding: 25px;
    border-radius: 10px;
    width: 500px;
    text-align: center;
    border: 1px solid var(--omc-cyan);
}
#direct-link {
    margin: 15px 0;
    background: #0a192f;
    border: 1px solid #233554;
    color: var(--omc-cyan);
    text-align: center;
}
.btn-copy { background: var(--omc-cyan); color: var(--omc-dark); width: 48%; }
.btn-close { background: #4b5563; color: white; width: 48%; }

/* --- BOUTONS D'ACTION (Style "Constat") --- */

/* Conteneur pour l'espacement entre les boutons */
.actions-group {
    margin-top: 20px; /* Un peu d'espace au-dessus */
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espace entre les deux boutons */
}

/* Style commun aux deux boutons */
.btn-image, .btn-discord {
    width: 100%;
    padding: 12px;
    border: none; /* Important : enlève le style "moche" par défaut */
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    transition: background-color 0.2s ease; /* Petite transition fluide au survol */
}

/* Bouton Blanc (Générer l'image) */
.btn-image {
    background: #ffffff;
    color: #0a1324;
}
.btn-image:hover {
    background: #f1f5f9; /* Gris très clair au survol */
}

/* Bouton Bleu (Discord) */
.btn-discord {
    background: #5865f2; /* Bleu Discord officiel */
    color: #ffffff;
}
.btn-discord:hover {
    background: #4752c4; /* Bleu un peu plus foncé au survol */
}
