html,
body {
    background: #f4f6f9;
    color: #1e293b;
}

.page {
    background: #f4f6f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page > .container,
.page > .row.blocks {
    flex: 0 0 auto;
}

.page > footer.page-footer {
    margin-top: auto;
}

body.home-page nav .brand-logo {
    display: none !important;
}

body.home-page nav,
body.home-page nav .nav-wrapper {
    background: transparent !important;
    box-shadow: none !important;
}

body.home-page nav {
    position: absolute;
    width: 100%;
    z-index: 30;
}

body.home-page .front-paper {
    padding: 72px 16px 64px;
}

body.home-page .front-paper .raw {
    max-width: 720px;
    margin: 0 auto;
}

body.home-page .home-logo {
    display: block;
    margin: 8px auto 16px;
    max-width: 220px;
    width: auto;
    height: auto;
}

body.home-page .front-paper p {
    margin-bottom: 22px;
    font-size: 20px;
}

body.home-page .icon-block {
    background: #fff;
    border-radius: 12px;
    padding: 28px 22px 24px;
    margin: 16px 0 8px;
    min-height: 230px;
    box-shadow: 0 6px 20px rgba(15, 40, 80, 0.08);
}

body.home-page .icon-block h5 {
    color: #0f172a;
    font-weight: 600;
}

body.home-page .icon-block p.light {
    color: #333333;
}

body.home-page .section .row {
    margin-bottom: 0;
}

.search-results .page,
body:not(.home-page) .page {
    background: #f4f6f9;
}

#content .card,
#rightPanels .card {
    overflow: hidden;
}

.button-collapse.fixed-action-btn {
    bottom: 72px;
    right: 22px;
    z-index: 40;
}

@media (max-width: 600px) {
    body.home-page .front-paper {
        padding: 36px 12px 40px;
    }

    body.home-page .icon-block {
        min-height: 0;
    }
}

/* Search results layout */
html,
body.search-page {
    overflow-x: hidden;
    max-width: 100%;
}

body.search-page nav {
    position: relative;
    z-index: 400;
    height: 0 !important;
    min-height: 0 !important;
    line-height: 0 !important;
    overflow: visible;
    background: transparent !important;
    box-shadow: none !important;
}

body.search-page #languages-dropdown,
body.search-page #users-dropdown,
#languages-dropdown.dropdown-content,
#users-dropdown.dropdown-content {
    z-index: 4000 !important;
}

body.search-page nav .nav-wrapper {
    display: none !important;
}

body.search-page .search-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

body.search-page .search-top {
    position: relative;
    z-index: 500;
    background: radial-gradient(#1585ed, #0e61ae);
    overflow: visible;
}

body.search-page .search-top:after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url(../imgs/pattern.png) repeat center center;
    opacity: .4;
    pointer-events: none;
}

body.search-page .search-header-inner {
    position: relative;
    z-index: 2;
    max-width: none;
    margin: 0;
    padding: 12px 24px 14px 28px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 28px;
}

body.search-page .search-logo {
    flex: 0 0 120px;
    width: 120px;
    display: flex;
    align-items: center;
    line-height: 0;
}

body.search-page .search-logo img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 140px;
}

body.search-page .search-header .search-form {
    flex: 0 1 652px;
    width: 652px;
    max-width: 652px;
    min-width: 0;
    margin: 0;
}

body.search-page .search-header .search-wrapper {
    position: relative;
    display: block;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 24px;
    box-shadow: 0 1px 6px rgba(15, 40, 80, 0.08);
    overflow: hidden;
}

body.search-page .search-header .search-wrapper input.search,
body.search-page .search-header .search-wrapper input.search:focus {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 92px 0 18px !important;
    border: 0 !important;
    border-radius: 24px !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

body.search-page .search-header .search-wrapper button,
body.search-page .search-header .search-wrapper i.voice {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #5f6368;
    cursor: pointer;
    z-index: 2;
}

body.search-page .search-header .search-wrapper button {
    right: 6px !important;
}

body.search-page .search-header .search-wrapper i.voice {
    right: 44px !important;
}

body.search-page .search-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex: 0 0 auto;
}

