
h1{
  font-size:      150%;
  font-style:     italic;
  color:          blue;
  font-weight:    bold;}
p{
  margin-left:    auto;
  margin-right:   auto;
  font-size:      100%;
  text-align:     justify;
  color:          #000000; }
div.prohibited {
    color: black;
    font-size: 150%;
}
u.prohibited {
    color: red;
    font-size: 200%;
}
.error{
  font-size:      130%;
  color:          red;
  text-align:     left; }
.system-error{
  white-space:    pre;
  text-wrap-mode: wrap;
  display:        none;
  color:          red;
  text-align:     left; }
.small-right{
  text-align:     right;
  font-size:      75%;  }
.small-left{
  font-size:      75%; }
pre{
  font-family:    Courier, monospace;}
.input-label{
  color:          darkred;
  font-size:      100%;
  font-weight:    bold;}
.inputcode{
  color:          darkgreen;
  font-size:      100%;
  font-weight:    bold;}
.inputcode .lisp{
    background-color: #eee;
}
.output{
  background-color: lightgray;
  align-items:    center;
  justify-content:center;
  color:          blue;
  font-weight:    bold;
  font-size:      100%;}
.unstructured{
    background-color: #F0F0A0;
}
pre.enhanced-ascii-art, pre.ascii-art, pre.ascii {
    background-color:    lightgray;
    height:              100%;
    margin-top:          4px;
    margin-bottom:       4px;}
pre.verbatim, pre.interpreted{
    height:              100%;
    margin-top:          0px;
    margin-bottom:       4px;}
.print{
  font-size:      75%;
  font-style:     italic;}
td{
  max-width:      1000px;
  text-align:     left;
  vertical-align: top;}
textarea{
  width:          100%;}
.maxima-output{
    display:		flex;
    justify-content:	center;
    align-items:	center;
    margin:		auto;}
.mathml{
    font-size: small;
    color:     black;}
math{
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
}
mi, mo{
    font-weight: bold;
    color: blue;
}
mn{
    font-weight: bold;
    color: red;
}
.trace {
    color: darkgreen;
}
.output-label::before, .input-label::before{
    content:"[";}
.output-label::after, .input-label::after{
    content:"] ";}
tr.retrieve{
    background-color: lightpink;
    color:            black;}
pre.lisp, span.retrieve{
    white-space:	pre;
    font-family:	monospace;
    display:		block;
    margin:		25px;
    font-weight:	bold;
    font-style:		oblique;}
.maxima-banner, .maxima-banner pre{
    color:		black;
    font-family:	monospace;
    display:		grid;
    background-color:	#fd8;}

.warning{
    color:		 darkred;
    background-color:	 lightgray;
    font-size:           small;
    font-weight:	 bold;}

/* CORRECTION : Séparer les règles */
.menu-row {
    display:	flex;
    gap:	10px;
    margin:	10px 0;
    flex-wrap:	wrap;
}

.cmd-menu {
    padding:		8px 12px;
    font-size:		14px;
    border:		1px solid #ccc;
    border-radius:	4px;
    background:	        white;
    min-width:		180px;
}

.cmd-menu:focus {
    outline:		2px solid #007cba;
    border-color:	#007cba;
}

/* Titres de menu en bleu clair/gras */
.cmd-menu option:first-child {
    background-color:	#f0f8ff;  /* Bleu très clair */
    color:		#1e40af;  /* Bleu moyen */
    font-weight:	600;
    font-style:		italic;
}

/* Effet survol pour tous les titres */
.cmd-menu option:first-child:hover {
    background-color:	#dbeafe;
    color:		#1d4ed8;
}

/* Séparateur visuel pour les autres options */
.cmd-menu option:not(:first-child) {
    font-weight:	normal;
}

.small-right {
    float:	right !important;
    font-size:	75% !important;
    margin-top: -40px !important;
}

/* =========================
   STYLES D'IMPRESSION PDF - (with hidden columns management)
   ========================= */
@media print {

    #btn-pdf, .no-print, button, .menu-row {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    #maxima-output {
        table-layout: fixed !important;
        width: 100% !important;
    }

    #maxima-output tr {
        display: block !important;
        width: 100% !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* *** CORRECTION CLÉ : on ne cache QUE les td avec style inline display:none ***
       Les td sans style (contenant les images) restent visibles               */
    #maxima-output td[style*="display:none"],
    #maxima-output td[style*="display: none"] {
        display: none !important;
    }

    /* Les td actifs (flex ou block) s'affichent en pleine largeur */
    #maxima-output td[style*="display: block"],
    #maxima-output td[style*="display:block"],
    #maxima-output td[style*="display: flex"],
    #maxima-output td[style*="display:flex"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Les td sans style (images gnuplot) s'affichent normalement */
    #maxima-output td:not([style]) {
        display: block !important;
        width: 100% !important;
    }

    #maxima-output pre {
        white-space: pre-wrap !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        max-width: 100% !important;
    }

    #maxima-output img,
    #maxima-output svg,
    #maxima-output canvas {
        display: block !important;
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        margin: 8px 0 !important;
    }

    h1, h2, h3, h4 {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

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

