/* ==========================================================================
   Mojo Horizon Widgets — Shared Styles
   Uses CSS variables from the child theme (custom.css)
   ========================================================================== */

/* Force full-width on all MJ widgets */
[class*="elementor-widget-mj-"] > .elementor-widget-container {
    max-width: none !important;
}

/* Base typography for all MJ widgets */
[class*="elementor-widget-mj-"] {
    font-family: 'Mulish', system-ui, sans-serif;
}

[class*="elementor-widget-mj-"] h1,
[class*="elementor-widget-mj-"] h2,
[class*="elementor-widget-mj-"] h3 {
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
}

/* Section container — no max-width here, the inner div handles it */
.mj-section {
    width: 100%;
}

/* Grid utilities */
.mj-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.mj-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.mj-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr));
}

/* Typography */
.mj-kicker {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.4;
}

.mj-heading {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.024em;
}

.mj-heading-xl {
    font-size: clamp(28px, 3.8vw, 48px);
    line-height: 1.08;
}

.mj-heading-lg {
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.1;
}

.mj-heading-md {
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.14;
    letter-spacing: -0.022em;
}

.mj-body {
    font-size: 19px;
    line-height: 1.78;
}

.mj-body p {
    margin: 0;
}

.mj-body-sm {
    font-size: 18px;
    line-height: 1.72;
}

.mj-exergue {
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 600;
    font-size: clamp(22px, 2.8vw, 34px);
    line-height: 1.3;
    max-width: 40ch;
}

/* Card base */
.mj-card {
    background: #FFFFFF;
    border: 1px solid rgba(84, 65, 75, .14);
    display: flex;
    flex-direction: column;
    color: #2A2025;
    text-decoration: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.mj-card:hover {
    box-shadow: 0 16px 40px rgba(84, 65, 75, .13);
}

/* Button base */
.mj-btn {
    display: inline-block;
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 700;
    border-radius: 2px;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: background-color 180ms ease;
}

.mj-btn-primary {
    background: #D89276;
    color: #54414B;
    font-size: 17.5px;
    padding: 21px 40px;
}

.mj-btn-primary:hover {
    background: #E2A78E;
    color: #54414B;
}

.mj-btn-green {
    background: #8C7B6E;
    color: #3D2E36;
    font-size: 16.5px;
    padding: 19px 36px;
}

.mj-btn-green:hover {
    background: #A08E80;
    color: #3D2E36;
}

.mj-btn-dark {
    background: #54414B;
    color: #F6F0E8;
    font-size: 16.5px;
    padding: 19px 36px;
}

.mj-btn-dark:hover {
    background: #3D2E36;
    color: #F6F0E8;
}

.mj-cta-subtext {
    font-size: 14.5px;
    color: #A8958D;
}

/* Offer card link */
.mj-card-link {
    margin-top: auto;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}

/* Offer card CTA button */
.mj-offer-link-text {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 2px;
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 700;
    font-size: 15px !important;
    color: #FFFFFF !important;
    text-decoration: none;
    transition: opacity 180ms ease;
}

.mj-card:hover .mj-offer-link-text {
    opacity: .88;
}

/* Texte + Exergue: styled list items */
.elementor-widget-mj-texte-exergue .mj-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 18px;
    line-height: 1.7;
}

.elementor-widget-mj-texte-exergue .mj-body li {
    border-left: 2px solid #D89276;
    padding-left: 14px;
    color: #54414B;
}

/* Text Block: bullet lists as cards — enabled via the "Listes à puces en cartes" switch */
.elementor-widget-mj-text-block.mj-list-cards-yes .mj-body ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 20px;
}

.elementor-widget-mj-text-block.mj-list-cards-yes .mj-body li {
    background: #FFFFFF;
    border-top: 4px solid #D89276;
    padding: 26px 26px 28px;
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    font-size: 19px;
    line-height: 1.4;
    color: #54414B;
}

/* Grid 2x2 (fixed 2 columns) */
.mj-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

/* Accordion (details/summary) */
.mj-accordion-item {
    border-top: 1px solid rgba(196, 179, 171, .25);
}

.mj-accordion-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
}

.mj-accordion-item summary::-webkit-details-marker {
    display: none;
}

.mj-accordion-item summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    transition: transform .2s;
}

.mj-accordion-item[open] summary::after {
    content: '\2212';
}

.mj-accordion-item .mj-accordion-content {
    padding: 0 0 24px;
    font-size: 17.5px;
    line-height: 1.7;
}

