.psc-wrap {
    max-width: 900px;
}
.psc-period {
    font-size: 1.05em;
    margin-bottom: 1.2em;
}
.psc-help {
    color: #555;
    font-size: 0.95em;
    margin-bottom: 1.5em;
}
.psc-glossary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em 1.5em;
    list-style: none;
    margin: 0 0 1.5em;
    padding: 0.6em 1em;
    background: #f0f6fb;
    border: 1px solid #cfe2f3;
    border-radius: 4px;
    font-size: 0.9em;
    color: #444;
}
.psc-child-name {
    margin-top: 2em;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 0.3em;
}
.psc-classe {
    font-weight: normal;
    color: #777;
    font-size: 0.7em;
}
.psc-month {
    margin-top: 1.4em;
    margin-bottom: 0.4em;
}
.psc-calendar {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1.2em;
}
.psc-calendar th,
.psc-calendar td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    text-align: center;
}
.psc-calendar th {
    background: #f5f5f5;
    font-weight: 600;
}
.psc-daylabel {
    text-align: left;
    white-space: nowrap;
}
.psc-cell input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}
.psc-cell.psc-ok {
    background: #d7f5d0;
    transition: background 0.6s ease;
}
.psc-add-child {
    max-width: 420px;
}
.psc-add-child label {
    display: block;
    margin-bottom: 0.6em;
}
.psc-add-child input[type="text"] {
    width: 100%;
    padding: 6px;
}
.psc-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
}
.psc-login form p {
    margin-bottom: 0.8em;
}

.psc-error {
    display: block;
    font-size: 0.75em;
    color: #b32d2e;
    margin-top: 4px;
    text-align: left;
    line-height: 1.3;
}
.psc-notice {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 1.2em;
}
.psc-notice-ok {
    background: #e6f5e6;
    border-left: 4px solid #46893f;
}
.psc-notice-err {
    background: #fbeaea;
    border-left: 4px solid #b32d2e;
}
.psc-toast {
    /* Centrée dans le viewport visible, pas dans la page : reste au
       même endroit quel que soit l'ascenseur, sans avoir à faire défiler. */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    max-width: min(90vw, 480px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
    animation: psc-toast-in .25s ease-out;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-right: 34px;
}
.psc-toast.psc-toast-hide {
    animation: psc-toast-out .3s ease-in forwards;
}
.psc-toast-text { flex: 1; }
.psc-toast-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: none;
    background: none;
    padding: 4px 7px;
    font-size: 1.1em;
    line-height: 1;
    color: inherit;
    opacity: .55;
    cursor: pointer;
    border-radius: 3px;
}
.psc-toast-close:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
@keyframes psc-toast-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes psc-toast-out {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to   { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
}
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Compte / déconnexion */
.psc-account {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: #f5f7fa;
    border-radius: 4px;
    margin-bottom: 1.4em;
    font-size: 0.92em;
}
.psc-account form { margin: 0; }
.psc-link-btn {
    background: none;
    border: none;
    color: #2271b1;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: 1em;
}

/* Carte commune : socle visuel partagé par les blocs de la page de connexion */
.psc-card {
    background: #fff;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    padding: 24px 28px;
    box-sizing: border-box;
}
.psc-card h2 {
    margin-top: 0;
    font-size: 1.4em;
    font-weight: 600;
}
.psc-card-intro {
    color: #111;
    font-size: 1em;
}
.psc-lead {
    font-weight: 600;
    font-size: 1.05em;
    margin: 0 0 0.4em;
}
.psc-form-hint {
    margin: 1em 0 0;
    font-size: 0.85em;
    color: #666;
}
.psc-steps {
    margin: 0 0 1.4em;
    padding-left: 1.2em;
    color: #111;
}
.psc-steps li { margin-bottom: 0.3em; }

/* Menu de cantine (accès libre, avant connexion) */
.psc-menu-widget {
    margin-bottom: 1.4em;
}
.psc-menu-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1.2em;
}
.psc-menu-nav-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dfe4ea;
    border-radius: 50%;
    color: #2271b1;
    text-decoration: none;
    font-size: 1.1em;
    background: #f5f7fa;
}
.psc-menu-nav-btn:hover { background: #e8edf5; }
.psc-menu-week {
    flex: 1;
    text-align: center;
}
.psc-menu-week-label {
    margin: 0;
    font-size: 1.15em;
    font-weight: 600;
}
.psc-menu-today-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.85em;
}
.psc-menu-table {
    width: 100%;
    border-collapse: collapse;
}
.psc-menu-table th,
.psc-menu-table td {
    border: 1px solid #e5e9f0;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}
.psc-menu-table th {
    background: #e8edf5;
    color: #23478B;
    font-weight: 600;
    white-space: nowrap;
    width: 110px;
}
.psc-menu-empty {
    color: #888;
    font-style: italic;
    margin: 0;
}

/* Connexion */
.psc-login-card {
    margin-bottom: 1.4em;
    box-shadow: 0 1px 3px rgba(16, 30, 54, 0.06);
}
.psc-login-form { max-width: 420px; }
.psc-login-form input[type="email"] {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

/* Mois repliables */
.psc-month-block {
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e2e5ea;
    border-radius: 8px;
    overflow: hidden;
}
.psc-month-block > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    padding: 14px 18px;
}
.psc-month-block > summary::-webkit-details-marker { display: none; }
.psc-month-chevron {
    position: relative;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
}
.psc-month-chevron::before,
.psc-month-chevron::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #555;
    border-radius: 1px;
}
.psc-month-chevron::before {
    width: 14px;
    height: 2px;
    transform: translate(-50%, -50%);
}
.psc-month-chevron::after {
    width: 2px;
    height: 14px;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.psc-month-block[open] > summary .psc-month-chevron::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}
