.cmpmc-wrapper {
    margin: 32px 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--cmpmc-text);
}

.cmpmc-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
}

.cmpmc-header h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    color: var(--cmpmc-text);
}

.cmpmc-header p {
    margin: 0;
    color: var(--cmpmc-muted);
    line-height: 1.6;
}

.cmpmc-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(220px, 1fr));
    gap: 18px;
    align-items: start;
}

.cmpmc-card {
    overflow: hidden;
    border: 1px solid var(--cmpmc-border);
    border-radius: var(--cmpmc-radius);
    background: var(--cmpmc-surface);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.cmpmc-card-header {
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--cmpmc-primary), var(--cmpmc-primary-dark));
    color: #fff;
}

.cmpmc-day {
    display: block;
    font-size: 18px;
    font-weight: 700;
    text-transform: capitalize;
}

.cmpmc-date {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.95;
}

.cmpmc-card-body {
    padding: 16px 18px;
}

.cmpmc-category {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--cmpmc-border);
}

.cmpmc-category:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.cmpmc-category h3 {
    margin: 0 0 8px;
    color: var(--cmpmc-primary-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cmpmc-items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cmpmc-items li {
    margin-bottom: 10px;
}

.cmpmc-items li:last-child {
    margin-bottom: 0;
}

.cmpmc-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.cmpmc-main {
    display: inline-block;
    font-weight: 650;
    line-height: 1.45;
}

.cmpmc-items small {
    display: block;
    margin-top: 4px;
    margin-left: 28px;
    color: var(--cmpmc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.cmpmc-option {
    margin-top: 8px;
    margin-left: 28px;
    padding: 9px 10px;
    border-left: 3px solid var(--cmpmc-primary);
    border-radius: 10px;
    background: #f8fafc;
    font-size: 13px;
}

.cmpmc-option .cmpmc-line strong {
    margin-right: 4px;
}

.cmpmc-empty {
    color: var(--cmpmc-muted);
}

.cmpmc-veggie {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.cmpmc-veggie img {
    width: 18px;
    height: 18px;
    display: block;
}

.cmpmc-veggie:empty {
    display: none;
}

.cmpmc-alert {
    margin: 20px 0;
    padding: 16px 18px;
    border: 1px solid #f5d7a1;
    border-radius: 12px;
    background: #fff8f0;
    color: #7a4a00;
}

.cmpmc-table-scroll {
    overflow-x: auto;
    border: 1px solid var(--cmpmc-border);
    border-radius: var(--cmpmc-radius);
    background: var(--cmpmc-surface);
}

.cmpmc-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.cmpmc-table th,
.cmpmc-table td {
    padding: 16px;
    border-bottom: 1px solid var(--cmpmc-border);
    vertical-align: top;
    text-align: left;
}

.cmpmc-table th {
    color: var(--cmpmc-primary-dark);
    background: #f5f8f9;
    font-weight: 800;
}

.cmpmc-daycell strong {
    display: block;
    text-transform: capitalize;
}

.cmpmc-daycell span {
    display: block;
    margin-top: 4px;
    color: var(--cmpmc-muted);
    font-size: 13px;
}

@media (max-width: 1280px) {
    .cmpmc-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
}

@media (max-width: 900px) {
    .cmpmc-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}

@media (max-width: 640px) {
    .cmpmc-wrapper { padding: 16px; }
    .cmpmc-grid { grid-template-columns: 1fr; }
    .cmpmc-card-header, .cmpmc-card-body { padding: 14px 16px; }
}


.cmpmc-header > div:first-child {
    max-width: 760px;
}

.cmpmc-actions {
    flex: 0 0 auto;
}

.cmpmc-pdf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--cmpmc-primary);
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .18s ease, opacity .18s ease;
}

.cmpmc-pdf-button:hover,
.cmpmc-pdf-button:focus {
    color: #fff;
    opacity: .92;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .cmpmc-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .cmpmc-actions,
    .cmpmc-pdf-button {
        width: 100%;
    }
}


/* Menu hebdomadaire propre */
.cmpmc-week-menu {
    overflow: hidden;
    border: 1px solid var(--cmpmc-border);
    border-radius: var(--cmpmc-radius);
    background: var(--cmpmc-surface);
}

.cmpmc-week-top {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: linear-gradient(135deg, var(--cmpmc-primary), var(--cmpmc-primary-dark));
    color: #fff;
    text-align: center;
}

.cmpmc-week-top h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
    font-weight: 800;
}

.cmpmc-week-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--cmpmc-primary-dark);
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
    transition: transform .18s ease, opacity .18s ease;
}