.mj-accordion-item .mj-accordion-content p {
    margin: 0 0 12px;
}

.mj-accordion-item .mj-accordion-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

/* Pertinence grid (2 columns) */
.mj-pertinence-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

/* Separator line (light bg) */
.mj-separator-light {
    border-top: 1px solid rgba(84, 65, 75, .12);
}

/* Separator line (dark bg) */
.mj-separator-dark {
    border-top: 1px solid rgba(196, 179, 171, .22);
}

/* ── Submenu styling: colored left borders ── */
.elementor-nav-menu .sub-menu,
.elementor-nav-menu--main .sub-menu,
.elementor-widget-nav-menu .sub-menu {
  background: #FFFFFF !important;
  border: 1px solid rgba(84,65,75,.14) !important;
  box-shadow: 0 18px 40px rgba(84,65,75,.16) !important;
  padding: 8px 0 !important;
}

.elementor-nav-menu .sub-menu li {
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-left: 3px solid transparent !important;
}

.elementor-nav-menu .sub-menu li > a {
  padding: 13px 22px !important;
  font-size: 15px !important;
  transition: background-color 150ms ease !important;
  display: block !important;
  color: #54414B !important;
  text-decoration: none !important;
}

.elementor-nav-menu .sub-menu li > a:hover {
  background: #F1EEE9 !important;
}

/* Reset active/current item in dropdown — keep white bg */
.elementor-nav-menu .sub-menu li.current-menu-item > a,
.elementor-nav-menu .sub-menu li.current-menu-item > a.elementor-item-active {
  background: transparent !important;
  color: #54414B !important;
}

.elementor-nav-menu .sub-menu li.current-menu-item > a:hover {
  background: #F1EEE9 !important;
}

