/* ==========================================================
   MGM JOUET - CSS FRONT DU PLUGIN
   ==========================================================

   Shortcodes :
   - [mgm_produits]
   - [mgm_notices]
   - [mgm_catalogues]
   - [mgm_presse]
   - [mgm_videos]

   ========================================================== */

/* ==========================================================
   1. BASE COMMUNE
   ========================================================== */

.mgm-notices,
.mgm-produits-grid,
.mgm-catalogues-grid,
.mgm-content-grid,
.mgm-content-groups {
    box-sizing: border-box;
    width: 100%;
}

.mgm-notices *,
.mgm-produits-grid *,
.mgm-catalogues-grid *,
.mgm-content-grid *,
.mgm-content-groups * {
    box-sizing: border-box;
}

/* ==========================================================
   2. GROUPES PAR MARQUE
   ========================================================== */

.mgm-content-groups {
    display: grid;
    gap: 32px;
    padding-left: 32px;
    padding-right: 32px;
}

.mgm-content-group {
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 24px;
    padding: 40px 36px;
}

.mgm-content-group__logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 34px;
}

.mgm-content-group__logo img {
    max-width: 220px;
    max-height: 95px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mgm-content-group__title {
    display: none;
}

.mgm-content-group__grid {
    display: grid;
    gap: 28px;
}

/* ==========================================================
   3. CARTES COMMUNES
   ========================================================== */

.mgm-card {
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 18px;
    padding: 24px;
    text-align: center;
    overflow: hidden;
}

.mgm-card__image,
.mgm-card img {
    display: block;
    max-width: 100%;
}

.mgm-card__image {
    width: 100%;
    height: 190px;
    object-fit: contain;
    margin-bottom: 18px;
}

.mgm-card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mgm-card__title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.mgm-card__meta {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.75;
}

.mgm-card__excerpt {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
}

.mgm-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: max-content;
    min-height: 34px;
    padding: 7px 22px;
    border-radius: 999px;
    background-color: #345396;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.mgm-card__button:hover {
    background-color: #243f7a;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
}

/* ==========================================================
   4. PRODUITS - SHORTCODE [mgm_produits]
   ========================================================== */

.mgm-produits-grid,
.mgm-content-groups--produits .mgm-content-group__grid {
    display: grid;
    grid-template-columns: repeat(var(--mgm-columns, 3), minmax(0, 1fr));
    gap: 28px;
}

.mgm-content-groups--produits {
    grid-template-columns: 1fr;
}

.mgm-card--produit .mgm-card__image {
    height: 210px;
    object-fit: contain;
}

/* ==========================================================
   5. NOTICES - SHORTCODE [mgm_notices]
   ========================================================== */

.mgm-notices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 400px));
    justify-content: center;
    gap: 32px;
    padding-left: 32px;
    padding-right: 32px;
}

.mgm-notices__brand {
    width: 100%;
    max-width: 400px;
    border: 1px solid #d9d9d9;
    border-radius: 20px;
    padding: 32px 28px;
    background: #ffffff;
    text-align: center;
}

.mgm-notices__brand-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    margin-bottom: 26px;
}

.mgm-notices__brand-logo img {
    max-width: 180px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mgm-notices__brand-title {
    display: none;
}

.mgm-notices__list,
.mgm-notices__cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mgm-notice-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    column-gap: 18px;
    width: 100%;
    min-height: 118px;
    padding: 18px;
    border: 1px solid #d9d9d9;
    border-radius: 20px;
    background: #f8f8f8;
    text-align: left;
}

.mgm-notice-card__image {
    width: 92px;
    height: 92px;
    object-fit: contain;
    display: block;
}

.mgm-notice-card__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
}

.mgm-notice-card__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: inherit;
}

.mgm-notice-card__reference {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.25;
    opacity: 0.8;
}

.mgm-notice-card__button {
    display: inline-flex;
    width: auto;
    max-width: max-content;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 20px;
    border-radius: 999px;
    background-color: #345396;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.mgm-notice-card__button:hover {
    background-color: #243f7a;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.85;
}

/* ==========================================================
   6. CATALOGUES - SHORTCODE [mgm_catalogues]
   ========================================================== */

.mgm-catalogues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
    justify-content: center;
    gap: 32px;
    padding-left: 32px;
    padding-right: 32px;
}

.mgm-catalogues-grid .mgm-card {
    max-width: 320px;
    width: 100%;
    padding: 26px 24px;
}