.cmpmc-week-arrow:hover,
.cmpmc-week-arrow:focus {
    color: var(--cmpmc-primary-dark);
    transform: translateY(-1px);
}

.cmpmc-week-arrow.is-disabled {
    opacity: .35;
}

.cmpmc-week-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
}

.cmpmc-week-day {
    min-height: 560px;
    padding: 26px 24px;
    border-right: 1px solid var(--cmpmc-border);
    background: #fff;
}

.cmpmc-week-day:last-child {
    border-right: 0;
}

.cmpmc-week-day.is-soft {
    background: color-mix(in srgb, var(--cmpmc-primary) 8%, #fff);
}

.cmpmc-week-day header {
    margin-bottom: 18px;
}

.cmpmc-week-day header strong {
    display: block;
    color: var(--cmpmc-text);
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
}

.cmpmc-week-day header span {
    display: block;
    margin-top: 6px;
    color: var(--cmpmc-muted);
    font-size: 13px;
    font-weight: 700;
}

.cmpmc-week-foods {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cmpmc-week-foods li {
    position: relative;
    margin: 0 0 15px;
    padding: 0;
    color: var(--cmpmc-muted);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 500;
}

.cmpmc-week-foods li:last-child {
    margin-bottom: 0;
}

.cmpmc-week-foods .cmpmc-veggie {
    vertical-align: -3px;
    margin-right: 6px;
}

.cmpmc-food-name {
    color: var(--cmpmc-muted);
}

.cmpmc-food-detail {
    display: block;
    margin-top: 2px;
    color: var(--cmpmc-muted);
    font-size: 14px;
    line-height: 1.45;
}

.cmpmc-food-prefix {
    display: block;
    margin-bottom: 2px;
    color: var(--cmpmc-text);
    font-size: 13px;
    font-weight: 800;
}

.cmpmc-food-option {
    margin-top: 18px !important;
}

.cmpmc-week-empty {
    margin: 0;
    color: var(--cmpmc-muted);
    font-style: italic;
}

@media (max-width: 1100px) {
    .cmpmc-week-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cmpmc-week-day {
        min-height: auto;
        border-bottom: 1px solid var(--cmpmc-border);
    }
}

@media (max-width: 700px) {
    .cmpmc-week-top {
        grid-template-columns: 38px 1fr 38px;
        gap: 10px;
        padding: 18px 14px;
    }

    .cmpmc-week-top h3 {
        font-size: 22px;
    }

    .cmpmc-week-arrow {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .cmpmc-week-grid {
        grid-template-columns: 1fr;
    }

    .cmpmc-week-day {
        padding: 22px 18px;
        border-right: 0;
    }

    .cmpmc-week-day header strong {
        font-size: 20px;
    }

    .cmpmc-week-foods li {
        font-size: 15px;
        line-height: 1.55;
    }
}


/* Version 1.7.0 : suppression de l'encadré global autour du plugin */
.cmpmc-wrapper {
    box-shadow: none !important;
}

.cmpmc-header {
    padding: 0;
}

.cmpmc-week-menu {
    box-shadow: none;
}

.cmpmc-table-scroll {
    box-shadow: none;
}


/* Layout table amélioré : jours en colonnes, catégories en lignes */
.cmpmc-clean-table {
    overflow: hidden;
    border: 1px solid var(--cmpmc-border);
    border-radius: var(--cmpmc-radius);
    background: var(--cmpmc-surface);
}

.cmpmc-clean-table-top {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--cmpmc-primary), var(--cmpmc-primary-dark));
    color: #fff;
    text-align: center;
}

.cmpmc-clean-table-top h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.15;
    font-weight: 800;
}

.cmpmc-clean-table-scroll {
    overflow-x: auto;
}

