
/* ============================================================
   ChEBI Explorer
   Style principal
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;
    color: #172033;

    background: linear-gradient(
        135deg,
        #eef1ff 0%,
        #ffffff 45%,
        #e7ebff 100%
    );
}

.molecule-svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.molecule-svg-no-select {
    user-select: none;
}

#yellow {
    color: yellow;
}

#yellow {
    display: inline;
}

@media (max-width: 750px) {

    #yellow {
        display: block;
        line-height: 1.8;
    }

}

#bold {
    font-weight: bold;
}


/* ============================================================
   ÉLÉMENTS GÉNÉRAUX
   ============================================================ */

.subheading {
    margin-top: 25px;
}

.empty-icon {
    font-size: 3rem;
}

.result-synonym {
    margin-top: 0.5rem;
}

.search-form {
    position: relative;

    display: flex;
    align-items: center;
}

.search-form::before {
    content: "\1F48A";  /* correspond à la pilule 💊 */

    position: absolute;
    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 20px;
    line-height: 1;

    pointer-events: none;

    z-index: 2;
}

.search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;

    padding: 14px 16px 14px 48px;

    border: 2px solid #d9def2;
    border-radius: 10px;

    font-size: 1rem;

    outline: none;

    box-sizing: border-box;
}

/* ============================================================
   STRUCTURE MOLÉCULAIRE 2D
   ============================================================ */

.molecule-viewer {
    width: 100%;
    min-height: 360px;
    position: relative;
    margin: 0 0 25px;
    padding: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;

    background: #ffffff;

    border: 1px solid #e1e6f5;
    border-radius: 14px;
}

.molecule-3d-message {
    position: absolute;
    inset: 0;

    align-items: center;
    justify-content: center;

    margin: 0;
    text-align: center;
}

.molecule-3d-message:not([hidden]) {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 20px;

    margin: 0;
    text-align: center;
}


/* ============================================================
   CANVAS OPEN CHEM LIB
   ============================================================ */

.molecule-canvas {
    width: 100%;
    height: 520px;

    max-width: 1200px;
    min-width: 0;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    overflow: hidden;

    flex: 0 1 auto;
}


/* ============================================================
   SVG GÉNÉRÉ PAR OPEN CHEM LIB
   ============================================================ */

.molecule-canvas svg {
    display: block;

    width: 100%;
    height: 100%;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    user-select: none;
}


/* ============================================================
   ANCIEN RENDU IMAGE
   ============================================================ */

.molecule-image {
    display: block;

    width: min(600px, 100%);
    height: auto;
    max-width: 100%;

    object-fit: contain;
}


/* ============================================================
   ABSENCE DE STRUCTURE
   ============================================================ */

.molecule-empty {
    width: 100%;

    padding: 25px;

    box-sizing: border-box;

    text-align: center;

    color: #667085;

    background: #f8f9fd;

    border-radius: 12px;
}


/* ============================================================
   ERREUR DE RENDU
   ============================================================ */

.molecule-error {
    margin: 0;
    padding: 20px;

    text-align: center;

    color: #8a1c1c;
}


/* ============================================================
   HEADER
   ============================================================ */