.mgm-catalogues-grid .mgm-card__image {
    height: 210px;
    object-fit: contain;
}

/* ==========================================================
   7. PRESSE - SHORTCODE [mgm_presse]
   ========================================================== */

.mgm-content-groups--presse {
    grid-template-columns: repeat(auto-fit, minmax(380px, 560px));
    justify-content: center;
    align-items: start;
}

.mgm-content-groups--presse .mgm-content-group {
    width: 100%;
    max-width: 560px;
    padding: 44px 38px;
}

.mgm-content-groups--presse .mgm-content-group__logo {
    margin-bottom: 38px;
}

.mgm-content-groups--presse .mgm-content-group__grid {
    grid-template-columns: 1fr;
    gap: 34px;
}

.mgm-content-groups--presse .mgm-card--presse {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    column-gap: 26px;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    text-align: left;
    overflow: visible;
}

.mgm-content-groups--presse .mgm-card--presse .mgm-card__image {
    width: 120px;
    height: 120px;
    min-width: 120px;
    margin: 0;
    object-fit: contain;
    border: none;
    background: transparent;
}

.mgm-content-groups--presse .mgm-card--presse .mgm-card__content {
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
}

.mgm-content-groups--presse .mgm-card--presse .mgm-card__title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.mgm-card__title--presse {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mgm-content-groups--presse .mgm-card--presse .mgm-card__meta {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.35;
    opacity: 0.65;
}

.mgm-content-groups--presse .mgm-card--presse .mgm-card__excerpt {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.4;
}

.mgm-content-groups--presse .mgm-card--presse .mgm-card__button {
    min-height: 32px;
    padding: 6px 24px;
    font-size: 14px;
}

/* ==========================================================
   8. VIDEOS - SHORTCODE [mgm_videos]
   ========================================================== */

.mgm-content-groups--videos {
    grid-template-columns: repeat(auto-fit, minmax(360px, 680px));
    justify-content: center;
    align-items: start;
}

.mgm-content-groups--videos .mgm-content-group {
    width: 100%;
    max-width: 680px;
}

.mgm-content-groups--videos .mgm-content-group__grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.mgm-content-groups--videos .mgm-card__image {
    height: 150px;
    object-fit: cover;
}

/* ==========================================================
   9. RESPONSIVE
   ========================================================== */

@media (max-width: 1024px) {
    .mgm-produits-grid,
    .mgm-content-groups--produits .mgm-content-group__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mgm-notices {
        grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
    }

    .mgm-content-groups--presse {
        grid-template-columns: repeat(auto-fit, minmax(340px, 520px));
    }
}

@media (max-width: 767px) {
    .mgm-notices,
    .mgm-catalogues-grid,
    .mgm-content-groups {
        grid-template-columns: 1fr;
        padding-left: 20px;
        padding-right: 20px;
    }

    .mgm-produits-grid,
    .mgm-content-groups--produits .mgm-content-group__grid {
        grid-template-columns: 1fr;
    }

    .mgm-content-group,
    .mgm-content-groups--presse .mgm-content-group {
        max-width: 100%;
        padding: 34px 22px;
    }

    .mgm-notices__brand {
        max-width: 100%;
        padding: 28px 22px;
    }

    .mgm-notice-card {
        grid-template-columns: 76px minmax(0, 1fr);
        column-gap: 14px;
        min-height: 100px;
        padding: 14px;
    }

    .mgm-notice-card__image {
        width: 76px;
        height: 76px;
    }

    .mgm-notice-card__title {
        font-size: 14px;
    }

    .mgm-notice-card__reference {
        font-size: 13px;
        margin-bottom: 9px;
    }

    .mgm-notice-card__button {
        font-size: 12px;
        padding: 6px 16px;
    }

    .mgm-content-groups--presse .mgm-card--presse {
        grid-template-columns: 90px minmax(0, 1fr);
        column-gap: 16px;
    }

    .mgm-content-groups--presse .mgm-card--presse .mgm-card__image {
        width: 90px;
        height: 90px;
        min-width: 90px;
    }

    .mgm-content-groups--presse .mgm-card--presse .mgm-card__title {
        font-size: 15px;
    }

    .mgm-content-groups--presse .mgm-card--presse .mgm-card__button {
        font-size: 13px;
        padding: 6px 18px;
    }
}
