/* ======================================================
   DIM REVIEW — AFFICHAGE GLOBAL
   ====================================================== */


/* ======================================================
   1. ORDINATEUR
   ====================================================== */

@media (min-width: 769px) {

    /* Logo */
    .container-header .navbar-brand .brand-logo img {
        width: 220px !important;
        max-width: 220px !important;
        height: auto !important;
    }

    /* Zone identité */
    .container-header .navbar-brand {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 28px !important;

        width: 100% !important;
        max-width: 100% !important;
    }

    .container-header .navbar-brand .brand-logo {
        flex: 0 0 220px !important;
    }

    .container-header .navbar-brand .site-description {
        flex: 1 1 auto !important;
        max-width: 720px !important;

        font-size: 22px !important;
        line-height: 1.35 !important;
        font-weight: 500 !important;

        margin: 0 !important;
    }

    /* Zone du menu */
    .container-header .container-nav {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    /* Menu horizontal avec retour à la ligne */
    .container-header .mod-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;

        width: 100% !important;
        max-width: 100% !important;

        overflow: visible !important;
    }

    .container-header .mod-menu > li {
        flex: 0 0 auto !important;
    }
}


/* ======================================================
   2. MOBILE
   ====================================================== */

@media (max-width: 768px) {

    .container-header .navbar-brand .brand-logo img {
        width: 180px !important;
        max-width: 180px !important;
        height: auto !important;
    }

}


/* ======================================================
   3. AI & RESEARCH TOOLS
   ====================================================== */

.dim-ai-tools {
    width: 100%;
    max-width: 1100px;

    margin: 30px auto;
    padding: 20px;

    box-sizing: border-box;
    line-height: 1.6;
}

.dim-ai-header {
    text-align: center;
    margin-bottom: 40px;
}

.dim-ai-header h1 {
    margin: 0 0 8px 0;

    font-size: 36px;
    line-height: 1.2;
}

.dim-ai-header h2 {
    margin: 0 0 20px 0;

    font-size: 22px;
    line-height: 1.35;
    font-weight: 500;
}

.dim-ai-header p {
    max-width: 850px;

    margin: 0 auto;

    font-size: 16px;
    line-height: 1.6;
}


/* Titres des rubriques */

.dim-ai-tools h3 {
    margin-top: 45px;
    margin-bottom: 20px;

    padding-bottom: 10px;

    font-size: 24px;
    line-height: 1.3;

    border-bottom: 2px solid #e5e5e5;
}


/* Grille */

.dim-ai-grid {
    display: grid !important;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;

    width: 100%;
}


/* Cartes */

.dim-ai-card {
    display: flex !important;

    flex-direction: column;
    justify-content: center;

    min-width: 0;
    min-height: 145px;

    padding: 22px;

    box-sizing: border-box;

    background: #ffffff;

    color: #222222 !important;

    border: 1px solid #dddddd;
    border-radius: 12px;

    text-decoration: none !important;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.dim-ai-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 9px 24px rgba(0, 0, 0, 0.15);

    text-decoration: none !important;
}

.dim-ai-card strong {
    display: block;

    margin-bottom: 10px;

    font-size: 20px;
    line-height: 1.25;
}

.dim-ai-card span {
    display: block;

    font-size: 14px;
    line-height: 1.55;
}


/* Note scientifique */

.dim-ai-note {
    margin-top: 10px;

    padding: 22px;

    background: #f7f7f7;

    border-radius: 10px;
}

.dim-ai-note p:last-child {
    margin-bottom: 0;
}


/* Indépendance éditoriale */

.dim-ai-disclaimer {
    margin-top: 40px;

    padding: 20px 0;

    border-top: 1px solid #dddddd;

    font-size: 14px;
    line-height: 1.6;
}


/* ======================================================
   4. TABLETTE
   ====================================================== */

@media (max-width: 900px) {

    .dim-ai-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ======================================================
   5. MOBILE — AI TOOLS
   ====================================================== */

@media (max-width: 600px) {

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .dim-ai-tools {
        width: 100%;
        max-width: 100%;

        margin: 15px auto;
        padding: 10px;
    }

    .dim-ai-header {
        margin-bottom: 28px;
    }

    .dim-ai-header h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .dim-ai-header h2 {
        font-size: 19px;
        line-height: 1.35;
    }

    .dim-ai-header p {
        font-size: 15px;
    }

    .dim-ai-tools h3 {
        margin-top: 32px;
        margin-bottom: 16px;

        font-size: 21px;
    }

    .dim-ai-grid {
        grid-template-columns: 1fr;

        gap: 14px;
    }

    .dim-ai-card {
        width: 100%;

        min-height: 115px;

        padding: 18px;
    }

    .dim-ai-card strong {
        font-size: 19px;
    }

    .dim-ai-card span {
        font-size: 14px;
    }

}


/* ======================================================
   6. PROTECTION CONTRE LE DÉBORDEMENT
   ====================================================== */

.dim-ai-tools,
.dim-ai-grid,
.dim-ai-card {
    box-sizing: border-box;
}

.dim-ai-card,
.dim-ai-card strong,
.dim-ai-card span {
    overflow-wrap: anywhere;
    word-break: normal;
}