header {
    padding: 20px 20px 30px;

    text-align: center;

    color: white;

    background: radial-gradient(
        circle at top,
        #5c77ff 0%,
        #0612f9 55%,
        #09254b 100%
    );

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

header h1 {
    margin: 0;
    font-size: 2.8rem;
}

header h2 {
    margin: 0;
    font-size: 2.3rem;
}

header p {
    margin: 8px 0 0;
    opacity: 0.9;
}


/* ============================================================
   MAIN
   ============================================================ */

main {
    width: min(1150px, calc(100% - 30px));

    margin: 30px auto 10px;
}


/* ============================================================
   RECHERCHE
   ============================================================ */

.search-form {
    display: flex;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 0;

    padding: 14px 16px 14px 48px;;

    border: 2px solid #d9def2;
    border-radius: 10px;

    font-size: 1rem;

    outline: none;
}

.search-input:focus {
    border-color: #5c77ff;

    box-shadow:
        0 0 0 4px rgba(92, 119, 255, 0.12);
}

.search-button {
    width: 47px;
    height: 47px;

    padding: 0;

    border: 0;
    border-radius: 5px;

    color: white;
    background: #5c77ff;

    font-weight: 700;

    cursor: pointer;

    margin-left: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button svg {
    display: block;

    width: 30px;
    height: 30px;
}

.search-button:hover {
    background: #ff3227;
}


/* ============================================================
   RETOUR
   ============================================================ */

.back {
    display: inline-block;

    margin: 25px 0 15px;

    color: #0612f9;

    text-decoration: none;

    font-weight: 600;
}


/* ============================================================
   EN-TÊTE DU COMPOSÉ
   ============================================================ */

.compound-header {
    padding: 30px;

    margin-bottom:20px;

    background: white;

    border-radius: 18px;

    box-shadow:
        0 8px 30px rgba(0, 20, 80, 0.09);
}

.compound-header h2 {
    margin: 0 0 12px;

    color: #09254b;

    font-size: 2rem;
}

.accession {
    display: inline-block;

    padding: 7px 11px;

    border-radius: 7px;

    background: #eef1ff;
    color: #0612f9;

    font-family: Consolas, monospace;
    font-weight: 700;
}

.definition {
    margin: 20px 0 0;

    line-height: 1.65;

    color: #4b5565;
}


/* ============================================================
   GRID
   ============================================================ */

.info-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;

    margin-top: 10px;

    min-width: 0;
}


/* ============================================================
   CARD
   ============================================================ */

.card {
    min-width: 0;

    padding: 24px;

    background: white;

    border-radius: 16px;

    box-shadow:
        0 6px 24px rgba(0, 20, 80, 0.07);
}

.card.full {
    grid-column: 1 / -1;

    margin-bottom: 10px;

    max-width: 100%;
}

.card h3 {
    margin: 0 0 18px;
    padding-bottom: 10px;

    border-bottom: 2px solid #eef1ff;

    color: #09254b;

    font-size: 1.15rem;
}


/* ============================================================
   DATA TABLE
   ============================================================ */

.data-table {
    width: 100%;

    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 10px 8px;

    text-align: left;
    vertical-align: top;

    border-bottom: 1px solid #edf0f7;
}

.data-table th {
    width: 230px;

    color: #667085;

    font-weight: 600;
}


/* ============================================================
   CODE
   ============================================================ */

.code {
    padding: 15px;

    overflow-x: auto;

    border-radius: 9px;
    border: 1px solid #e3e7f1;

    background: #f5f7fb;

    font-family:
        Consolas,
        'Courier New',
        monospace;

    font-size: 0.88rem;
    line-height: 1.5;

    white-space: pre-wrap;
    word-break: break-word;
}


/* ============================================================
   SYNONYMES
   ============================================================ */

.synonyms {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}

.synonym {
    padding: 7px 10px;

    border-radius: 7px;

    background: #eef1ff;
    color: #344054;

    font-size: 0.9rem;
}


/* ============================================================
   ACCESSIONS
   ============================================================ */

.accession-list {
    display: grid;

    gap: 8px;
}

.accession-item {
    padding: 10px 12px;

    background: #f7f8fc;

    border-radius: 8px;
}

.accession-type {
    color: #667085;

    font-size: 0.8rem;

    margin-right: 8px;
}


/* ============================================================
   RELATIONS
   ============================================================ */

.relation {
    padding: 13px 0;

    border-bottom: 1px solid #edf0f7;
}

.relation:last-child {
    border-bottom: 0;
}

.relation-code {
    font-weight: 700;

    color: #0612f9;
}

.relation-id {
    color: #667085;

    font-family: Consolas, monospace;
}


/* ============================================================
   ORIGINES
   ============================================================ */

.origin {
    padding: 14px 0;

    border-bottom: 1px solid #edf0f7;

    line-height: 1.6;
}


/* ============================================================
   RÉSULTATS
   ============================================================ */

.results-header {
    margin: 28px 0 15px;
}

.results-header h2 {
    margin: 0;

    color: #09254b;
}

.result {
    margin-bottom: 15px;
    padding: 20px;

    background: white;

    border-left: 5px solid #5c77ff;
    border-radius: 12px;

    box-shadow:
        0 6px 22px rgba(0, 20, 80, 0.07);
}

.result h3 {
    margin: 0 0 7px;
}

.result h3 a {
    color: #09254b;

    text-decoration: none;
}

.result h3 a:hover {
    color: #0612f9;
}

.result-title {
    margin: 0 0 8px;
}

.result-title a {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: #0612f9;

    text-decoration: none;

    cursor: pointer;
}

.result-title a:hover {
    text-decoration: underline;
}

.result-search-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    color: #5c77ff;

    opacity: 0.8;

    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

.result-title a:hover
.result-search-icon {
    opacity: 1;

    transform: scale(1.12);
}

.result-search-icon svg {
    display: block;
}

.result-accession {
    color: #0612f9;

    font-family: Consolas, monospace;

    font-size: 0.88rem;
}

.result-definition {
    color: #667085;

    line-height: 1.5;
}


/* ============================================================
   EMPTY / ERROR
   ============================================================ */

.message {
    margin-top: 25px;
    padding: 30px;

    text-align: center;

    background: white;

    border-radius: 15px;
    border: 1px solid #9da4b4;

    color: #667085;
}

.error {
    margin-top: 20px;
    padding: 15px;

    background: #fff0f0;

    border-left: 4px solid #d92d20;
    border-radius: 8px;

    color: #9b1c1c;
}


/* ============================================================
   MOLFILE
   ============================================================ */

.molfile-scroll-wrapper {
    width: 100%;
}

.molfile-scroll-hint {
    margin-bottom: 8px;

    font-size: 0.85rem;

    color: #666;

    text-align: right;
}

.molfile-scroll {
    max-height: 280px;

    overflow-y: auto;
    overflow-x: auto;

    border-radius: 8px;
}

.molfile-scroll .code {
    margin: 0;

    white-space: pre;

    min-width: max-content;
}


/* ============================================================
   FOOTER
   ============================================================ */

footer {
    padding: 5px 25px 25px;

    text-align: center;

    color: #667085;

    font-size: 0.85rem;
}


/* ============================================================
   CONTENEUR 3D
   ============================================================ */

.molecule-3d-container {
    position: relative;

    width: 100%;
    min-height: 450px;

    box-sizing: border-box;

    margin-bottom: 10px;

    background: #ffffff;

    border: 1px solid #ff8589;
    border-radius: 12px;

    overflow: hidden;

    isolation: isolate;
}


/*
 * Le conteneur caché ne doit occuper aucun espace.
 */

#molecule-3d-container[hidden] {
    display: none !important;
}