/* Accompagnements (menu-item-25): Vision / Leadership / Talents */
.menu-item-25 > .sub-menu > li:nth-child(1) { border-left-color: #8C7B6E !important; }
.menu-item-25 > .sub-menu > li:nth-child(2) { border-left-color: #D89276 !important; }
.menu-item-25 > .sub-menu > li:nth-child(3) { border-left-color: #C17B8E !important; }

/* Fallback: target by individual menu-item ID */
li.menu-item-514 { border-left-color: #8C7B6E !important; }
li.menu-item-515 { border-left-color: #D89276 !important; }

/* Formations (menu-item-26): Leadership serein / Leadership mobilisateur */
.menu-item-26 > .sub-menu > li:nth-child(1) { border-left-color: #D89276 !important; }
.menu-item-26 > .sub-menu > li:nth-child(2) { border-left-color: #C17B8E !important; }

/* Header — force fixed position before Elementor JS kicks in */
.elementor-location-header > .e-con[data-settings*="fixed"] {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.admin-bar .elementor-location-header > .e-con[data-settings*="fixed"] {
    top: 32px;
}

/* Header shrink on scroll */
.elementor-location-header.mj-header-ready .e-con-inner {
    transition: margin .3s ease;
}

.mj-header-shrink {
    box-shadow: 0 2px 12px rgba(84, 65, 75, .08) !important;
}

.mj-header-shrink > .e-con > .e-con-inner {
    margin-top: -20px;
    margin-bottom: -20px;
}

/* Hide Contact menu item on desktop (visible in mobile burger) */
.elementor-nav-menu--main .menu-item-524 {
    display: none !important;
}

/* Responsive — Tablet */
@media (max-width: 991px) {
    .mj-section {
        padding-left: 24px;
        padding-right: 24px;
    }

    .mj-grid-2,
    .mj-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Responsive — Mobile */
@media (max-width: 767px) {
    .mj-grid-2,
    .mj-grid-3,
    .mj-grid-4,
    .mj-grid-2x2,
    .mj-pertinence-grid {
        grid-template-columns: 1fr !important;
    }

    [class*="elementor-widget-mj-"] .mj-body {
        text-align: center !important;
    }

    .mj-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Text Block: boxed column 2 — tighter padding so text isn't squeezed */
    .mj-col-boxed {
        padding: 26px 22px 28px !important;
    }

    /* Reduce vertical padding on all sections */
    [class*="elementor-widget-mj-"] .mj-section > div {
        padding-top: 64px !important;
        padding-bottom: 64px !important;
    }

    /* Center all text in MJ widget sections on mobile */
    [class*="elementor-widget-mj-"] .mj-section > div {
        text-align: center;
    }

    /* Stack and center flex headers on mobile */
    [class*="elementor-widget-mj-"] .mj-section div[style*="space-between"] {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
    }

    /* Center grid items on mobile (color-band, offer-cards, etc.) */
    .mj-grid-3 > div {
        align-items: center !important;
        text-align: center;
    }

    /* Center hero text column content on mobile */
    [class*="elementor-widget-mj-hero"] .mj-grid-2 > div:first-child {
        align-items: center !important;
    }

    /* Cap hero image height on mobile */
    [class*="elementor-widget-mj-hero"] .mj-grid-2 > div:last-child > div {
        min-height: 280px !important;
    }

    /* Keep left-aligned inside forms only */
    [class*="elementor-widget-mj-"] .mj-contact-form {
        text-align: left;
    }

    /* Exergue centered on mobile */
    .mj-exergue {
        max-width: none;
        text-align: center;
    }

    /* Exergue quote: remove border on mobile */
    .mj-exergue-quote {
        border-left: 0 !important;
        padding-left: 0 !important;
        text-align: center;
    }

    /* Buttons full-width on mobile */
    .mj-btn {
        display: block;
        width: 100%;
        text-align: center;
    }

    .mj-btn-primary {
        padding: 18px 32px;
        font-size: 16px;
    }

    .mj-btn-green,
    .mj-btn-dark {
        padding: 16px 28px;
    }

    /* Card padding reduced on mobile */
    .mj-card {
        padding: 32px 24px 28px !important;
    }

    .mj-card img {
        margin: -32px -24px 0 !important;
    }

    /* CTA subtext centered */
    .mj-cta-subtext {
        text-align: center;
    }

    /* Header shrink reduced on mobile */
    .mj-header-shrink > .e-con > .e-con-inner {
        margin-top: -12px;
        margin-bottom: -12px;
    }

    /* Show Contact in mobile burger */
    .menu-item-524 {
        display: list-item !important;
    }

    /* Push mobile menu dropdown below the navbar */
    .elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container.elementor-nav-menu__container.elementor-nav-menu__container.elementor-nav-menu__container {
        margin-top: 20px !important;
    }
}

/* ==========================================================================
   MJ Contact — Form + Coordinates
   ========================================================================== */

.mj-contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 56px;
    align-items: start;
}

/* Form fields */
.mj-contact-form label {
    display: block;
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 700;
    font-size: 14px;
    color: #F6F0E8;
    margin-bottom: 8px;
}

.mj-req {
    color: #D89276;
}

.mj-contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mj-field-group {
    margin-bottom: 20px;
}

.mj-contact-form input[type="text"],
.mj-contact-form input[type="email"],
.mj-contact-form input[type="tel"],
.mj-contact-form select,
.mj-contact-form textarea {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid rgba(84, 65, 75, .18);
    border-radius: 2px;
    padding: 16px 18px;
    font-family: 'Mulish', system-ui, sans-serif;
    font-size: 16px;
    color: #54414B;
    outline: none;
    transition: border-color 180ms ease;
    box-sizing: border-box;
}

.mj-contact-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2354414B' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
    cursor: pointer;
}

.mj-contact-form input::placeholder,
.mj-contact-form textarea::placeholder {
    color: #A8958D;
}

.mj-contact-form input:focus,
.mj-contact-form select:focus,
.mj-contact-form textarea:focus {
    border-color: #D89276;
}

.mj-contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.mj-contact-form .mj-btn {
    margin-top: 8px;
    cursor: pointer;
    border: none;
}

.mj-contact-form .mj-btn:disabled {
    opacity: .6;
    cursor: wait;
}

/* Status messages */
.mj-contact-status {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.5;
    min-height: 24px;
}

.mj-contact-success {
    color: #31A28A;
}

.mj-contact-error {
    color: #C17B8E;
}

/* Coordinate cards */
.mj-contact-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mj-contact-card {
    background: #FFFFFF;
    border: 1px solid rgba(84, 65, 75, .14);
    border-radius: 2px;
    padding: 24px 28px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.mj-contact-card-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 2px;
}

.mj-contact-card-label {
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 700;
    font-size: 15px;
    color: #54414B;
    margin-bottom: 4px;
}

.mj-contact-card-value {
    font-family: 'Mulish', system-ui, sans-serif;
    font-size: 16px;
    color: #6B5B62;
    line-height: 1.5;
}

.mj-contact-card-value a {
    color: inherit;
    text-decoration: none;
}

.mj-contact-card-value a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 991px) {
    .mj-contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 767px) {
    .mj-contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .mj-contact-row {
        grid-template-columns: 1fr;
    }
}