body.search-page .search-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff !important;
}

body.search-page .search-action:hover {
    background: rgba(255, 255, 255, 0.16);
}

body.search-page .search-action i {
    font-size: 22px;
    line-height: 1;
}

body.search-page .button-collapse.fixed-action-btn {
    display: none !important;
}

body.search-page .search-tabs {
    background: #fff;
    overflow-x: auto;
}

body.search-page .search-tabs-inner {
    max-width: none;
    margin: 0;
    padding: 0 24px 0 176px;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
}

body.search-page .search-tabs-spacer {
    display: none;
}

body.search-page .tabs-menu {
    flex: 1 1 auto;
    max-width: none;
    margin: 0;
    height: 46px;
    justify-content: flex-start;
    background: #fff;
    padding: 0;
}

body.search-page .tabs-menu .tab {
    flex-grow: 0;
    width: auto;
    min-width: 72px;
    padding: 0 16px;
    text-transform: none;
    letter-spacing: 0;
    height: 46px;
    line-height: 46px;
}

body.search-page .tabs-menu .tab a {
    color: #475569;
    font-size: 15px;
}

body.search-page .tabs-menu#links .active {
    color: #1585ed;
    font-weight: 600;
    border-bottom: 3px solid #1585ed;
}

body.search-page .search-main {
    padding: 12px 0 40px;
}

body.search-page .search-main-inner {
    max-width: none;
    margin: 0;
    padding: 8px 24px 48px 176px;
    display: grid;
    grid-template-columns: minmax(0, 652px);
    grid-template-areas:
        "filters"
        "results"
        "aside";
    justify-content: start;
    gap: 12px 48px;
}

body.search-page .search-main-inner > .clear {
    display: none;
}

@media (min-width: 1100px) {
    body.search-page .search-main-inner:has(#rightPanels .entity) {
        grid-template-columns: 652px 368px;
        grid-template-areas:
            "filters aside"
            "results aside";
        align-items: start;
    }
}

@media (min-width: 720px) and (max-width: 1099px) {
    body.search-page .search-main-inner:has(#rightPanels .entity) {
        grid-template-columns: minmax(0, 520px) 260px;
        grid-template-areas:
            "filters aside"
            "results aside";
        align-items: start;
    }
}

@media (max-width: 719px) {
    body.search-page .search-main-inner,
    body.search-page .search-main-inner:has(#rightPanels .entity) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "filters"
            "aside"
            "results";
    }
}

body.search-page #filters {
    grid-area: filters;
    width: 100% !important;
    margin: 0;
    float: none !important;
}

body.search-page #content,
body.search-page #content.col{
    grid-area: results;
    float: none !important;
    width: 1200px !important;
    margin-left: 0;
    padding: 0;
    box-sizing: border-box;
}

body.search-page #content.col.l9 {
    grid-area: results;
    float: none !important;
    width: 752px !important;
    margin-left: 0;
    padding: 0;
    box-sizing: border-box;
}

body.search-page #rightPanels,
body.search-page #rightPanels.col,
body.search-page #rightPanels.col.l3 {
    grid-area: aside;
    float: none !important;
    width: 100% !important;
    margin-left: 0;
    padding: 0;
    box-sizing: border-box;
	float: right; /* Aligne le bloc à droite et fait défiler le texte autour */
    margin-left: 115px; /* Ajoute un espace pour que le texte ne colle pas */
}

body.search-page #content > .card1 {
    background: transparent;
    box-shadow: none;
    margin: 0;
}

body.search-page #content > .card > .card-content {
    padding: 0;
}

body.search-page .result-container {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px 12px;
    margin-bottom: 12px !important;
    box-shadow: 0 1px 4px rgba(15, 40, 80, 0.06);
}

body.search-page .result-container .title {
    line-height: 1.35;
    margin-bottom: 2px;
}