/*
 * Surcouche conservant une bordure nette
 * au-dessus du canvas WebGL.
 */

.molecule-3d-container::before {
    content: '';

    position: absolute;
    inset: 0;

    box-sizing: border-box;

    border: 1px solid #ff8589;
    border-radius: 11px;

    pointer-events: none;

    z-index: 10;
}


/* ============================================================
   VIEWER 3D
   ============================================================ */

.molecule-3d-viewer {
    position: relative;

    width: 100%;
    height: 450px;
    min-height: 450px;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    background: #ffffff;

    border: 0;
    border-radius: 11px;

    overflow: hidden;
}


/* ============================================================
   CANVAS WEBGL DU VIEWER 3D
   ============================================================ */

.molecule-3d-viewer canvas {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none;
    max-height: none;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 10px;

    box-sizing: border-box;
}


/* ============================================================
   BOUTON 3D
   ============================================================ */

.molecule-3d-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-bottom: 10px;

    min-height: 42px;

    padding: 9px 16px;

    border: 1px solid #5c77ff;
    border-radius: 9px;

    background: #5c77ff;
    color: #ffffff;

    font-family: inherit;

    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.08);

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.12s ease;
}


/*
 * Important :
 * le JS utilise button.hidden = true.
 *
 * Cette règle garantit que le bouton disparaît
 * complètement même si une autre règle CSS
 * modifie son display.
 */

