.msp-app{--msp-accent:#a65d55;--msp-soft:#f8f2ef;--msp-text:#352f2c;--msp-muted:#756d68;--msp-border:#eaded8;max-width:1050px;margin:32px auto;color:var(--msp-text);font-family:inherit;box-sizing:border-box}.msp-app *{box-sizing:border-box}.msp-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:24px}.msp-heading h2{font-size:clamp(28px,4vw,42px);margin:2px 0 8px;line-height:1.1}.msp-eyebrow{font-size:12px;letter-spacing:.16em;font-weight:700;color:var(--msp-accent);margin:0}.msp-intro{color:var(--msp-muted);margin:0}.msp-dev-badge{font-size:12px;background:var(--msp-soft);border:1px solid var(--msp-border);padding:7px 10px;border-radius:999px;white-space:nowrap}.msp-panel{background:#fff;border:1px solid var(--msp-border);border-radius:18px;padding:24px;margin-bottom:22px}.msp-panel h3{margin:0 0 16px;font-size:21px}.msp-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.msp-fields label{font-size:14px;font-weight:650;min-width:0}.msp-fields label span{font-weight:400;color:var(--msp-muted)}.msp-fields input{box-sizing:border-box;width:100%;max-width:100%;margin-top:7px;border:1px solid #d9ceca;border-radius:10px;padding:12px 13px;font:inherit;font-size:16px;background:#fff;color:inherit;min-height:46px}.msp-fields input:focus,.msp-custom-period input:focus{outline:2px solid color-mix(in srgb,var(--msp-accent) 30%,transparent);border-color:var(--msp-accent)}.msp-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.msp-primary,.msp-secondary,.msp-edit,.msp-delete,.msp-period-buttons button{font:inherit;cursor:pointer;border-radius:10px;border:0;padding:11px 15px;min-height:44px}.msp-primary{background:var(--msp-accent);color:#fff;font-weight:700}.msp-secondary{background:#eee8e5;color:var(--msp-text)}.msp-help{font-size:13px;color:var(--msp-muted);margin:13px 0 0}.msp-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:22px}.msp-stats>div{background:var(--msp-soft);border:1px solid var(--msp-border);border-radius:15px;padding:17px;min-width:0}.msp-stats span{display:block;font-size:12px;color:var(--msp-muted);margin-bottom:6px}.msp-stats strong{font-size:21px;overflow-wrap:anywhere}.msp-chart-wrap{height:350px;position:relative}.msp-chart-wrap canvas{width:100%!important;max-width:100%}.msp-section-title h3{margin-bottom:3px}.msp-section-title p{margin:0 0 17px;color:var(--msp-muted);font-size:13px}.msp-chart-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;color:var(--msp-muted);padding:20px;background:rgba(255,255,255,.92);z-index:2}.msp-chart-empty.is-note{position:static;display:block;background:transparent;padding:8px 0 0;font-size:13px}.msp-period-controls{border-top:1px solid var(--msp-border);margin-top:18px;padding-top:16px}.msp-period-buttons{display:flex;gap:8px;flex-wrap:wrap}.msp-period-buttons button{background:var(--msp-soft);color:var(--msp-text);padding:8px 12px;font-size:13px;border:1px solid transparent}.msp-period-buttons button.is-active{background:var(--msp-accent);color:#fff}.msp-custom-period{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-top:14px;padding:14px;background:var(--msp-soft);border-radius:12px}.msp-custom-period[hidden]{display:none}.msp-custom-period label{font-size:13px;font-weight:650;min-width:150px;flex:1}.msp-custom-period input{display:block;width:100%;max-width:100%;margin-top:6px;border:1px solid #d9ceca;border-radius:9px;padding:10px 11px;font:inherit;font-size:16px;background:#fff;min-height:44px}.msp-table{width:100%;border-collapse:collapse}.msp-table th,.msp-table td{text-align:left;padding:13px 10px;border-bottom:1px solid var(--msp-border)}.msp-table th{font-size:12px;color:var(--msp-muted);text-transform:uppercase;letter-spacing:.05em}.msp-row-actions{text-align:right!important;white-space:nowrap}.msp-edit,.msp-delete{padding:7px 10px;background:transparent;font-size:13px;min-height:38px}.msp-edit{color:var(--msp-accent)}.msp-delete{color:#8c3d3d}.msp-empty{text-align:center;padding:38px}.msp-empty p{color:var(--msp-muted);margin-bottom:0}.msp-message{margin:0 0 15px;border-radius:10px}.msp-message.is-success,.msp-message.is-error{padding:11px 14px}.msp-message.is-success{background:#edf6ee}.msp-message.is-error{background:#faeeee}.msp-access-denied{max-width:700px;margin:50px auto;padding:25px;border:1px solid #eee;border-radius:14px;text-align:center}.msp-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
@media(max-width:900px){.msp-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.msp-chart-wrap{height:330px}}
@media(max-width:700px){.msp-app{margin:20px 0;width:100%}.msp-heading{display:block}.msp-dev-badge{display:inline-block;margin-top:13px}.msp-fields{grid-template-columns:1fr}.msp-panel{padding:18px;border-radius:14px}.msp-chart-wrap{height:290px}.msp-period-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.msp-period-buttons button{width:100%;padding:8px 6px}.msp-custom-period{display:grid;grid-template-columns:1fr 1fr}.msp-custom-period .msp-secondary{grid-column:1/-1;width:100%}.msp-row-actions{white-space:normal;display:flex;align-items:center;justify-content:flex-end;gap:4px}.msp-edit,.msp-delete{display:inline-flex;width:auto;align-items:center;justify-content:center;text-align:center;padding:6px 7px;min-height:36px}.msp-table th,.msp-table td{padding:8px 6px;vertical-align:middle}}
@media(max-width:430px){.msp-stats{grid-template-columns:1fr 1fr}.msp-stats strong{font-size:18px}.msp-period-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}.msp-custom-period{grid-template-columns:1fr}.msp-custom-period .msp-secondary{grid-column:auto}.msp-actions .msp-primary,.msp-actions .msp-secondary{width:100%}}