.cmpmc-clean-table table {
    width: 100%;
    min-width: 1060px;
    border-collapse: collapse;
    table-layout: fixed;
}

.cmpmc-clean-table th,
.cmpmc-clean-table td {
    padding: 18px 16px;
    border-right: 1px solid var(--cmpmc-border);
    border-bottom: 1px solid var(--cmpmc-border);
    vertical-align: top;
    text-align: left;
}

.cmpmc-clean-table tr:last-child th,
.cmpmc-clean-table tr:last-child td {
    border-bottom: 0;
}

.cmpmc-clean-table th:last-child,
.cmpmc-clean-table td:last-child {
    border-right: 0;
}

.cmpmc-clean-table thead th {
    background: #f8fafc;
    color: var(--cmpmc-text);
}

.cmpmc-clean-table thead th strong {
    display: block;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 800;
}

.cmpmc-clean-table thead th span {
    display: block;
    margin-top: 5px;
    color: var(--cmpmc-muted);
    font-size: 13px;
    font-weight: 600;
}

.cmpmc-clean-table-category-head,
.cmpmc-clean-table-category {
    width: 150px;
}

.cmpmc-clean-table-category {
    background: color-mix(in srgb, var(--cmpmc-primary) 8%, #fff);
    color: var(--cmpmc-primary-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.cmpmc-clean-table-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cmpmc-clean-table-list li {
    margin: 0 0 12px;
}

.cmpmc-clean-table-list li:last-child {
    margin-bottom: 0;
}

.cmpmc-clean-table-main {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--cmpmc-text);
    font-weight: 700;
    line-height: 1.45;
}

.cmpmc-clean-table-list small {
    display: block;
    margin: 4px 0 0 25px;
    color: var(--cmpmc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.cmpmc-clean-table-option {
    margin-top: 8px;
    margin-left: 25px;
    padding: 8px 10px;
    border-left: 3px solid var(--cmpmc-primary);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--cmpmc-text);
    font-size: 13px;
    line-height: 1.45;
}

.cmpmc-clean-table-option .cmpmc-veggie {
    margin-right: 6px;
    vertical-align: -4px;
}

.cmpmc-table-empty {
    color: var(--cmpmc-muted);
}

@media (max-width: 700px) {
    .cmpmc-clean-table-top {
        grid-template-columns: 38px 1fr 38px;
        gap: 10px;
        padding: 18px 14px;
    }

    .cmpmc-clean-table-top h3 {
        font-size: 21px;
    }

    .cmpmc-clean-table table {
        min-width: 900px;
    }

    .cmpmc-clean-table th,
    .cmpmc-clean-table td {
        padding: 14px 12px;
    }
}


/* Version 1.9.0 : aliments et options au même niveau visuel */
.cmpmc-main,
.cmpmc-clean-table-main,
.cmpmc-clean-table-main span,
.cmpmc-food-name,
.pdf-main {
    font-weight: 500 !important;
}

.cmpmc-clean-table-main {
    align-items: flex-start;
    color: var(--cmpmc-text);
    line-height: 1.5;
}

.cmpmc-clean-table-list li {
    margin-bottom: 10px;
}

.cmpmc-clean-table-list small {
    margin-left: 25px;
}

.cmpmc-clean-table-option,
.cmpmc-option,
.pdf-option {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: inherit !important;
}

.cmpmc-food-prefix {
    display: none !important;
}

.cmpmc-food-option {
    margin-top: 0 !important;
}

.cmpmc-week-foods li {
    font-weight: 500 !important;
}

.cmpmc-category h3,
.cmpmc-clean-table-category {
    font-weight: 700 !important;
}


/* Stable v2.3.0 : weekly + table navigation */
.cmpmc-wrapper {
    box-shadow: none !important;
}

.cmpmc-week-menu,
.cmpmc-clean-table {
    overflow: hidden;
    border: 1px solid var(--cmpmc-border);
    border-radius: var(--cmpmc-radius);
    background: var(--cmpmc-surface);
}

.cmpmc-week-top,
.cmpmc-clean-table-top {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--cmpmc-primary), var(--cmpmc-primary-dark));
    color: #fff;
    text-align: center;
}

.cmpmc-week-top h3,
.cmpmc-clean-table-top h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.15;
    font-weight: 800;
}