.molecule-3d-button[hidden] {
    display: none !important;
}

/* ============================================================
   BOUTON 3D INDISPONIBLE
   ============================================================ */

.molecule-3d-button:disabled {
    background: #eef0f5;
    border-color: #d2d6df;
    color: #8a919f;

    cursor: not-allowed;

    box-shadow: none;

    opacity: 1;
}

.molecule-3d-button:disabled:hover {
    background: #eef0f5;
    border-color: #d2d6df;
    color: #8a919f;

    box-shadow: none;
}

.molecule-3d-button:disabled:active {
    transform: none;
}

/* ============================================================
   ICÔNE SVG DU BOUTON
   ============================================================ */

.molecule-3d-button .button-icon {
    display: block;

    width: 18px;
    height: 18px;

    flex: 0 0 18px;
}


/* ============================================================
   SURVOL
   ============================================================ */

.molecule-3d-button:hover {
    background: #4d69ee;
    border-color: #4d69ee;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.12);
}


/* ============================================================
   CLIC
   ============================================================ */

.molecule-3d-button:active {
    transform: translateY(1px);

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.08);
}


/* ============================================================
   FOCUS CLAVIER
   ============================================================ */

.molecule-3d-button:focus-visible {
    outline: 3px solid rgba(92, 119, 255, 0.28);
    outline-offset: 2px;
}


/* ============================================================
   VUE 3D ACTIVE
   ============================================================ */

.molecule-3d-button[aria-expanded='true']:not(:disabled) {
    background: #ffffff;

    color: #ff2f36;

    border-color: #ff8589;

    box-shadow: none;
}

.molecule-3d-button[aria-expanded='true']:not(:disabled):hover {
    background: #f4f6ff;

    border-color: #ff8589;
}


/* ============================================================
   ORIGINES DU COMPOSES
   ============================================================ */

.ori {
    margin-top: 10px;
}

.origin-data {
    padding-left: 20px;
}

.origin-item::before {
    content: "\21B3";
    margin-right: 6px;
}

.origin-group:not(:last-child)::after {
    content: "";
    display: block;
    height: 16px;
}

/* ============================================================
   RESPONSIVE — TABLETTES / PETITS ÉCRANS
   ============================================================ */

@media (max-width: 900px) {

    .search-form {
        display: flex !important;

        flex-direction: row !important;
        flex-wrap: nowrap !important;

        align-items: center !important;

        width: 100% !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;

        gap: 8px !important;

        box-sizing: border-box;
    }

    .search-input {
        flex: 1 1 0 !important;

        width: 0 !important;
        min-width: 0 !important;
        max-width: none !important;

        margin: 0 !important;

        box-sizing: border-box;
    }

    .search-button {
        flex: 0 0 47px !important;

        width: 47px !important;
        min-width: 47px !important;
        max-width: 47px !important;

        height: 47px !important;

        margin: 0 !important;
        padding: 0 !important;

        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        box-sizing: border-box;
    }

    .search-button svg {
        display: block;

        width: 30px;
        height: 30px;
    }
}


/* ============================================================
   RESPONSIVE — 750 PX
   ============================================================ */