/* V1.0.3 : le panneau d'état ne doit jamais voiler le canvas lorsqu'il est masqué. */
.msp-chart-empty[hidden]{display:none!important}

/* V1.0.4 — placeholders clairement distincts des vraies valeurs. */
.msp-fields input::placeholder,
.msp-custom-period input::placeholder{
    color:#b8b8b8;
    opacity:1;
    font-weight:400;
}
.msp-fields input::-webkit-input-placeholder,
.msp-custom-period input::-webkit-input-placeholder{
    color:#b8b8b8;
    opacity:1;
    font-weight:400;
}

/* V1.0.4 — bloc de connexion PMS visible pour les visiteurs déconnectés. */
.msp-login-shell{
    max-width:1050px;
    margin:32px auto;
    padding:0 14px;
    box-sizing:border-box;
    color:#352f2c;
    font-family:inherit;
}
.msp-login-shell *{box-sizing:border-box}
.msp-login-card{
    max-width:540px;
    margin:0 auto;
    background:#fff;
    border:1px solid #d9d9d9;
    border-radius:14px;
    padding:24px;
    box-shadow:0 4px 16px rgba(0,0,0,.04);
    text-align:center;
}
.msp-login-card h3{
    margin:0 0 8px;
    font-size:17px;
    line-height:1.35;
    color:#352f2c;
}
.msp-login-card>p{
    margin:0 0 18px;
    color:#5f5752;
    font-size:14px;
    line-height:1.55;
}
.msp-pms-login{text-align:left}
.msp-pms-login form{margin:0 auto}
.msp-pms-login input[type="text"],
.msp-pms-login input[type="email"],
.msp-pms-login input[type="password"]{
    width:100%;
    max-width:100%;
    min-height:46px;
    font-size:16px;
}
.msp-pms-login input[type="submit"],
.msp-pms-login button[type="submit"]{
    min-height:44px;
}
.msp-login-fallback{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
}

/* V1.0.4 — historique plus compact et stable sur téléphone. */
@media(max-width:700px){
    .msp-table-wrap{overflow-x:visible}
    .msp-table{table-layout:fixed}
    .msp-table th:nth-child(1),.msp-table td:nth-child(1){width:38%}
    .msp-table th:nth-child(2),.msp-table td:nth-child(2){width:24%}
    .msp-table th:nth-child(3),.msp-table td:nth-child(3){width:38%}
    .msp-table th,.msp-table td{padding:8px 5px}
    .msp-row-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:2px 4px}
    .msp-edit,.msp-delete{padding:5px 4px;min-height:34px;font-size:12px}
    .msp-login-shell{margin:20px auto;padding:0 10px}
    .msp-login-card{padding:20px 14px;border-radius:12px}
}


/* V1.0.5 — introduction visible uniquement pour les visiteurs déconnectés. */
.msp-guest-heading{
    max-width:760px;
    margin:0 auto 24px;
    text-align:center;
}
.msp-guest-heading h2{
    margin:0 0 9px;
    color:#352f2c;
    font-size:clamp(28px,4vw,42px);
    line-height:1.1;
}
.msp-guest-intro{
    margin:0 0 6px;
    color:#5f5752;
    font-size:16px;
    line-height:1.55;
}
.msp-guest-login-text{
    margin:0;
    color:#756d68;
    font-size:14px;
    line-height:1.55;
}
@media(max-width:700px){
    .msp-guest-heading{margin-bottom:20px;padding:0 4px}
    .msp-guest-intro{font-size:15px}
    .msp-guest-login-text{font-size:13px}
}

/* V1.0.6 — correction du tableau Historique sur mobile.
 * Le <td> des actions doit rester une cellule de tableau : le passer en flex
 * réduisait sa largeur et créait une bordure verticale parasite. */
@media(max-width:700px){
    .msp-table th:nth-child(1),.msp-table td:nth-child(1){width:38%}
    .msp-table th:nth-child(2),.msp-table td:nth-child(2){width:24%}
    .msp-table th:nth-child(3),.msp-table td:nth-child(3){width:38%}
    .msp-row-actions{
        display:table-cell;
        width:38%;
        text-align:right!important;
        white-space:normal;
        vertical-align:middle;
    }
    .msp-row-actions .msp-edit,
    .msp-row-actions .msp-delete{
        display:inline-flex;
        vertical-align:middle;
        margin:1px 0 1px 2px;
    }
}

/* V1.0.8 — confidentialité plus discrète. */
.msp-privacy-box{margin-top:22px;padding:20px 22px;border:1px solid #eaded8;border-radius:14px;background:#fbf8f6;color:#5f5752;font-size:12px;line-height:1.55}
.msp-privacy-box h3{margin:0 0 10px;color:#352f2c;font-size:15px}
.msp-privacy-box p{margin:8px 0}
.msp-privacy-delete-link{appearance:none;border:0;background:none;padding:0;margin-top:7px;color:#9a5149;text-decoration:underline;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.msp-privacy-delete-link:hover{color:#743c36}
.msp-privacy-delete-link:disabled{opacity:.55;cursor:default}
.msp-deletion-status{font-weight:700;color:#526b4f}
@media(max-width:700px){.msp-privacy-box{padding:17px 16px}}