.psc-month-name { font-weight: 600; flex: 1; }
.psc-month-summary {
    font-size: 0.92em;
    white-space: nowrap;
    color: #767b85;
}
.psc-month-summary-active {
    color: #2271b1;
    font-weight: 600;
}
.psc-month-block .psc-calendar {
    margin: 0 18px 16px;
    width: calc(100% - 36px);
}
.psc-badge {
    display: inline-block;
    font-size: 0.7em;
    font-weight: normal;
    background: #e0e0e0;
    color: #555;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Jours verrouillés */
.psc-row-locked { background: #fafafa; color: #999; }
.psc-row-locked .psc-daylabel { color: #999; }
.psc-cell input[type="checkbox"]:disabled { cursor: not-allowed; opacity: 0.45; }
.psc-lock { font-size: 0.85em; margin-left: 4px; }

/* Bloc de confirmation */
.psc-confirm-block {
    margin-top: 2.4em;
    padding: 18px 20px;
    background: #f5f7fa;
    border-radius: 6px;
    border: 1px solid #dfe4ea;
}
.psc-confirm-block h3 { margin-top: 0; }
.psc-confirm-feedback { margin: 12px 0 0; font-size: 0.92em; min-height: 1.2em; }
.psc-ok-text { color: #46893f; }
.psc-err-text { color: #b32d2e; }

/* Demande d'inscription */
.psc-request-block > summary {
    cursor: pointer;
    font-size: 1.4em;
    list-style-position: outside;
}
.psc-request-block > summary strong { font-weight: 600; }
.psc-request-block[open] > summary { margin-bottom: 0.6em; }
.psc-request-form { max-width: 560px; margin-top: 1em; }
.psc-request-form fieldset {
    border: 1px solid #dfe4ea;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 1.2em;
}
.psc-request-form legend { font-weight: 600; padding: 0 6px; }
.psc-request-form input[type="text"],
.psc-request-form input[type="email"],
.psc-request-form input[type="tel"],
.psc-request-form textarea {
    width: 100%;
    padding: 7px;
    box-sizing: border-box;
}
.psc-child-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.psc-child-row input { flex: 1; min-width: 0; }
.psc-child-row select { flex: 0 0 auto; }
.psc-child-remove {
    flex: 0 0 auto;
    color: #b32d2e;
    font-size: 1.2em;
    line-height: 1;
    padding: 0 4px;
}
.psc-req { color: #b32d2e; }
.psc-rgpd {
    font-size: 0.82em;
    color: #666;
    line-height: 1.45;
    border-left: 3px solid #dfe4ea;
    padding-left: 10px;
}
.psc-reglement-box {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #dfe4ea;
    border-radius: 4px;
    padding: 12px 14px;
    margin: 10px 0;
    font-size: 0.86em;
    line-height: 1.5;
    color: #444;
    background: #fafbfc;
}
.psc-reglement-box h4 {
    margin: 0.8em 0 0.3em;
    font-size: 1em;
}
.psc-reglement-box h4:first-child { margin-top: 0; }
.psc-reglement-box p { margin: 0 0 0.6em; }
.psc-payment-choice { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0.6em; }
.psc-sepa-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #dfe4ea;
}
.psc-sepa-creditor {
    background: #f0f4fb;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 0.88em;
    color: #444;
}
/* ---- Gestion des enfants ---- */
.psc-children-mgmt {
    margin-top: 32px;
    border: 1px solid #dde4ee;
    border-radius: 6px;
    padding: 0 16px 16px;
}
.psc-children-mgmt > summary {
    padding: 12px 0;
    cursor: pointer;
    color: #23478B;
    font-size: 1em;
}
.psc-children-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    margin-bottom: 16px;
}
.psc-children-table th,
.psc-children-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #eef0f5;
    text-align: left;
    vertical-align: middle;
}
.psc-children-table th { color: #555; font-weight: 600; font-size: 0.85em; text-transform: uppercase; letter-spacing: .03em; }
.psc-child-inactive td { color: #aaa; }
.psc-diet-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.92em;
    white-space: nowrap;
}
.psc-diet-options label { display: flex; align-items: center; gap: 4px; font-weight: normal; }
span.psc-diet-options { flex-direction: row; gap: 12px; }
.psc-btn-sm {
    background: #23478B;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 14px;
    font-size: 0.85em;
    cursor: pointer;
    white-space: nowrap;
}
.psc-btn-sm:hover { background: #1a3568; }
/* ---- Factures ---- */
.psc-invoices-mgmt {
    margin-top: 32px;
    border: 1px solid #dde4ee;
    border-radius: 6px;
    padding: 0 16px 16px;
}
.psc-invoices-mgmt > summary {
    padding: 12px 0;
    cursor: pointer;
    color: #23478B;
    font-size: 1em;
}
.psc-invoices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
.psc-invoices-table th,
.psc-invoices-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #eef0f5;
    text-align: left;
    vertical-align: middle;
}
.psc-invoices-table th { color: #555; font-weight: 600; font-size: 0.85em; text-transform: uppercase; letter-spacing: .03em; }
.psc-invoices-table .psc-active { color: #2e7d32; }
/* Toggle actif/inactif */
.psc-toggle { display: inline-flex; align-items: center; cursor: pointer; }
.psc-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.psc-toggle-track {
    display: inline-block;
    width: 36px; height: 20px;
    background: #ccc;
    border-radius: 10px;
    position: relative;
    transition: background .2s;
}
.psc-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: left .2s;
}
.psc-toggle input:checked + .psc-toggle-track { background: #23478B; }
.psc-toggle input:checked + .psc-toggle-track::after { left: 19px; }
/* Ajouter un enfant */
.psc-add-child-block { margin-top: 12px; border: none; }
.psc-add-child-block > summary { cursor: pointer; color: #23478B; font-size: 0.9em; padding: 6px 0; }
.psc-add-child-form .psc-child-row { flex-wrap: wrap; }

/* Champ piège : masqué visuellement sans display:none, que certains
   robots détectent. */
.psc-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
@media (max-width: 600px) {
    .psc-child-row { flex-direction: column; }
}