@media (max-width: 750px) {

    .info-grid {
        grid-template-columns: 1fr;
    }

    .card.full {
        grid-column: auto;
    }


    /* --------------------------------------------------------
       Recherche
       -------------------------------------------------------- */

    /*
     * On conserve volontairement la recherche horizontale.
     * L'ancienne règle flex-direction: column provoquait
     * un bouton placé sous le champ sur smartphone.
     */

    .search-form {
        flex-direction: row !important;
        flex-wrap: nowrap !important;

        align-items: center !important;
    }

    .search-input {
        min-width: 0 !important;
    }

    .search-button {
        flex: 0 0 47px !important;

        width: 47px !important;
        height: 47px !important;

        min-width: 47px !important;
        max-width: 47px !important;

        margin-left: 0 !important;

        padding: 0 !important;

        display: flex !important;

        align-items: center !important;
        justify-content: center !important;
    }


    /* --------------------------------------------------------
       En-tête du composé
       -------------------------------------------------------- */

    .compound-header h2 {
        font-size: 1.6rem;
    }


    /* --------------------------------------------------------
       Tableau
       -------------------------------------------------------- */

    .data-table th {
        width: 140px;
    }


    /* --------------------------------------------------------
       Structure moléculaire 2D
       -------------------------------------------------------- */

    .molecule-viewer {
        min-height: 0;

        height: 250px;

        padding: 10px;

        overflow-x: auto;
        overflow-y: hidden;

        justify-content: center;
    }

    .molecule-canvas {
        width: 100%;

        height: 240px;

        max-width: 100%;
        min-width: 0;
    }

    .molecule-canvas svg {
        width: 100%;

        height: 240px;

        max-width: 100%;
        max-height: 100%;
    }


    /* --------------------------------------------------------
       Viewer 3D
       -------------------------------------------------------- */

    .molecule-3d-container {
        min-height: 0;

        height: 250px;
        max-height: 250px;

        overflow: hidden;
    }

    .molecule-3d-viewer {
        width: 100%;

        height: 250px;
        min-height: 0;
        max-height: 250px;

        overflow: hidden;
    }

    .molecule-3d-viewer canvas {
        display: block;

        width: 100% !important;
        height: 100% !important;

        max-width: 100% !important;
        max-height: 100% !important;

        margin: 0;
        padding: 0;
    }
}


/* ============================================================
   RESPONSIVE — 600 PX
   ============================================================ */

@media (max-width: 600px) {

    header h1 {
        margin: 0;

        font-size: 2rem;
    }

    header h2 {
        margin: 0;

        font-size: 1.5rem;
    }

    header p {
        line-height: 1.5;
    }

    /*
     * Le bouton de recherche reste compact afin de
     * rester aligné avec le champ.
     */

    .search-button {
        width: 47px !important;
        height: 47px !important;

        min-width: 47px !important;
        max-width: 47px !important;

        padding: 0 !important;
    }
}

/* ============================================================
   DONNÉES DE STRUCTURE — SMILES / InChI / InChIKey
   ============================================================ */

/*
 * Tableau
 * ------------------------------------------------------------
 */

.data-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    vertical-align: top;
    text-align: left;
}

.data-table th {
    width: 230px;
}

.data-table td {
    min-width: 0;
    max-width: 100%;
}


/*
 * BOÎTE SMILES / InChI
 * ------------------------------------------------------------
 *
 * La boîte possède une hauteur limitée.
 * Si le contenu est trop long, on fait défiler verticalement.
 */

.structure-value {
    display: block;

    width: 100%;
    max-width: 100%;

    height: 150px;
    max-height: 150px;

    box-sizing: border-box;

    margin: 0;
    padding: 8px 12px;

    overflow-y: auto;
    overflow-x: hidden;

    -webkit-overflow-scrolling: touch;

    background: #eef4ff;
    border: 1px solid #cfdcf5;
    border-radius: 9px;

    font-family: Consolas, "Courier New", monospace;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.5;

    color: #09254b;
}


/*
 * TEXTE SMILES / InChI
 * ------------------------------------------------------------
 */

.structure-text {
    display: block;

    width: 100%;
    max-width: 100%;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    white-space: normal;

    overflow-wrap: anywhere;
    word-break: break-word;

    text-align: left;
    direction: ltr;
}

/*
 * Licence
 * ------------------------------------------------------------
 */
.licence {
    color: red;
}

.feature-code-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    font-weight: 600;
}

.feature-code-info {
    position: absolute;
    left: 50%;
    bottom: calc(100% - 15px);
    transform: translateX(-50%);
    width: 650px;
    padding: 16px 18px;
    background: #294AC2;
    border: 1px solid #223DA0;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.55;
    text-align: left;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
    z-index: 1000;
}

