/* =============================================================================
   EVENT-PRINT.CSS — Styles autonomes pour le contenu d'un event
   =============================================================================
   Appliqué à toute zone portant la classe .event-content :
     - Zone éditable du rich-editor (live preview WYSIWYG)
     - Affichage en timeline (lecture, prochainement)
     - Génération de visuels imprimables (PDF, print stylesheet)

   Le style est volontairement "publication" : typographie soignée, hiérarchie
   visuelle marquée, marges aérées. Peut diverger du reste du site sans souci.

   Tu peux librement modifier ce fichier sans toucher au reste — il définit
   l'identité visuelle des événements.
   ============================================================================= */


.event-content {
    /* Typo de base — légèrement plus "lecture" que le reste de l'app */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: #1a1a1a;
    word-wrap: break-word;
}


/* PARAGRAPHES --------------------------------------------------------------- */

.event-content p {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.65;
}

.event-content p:last-child { margin-bottom: 0; }


/* TITRES — hiérarchie marquée mais sobre ---------------------------------- */

.event-content h1,
.event-content h2,
.event-content h3,
.event-content h4 {
    margin: 22px 0 10px;
    line-height: 1.3;
    color: #111;
    font-weight: 700;
}

.event-content h1:first-child,
.event-content h2:first-child,
.event-content h3:first-child,
.event-content h4:first-child { margin-top: 0; }

.event-content h1 {
    font-size: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.12);
}

.event-content h2 {
    font-size: 20px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.event-content h3 {
    font-size: 17px;
}

.event-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/* INLINE -------------------------------------------------------------------- */

.event-content strong, .event-content b { font-weight: 700; color: #111; }
.event-content em, .event-content i { font-style: italic; }
.event-content u { text-decoration: underline; }
.event-content s, .event-content strike { text-decoration: line-through; color: #6b7280; }

.event-content a {
    color: #185FA5;
    text-decoration: underline;
    text-decoration-color: rgba(24, 95, 165, 0.4);
    text-underline-offset: 2px;
}

.event-content a:hover {
    text-decoration-color: #185FA5;
}


/* LISTES -------------------------------------------------------------------- */

.event-content ul,
.event-content ol {
    margin: 8px 0 14px;
    padding-left: 28px;
}

.event-content ul { list-style: disc outside; }
.event-content ol { list-style: decimal outside; }

.event-content ul ul { list-style: circle outside; margin: 4px 0; }
.event-content ul ul ul { list-style: square outside; }
.event-content ol ol { list-style: lower-alpha outside; margin: 4px 0; }
.event-content ol ol ol { list-style: lower-roman outside; }

.event-content li {
    margin: 4px 0;
    line-height: 1.6;
}

.event-content li::marker {
    color: #6b7280;
}


/* CITATION ----------------------------------------------------------------- */

.event-content blockquote {
    margin: 16px 0;
    padding: 4px 0 4px 18px;
    border-left: 3px solid #185FA5;
    color: #374151;
    font-style: italic;
    font-size: 15px;
    line-height: 1.6;
}

.event-content blockquote p {
    margin: 0 0 8px;
}

.event-content blockquote p:last-child { margin-bottom: 0; }


/* ENCADRÉ ------------------------------------------------------------------ */

.event-content .event-box {
    margin: 20px 0;
    padding: 16px 20px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-left: 3px solid #BA7517;
    border-radius: 4px;
    background: #fafafa;
}

.event-content .event-box p:last-child { margin-bottom: 0; }


/* TABLEAUX (depuis Excel/Word) --------------------------------------------- */

.event-content table {
    border-collapse: collapse;
    margin: 12px 0;
    width: auto;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.4;
}

.event-content td,
.event-content th {
    border: 1px solid rgba(0, 0, 0, 0.18);
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

.event-content th {
    background: #f5f5f5;
    font-weight: 700;
    color: #111;
}


/* MENTIONS @ et # ----------------------------------------------------------
   Insérées par le rich-editor sous forme de span atomique :
     <span class="event-cite" data-value="M. Lefèvre">@M. Lefèvre</span>
     <span class="event-tag"  data-key="memo" data-color="#BA7517">#mémo</span>
   Visuellement discret, lecture fluide, mais identifiable.
   -------------------------------------------------------------------------- */

.event-content .event-tag,
.event-content .event-cite {
    display: inline;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.95em;
    line-height: 1.4;
    white-space: nowrap;
    /* Empêcher la coupure visuelle au milieu du span */
    word-break: keep-all;
}

.event-content .event-tag {
    /* Tag : couleur portée par --tag-color (héritée via inline style ou CSS) */
    color: var(--tag-color, #534AB7);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 500;
}

.event-content .event-cite {
    /* Citation @user : ton bleu doux */
    color: #185FA5;
    background: rgba(24, 95, 165, 0.06);
    border: 1px solid rgba(24, 95, 165, 0.18);
    font-weight: 500;
}

/* Impression : aplatir (pas de fond coloré pour le print) */
@media print {
    .event-content .event-tag,
    .event-content .event-cite {
        background: transparent;
        border-color: transparent;
        padding: 0;
        font-weight: 600;
    }
}


/* CODE INLINE (en cas de paste) -------------------------------------------- */

.event-content code {
    font-family: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Code", "Courier New", monospace;
    font-size: 0.93em;
    padding: 1px 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
}


/* IMPRESSION --------------------------------------------------------------- */

@media print {
    .event-content {
        font-size: 12pt;
        line-height: 1.55;
        color: #000;
    }
    .event-content h1 { font-size: 18pt; }
    .event-content h2 { font-size: 15pt; }
    .event-content h3 { font-size: 13pt; }
    .event-content h4 { font-size: 12pt; }
    .event-content a { color: #000; text-decoration: underline; }
    .event-content blockquote { color: #333; border-left-color: #555; }
    .event-content .event-box { background: #fff; border-color: #555; }
}