.cmpmc-week-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--cmpmc-primary-dark);
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
}

.cmpmc-week-arrow:hover,
.cmpmc-week-arrow:focus {
    color: var(--cmpmc-primary-dark);
}

.cmpmc-week-arrow.is-disabled {
    opacity: .35;
}

.cmpmc-week-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cmpmc-week-day {
    min-height: 520px;
    padding: 24px 22px;
    border-right: 1px solid var(--cmpmc-border);
    background: #fff;
}

.cmpmc-week-day:last-child {
    border-right: 0;
}

.cmpmc-week-day.is-soft {
    background: color-mix(in srgb, var(--cmpmc-primary) 7%, #fff);
}

.cmpmc-week-day header {
    margin-bottom: 18px;
}

.cmpmc-week-day header strong {
    display: block;
    color: var(--cmpmc-text);
    font-size: 21px;
    line-height: 1.2;
    font-weight: 800;
}

.cmpmc-week-day header span {
    display: block;
    margin-top: 6px;
    color: var(--cmpmc-muted);
    font-size: 13px;
    font-weight: 700;
}

.cmpmc-week-foods,
.cmpmc-clean-table-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cmpmc-week-foods li,
.cmpmc-clean-table-list li {
    margin: 0 0 12px;
    color: var(--cmpmc-text);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
}

.cmpmc-food-name,
.cmpmc-clean-table-main span,
.cmpmc-main {
    font-weight: 500 !important;
}

.cmpmc-food-detail,
.cmpmc-clean-table-list small {
    display: block;
    margin-top: 3px;
    color: var(--cmpmc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.cmpmc-clean-table-scroll {
    overflow-x: auto;
}

.cmpmc-clean-table table {
    width: 100%;
    min-width: 1060px;
    border-collapse: collapse;
    table-layout: fixed;
}

.cmpmc-clean-table th,
.cmpmc-clean-table td {
    padding: 18px 16px;
    border-right: 1px solid var(--cmpmc-border);
    border-bottom: 1px solid var(--cmpmc-border);
    vertical-align: top;
    text-align: left;
}

.cmpmc-clean-table th:last-child,
.cmpmc-clean-table td:last-child {
    border-right: 0;
}

.cmpmc-clean-table tr:last-child th,
.cmpmc-clean-table tr:last-child td {
    border-bottom: 0;
}

.cmpmc-clean-table thead th {
    background: #f8fafc;
    color: var(--cmpmc-text);
}

.cmpmc-clean-table thead th strong {
    display: block;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 800;
}

.cmpmc-clean-table thead th span {
    display: block;
    margin-top: 5px;
    color: var(--cmpmc-muted);
    font-size: 13px;
    font-weight: 600;
}

.cmpmc-clean-table-category-head,
.cmpmc-clean-table-category {
    width: 150px;
}

.cmpmc-clean-table-category {
    background: color-mix(in srgb, var(--cmpmc-primary) 8%, #fff);
    color: var(--cmpmc-primary-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.cmpmc-clean-table-main {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--cmpmc-text);
    line-height: 1.5;
}

.cmpmc-clean-table-list small {
    margin-left: 25px;
}

.cmpmc-table-empty,
.cmpmc-week-empty {
    color: var(--cmpmc-muted);
}

@media (max-width: 1100px) {
    .cmpmc-week-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cmpmc-week-day {
        min-height: auto;
        border-bottom: 1px solid var(--cmpmc-border);
    }
}

@media (max-width: 700px) {
    .cmpmc-week-top,
    .cmpmc-clean-table-top {
        grid-template-columns: 38px 1fr 38px;
        gap: 10px;
        padding: 18px 14px;
    }

    .cmpmc-week-top h3,
    .cmpmc-clean-table-top h3 {
        font-size: 21px;
    }

    .cmpmc-week-arrow {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .cmpmc-week-grid {
        grid-template-columns: 1fr;
    }

    .cmpmc-week-day {
        padding: 22px 18px;
        border-right: 0;
    }

    .cmpmc-clean-table table {
        min-width: 900px;
    }
}