/*
|--------------------------------------------------------------------------
| Petite flèche
|--------------------------------------------------------------------------
*/

.feature-code-info::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #294AC2;
}

/*
|--------------------------------------------------------------------------
| Titre
|--------------------------------------------------------------------------
*/

.feature-code-info strong {
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
}

/*
|--------------------------------------------------------------------------
| Chaque définition
|--------------------------------------------------------------------------
*/
#blue {
    color: blue;
}

.feature-code-info span {
    display: block;

    margin-bottom: 5px;
}

.feature-code-info span:last-child {
    margin-bottom: 0;
}

.feature-code-info b {
    font-weight: 700;
}

.feature-code-help {
    display: inline-block;

    margin-left: 4px;

    font-size: 13px;
    font-weight: bold;

    cursor: help;

    opacity: 0.75;
}

.feature-code-help:hover {
    opacity: 1;
}

/*
|--------------------------------------------------------------------------
| Affichage au survol
|--------------------------------------------------------------------------
*/

.feature-code-tooltip:hover .feature-code-info {
    opacity: 0.96;
    visibility: visible;
}

/* ============================================================
   SMARTPHONE — SMILES / InChI
   ============================================================ */

@media (max-width: 750px) {

    /*
     * Le tableau ne doit jamais s'élargir
     * à cause d'une chaîne chimique très longue.
     */
    .data-table {
        width: 100% !important;
        max-width: 100% !important;

        table-layout: fixed !important;
    }


    /*
     * Les cellules peuvent réellement rétrécir.
     */
    .data-table th,
    .data-table td {
        min-width: 0 !important;
        max-width: 100% !important;
    }


    /*
     * Colonne du nom : SMILES / InChI
     */
    .data-table th {
        width: 110px !important;
    }


    /*
     * Cellule contenant la valeur.
     */
    .data-table td {
        width: auto !important;

        overflow: hidden !important;
    }


    /*
     * --------------------------------------------------------
     * BOÎTE SMILES / InChI
     * --------------------------------------------------------
     *
     * C'est CETTE règle qui limite la hauteur.
     *
     * 150 px maximum.
     * Le contenu supplémentaire est accessible
     * avec une barre de défilement verticale.
     */
    .data-table td > .structure-value {

        display: block !important;

        width: 100% !important;
        max-width: 100% !important;

        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;

        box-sizing: border-box !important;

        margin: 0 !important;
        padding: 8px 12px !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        -webkit-overflow-scrolling: touch !important;

        background: #eef4ff !important;
        border: 1px solid #cfdcf5 !important;
        border-radius: 9px !important;

        font-family:
            Consolas,
            "Courier New",
            monospace !important;

        font-size: 0.88rem !important;
        line-height: 1.5 !important;

        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;

        color: #09254b !important;
    }


    /*
     * --------------------------------------------------------
     * TEXTE À L'INTÉRIEUR
     * --------------------------------------------------------
     */
    .data-table td > .structure-value > .structure-text {

        display: block !important;

        width: 100% !important;
        max-width: 100% !important;

        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 !important;
        padding: 0 !important;

        box-sizing: border-box !important;

        white-space: normal !important;

        overflow-wrap: anywhere !important;
        word-break: break-word !important;

        text-align: left !important;
        direction: ltr !important;
    }
}


/* ============================================================
   INDICATION DE DÉFILEMENT — SMILES / InChI
   ============================================================ */

.structure-scroll-hint {
    margin: 0 0 6px;

    color: #666;
    font-size: 0.82rem;
    line-height: 1.3;

    text-align: right;
}

/* ============================================================
   InChIKey — BOÎTE COMPACTE
   ============================================================ */

.structure-value-short {
    height: auto;
    max-height: none;
    overflow: hidden;
}

@media (max-width: 750px) {

    .data-table td > .structure-value.structure-value-short {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        overflow: hidden !important;

        padding: 8px 12px !important;
    }

    .feature-code-info {
        width: 300px;
    }

}
@media (max-width: 480px) {
    .molecule-3d-button {
         width: 100%;
    }

}