body.search-page .result-container .desc {
    color: #475569;
    line-height: 1.45;
    margin-top: 4px;
}

body.search-page .results-info {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin: 0 0 10px;
}

body.search-page .widget {
    margin-bottom: 12px !important;
}

body.search-page .widget .row,
body.search-page .entities.widget {
    margin-bottom: 0;
}

body.search-page .entities {
    display: block;
    margin: 0;
}

body.search-page .entity {
    display: block;
    flex: none;
}

body.search-page .entity .card {
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(15, 40, 80, 0.08);
    margin: 0;
}

body.search-page .entity .card-content {
    padding: 16px 18px 14px;
}

body.search-page .entity img {
    float: none;
    width: 100%;
    height: auto;
    max-height: 285px;
    object-fit: cover;
    margin: 0 0 12px;
    border-radius: 8px;
}

body.search-page .entity .title h3,
body.search-page .entity h3 {
    font-size: 22px;
    line-height: 1.25;
    margin: 0 0 8px;
}

body.search-page .entity-type,
body.search-page .entity .entity-type {
    display: none;
}

body.search-page #tools {
    display: none !important;
}

body.search-page #toolsCard {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    transform: none !important;
}

body.search-page #ads[style*="display:none"] {
    display: none !important;
}

body.search-page .result-container .title,
body.search-page .result-container .desc,
body.search-page .result-container .disurl {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.search-page .og-grid {
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 900px) {
    body.search-page .search-header-inner {
        flex-wrap: nowrap;
        padding: 14px 12px 16px;
        gap: 10px;
    }

    body.search-page .search-logo {
        flex: 0 0 auto;
        width: auto;
        justify-content: flex-start;
    }

    body.search-page .search-logo img {
        height: 32px;
        max-width: 72px;
    }

    body.search-page .search-header .search-form {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    body.search-page .search-actions {
        display: none;
    }

    body.search-page .button-collapse.fixed-action-btn {
        display: block !important;
        position: absolute !important;
        top: 14px;
        right: 12px;
        bottom: auto !important;
        left: auto;
        z-index: 50;
    }

    body.search-page .button-collapse .btn-floating {
        background: #fff !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    }

    body.search-page .search-header-inner {
        padding-right: 56px;
    }

    body.search-page .search-header .search-wrapper,
    body.search-page .search-header .search-wrapper input.search,
    body.search-page .search-header .search-wrapper input.search:focus {
        height: 42px !important;
    }

    body.search-page .search-header .search-wrapper input.search,
    body.search-page .search-header .search-wrapper input.search:focus {
        padding-right: 84px !important;
    }

    body.search-page .search-tabs-inner {
        padding: 0 12px;
    }

    body.search-page .search-tabs-spacer {
        display: none;
    }

    body.search-page .tabs-menu {
        padding: 0;
        height: 42px;
    }

    body.search-page .tabs-menu .tab {
        min-width: 64px;
        padding: 0 12px;
        height: 42px;
        line-height: 42px;
    }

    body.search-page .search-main-inner {
        padding: 8px 12px 40px;
        gap: 10px;
        grid-template-columns: minmax(0, 1fr);
    }

    body.search-page .entity h3 {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    body.search-page .search-actions {
        display: none;
    }

    body.search-page .button-collapse.fixed-action-btn {
        display: block !important;
        position: absolute !important;
        top: 14px;
        right: 10px;
        bottom: auto !important;
        left: auto;
        z-index: 50;
    }

    body.search-page .button-collapse .btn-floating {
        background: #fff !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    }

    body.search-page .search-header-inner {
        padding-right: 56px;
    }

    body.search-page .result-container {
        padding: 12px;
    }

    body.search-page .result-container .title {
        font-size: 18px;
    }
}

/* Inner pages (preferences, login, advertise, etc.) */
body.inner-page .inner-main {
    width: 100%;
    max-width: 960px;
    margin: 24px auto 48px;
    padding: 0 20px;
    box-sizing: border-box;
    flex: 0 0 auto;
}

body.inner-page .block-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px;
}

body.inner-page .block {
    margin-bottom: 20px;
}

body.inner-page .block .card {
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(15, 40, 80, 0.06);
}

body.inner-page .left-side .collection {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 40, 80, 0.06);
}

/* Sidebar + form only on pages that actually have a left menu */
body.inner-page .form_page:has(.left-side),
body.inner-page .form_page:has(.left-side) .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.inner-page .form_page:has(.left-side) .container {
    display: flex;
    align-items: flex-start;
}

body.inner-page .form_page:has(.left-side) .left-side,
body.inner-page .form_page:has(.left-side) .col.m4.left-side {
    float: none !important;
    width: 240px !important;
    margin-right: 28px;
    box-sizing: border-box;
}

body.inner-page .form_page:has(.left-side) > .container > .col.m8,
body.inner-page .form_page:has(.left-side) .container > .col.m8 {
    float: none !important;
    width: calc(100% - 268px) !important;
    box-sizing: border-box;
}

@media (max-width: 720px) {
    body.inner-page .form_page:has(.left-side) .container {
        display: block;
    }

    body.inner-page .form_page:has(.left-side) .left-side,
    body.inner-page .form_page:has(.left-side) .col.m4.left-side,
    body.inner-page .form_page:has(.left-side) .container > .col.m8 {
        width: 100% !important;
        margin: 0 0 16px;
    }
}

/* Submit your site */
body.inner-page .submit-page {
    display: flex;
    justify-content: center;
    padding: 4px 0 16px;
}

body.inner-page .submit-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 32px rgba(15, 40, 80, 0.08);
    padding: 36px 36px 28px;
    box-sizing: border-box;
}

body.inner-page .submit-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #e8f2fc;
    color: #1585ed;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

body.inner-page .submit-icon .jaafar {
    font-size: 28px;
    line-height: 1;
}

body.inner-page .submit-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
}

body.inner-page .submit-lead {
    margin: 0 0 24px;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: #475569;
}

body.inner-page .submit-form {
    margin: 0;
}

body.inner-page .submit-label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

body.inner-page .submit-input,
body.inner-page input.submit-input[type="email"],
body.inner-page input.submit-input[type="url"],
body.inner-page input.submit-input[type="text"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 46px !important;
    margin: 0 0 16px !important;
    padding: 0 14px !important;
    border: 1px solid #d5deea !important;
    border-bottom: 1px solid #d5deea !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    box-shadow: none !important;
    font-size: 15px;
    color: #0f172a;
}

body.inner-page .submit-input:focus,
body.inner-page input.submit-input[type="email"]:focus,
body.inner-page input.submit-input[type="url"]:focus {
    outline: none;
    border-color: #1585ed !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(21, 133, 237, 0.15) !important;
}

body.inner-page .submit-hint {
    margin: -10px 0 18px;
    font-size: 12px;
    color: #64748b;
}

body.inner-page .submit-btn {
    display: block;
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: #1585ed;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 2px 0 #0e61ae;
}

body.inner-page .submit-btn:hover,
body.inner-page .submit-btn:focus {
    background: #1276d4;
}

body.inner-page .submit-alert {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
}

body.inner-page .submit-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

body.inner-page .submit-alert-ok {
    background: #dcfce7;
    color: #166534;
}

body.inner-page .submit-notes {
    list-style: none;
    margin: 22px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid #e8eef5;
}

body.inner-page .submit-notes li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 13px;
    color: #64748b;
}

body.inner-page .submit-notes li:last-child {
    margin-bottom: 0;
}

body.inner-page .submit-notes .jaafar {
    font-size: 18px;
    color: #1585ed;
}

@media (max-width: 560px) {
    body.inner-page .submit-card {
        padding: 28px 20px 22px;
        border-radius: 14px;
    }

    body.inner-page .submit-title {
        font-size: 22px;
    }
}
