/* Alteris Customer Portal — styles de l'espace client (sobres, compatibles thème). */

.acp-portal {
    margin-bottom: 2em;
}

.acp-portal h2 {
    margin-bottom: 0.75em;
}

/* Actions prioritaires : en tête de toutes les rubriques Mon compte. */
.acp-actions {
    margin: 0 0 2rem;
    border: 2px solid #a52b28;
    border-radius: 12px;
    background: #fff;
    color: #252525;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(111, 28, 25, 0.08);
}

.acp-actions__header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    background: #fff0ed;
    color: #75201e;
}

.acp-actions__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    height: 32px;
    border-radius: 50%;
    background: #a52b28;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.acp-actions .acp-actions__header h2 {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.35;
    color: inherit;
}

.acp-actions .acp-actions__header p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.acp-actions .acp-actions__list {
    list-style: none;
    margin: 0;
    padding: 16px;
}

.acp-actions .acp-action {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 12px;
    padding: 18px;
    border: 1px solid #eed6ad;
    border-left: 5px solid #a8680c;
    border-radius: 8px;
    background: #fff9ef;
}

.acp-actions .acp-action:last-child { margin-bottom: 0; }
.acp-actions .acp-action--urgent {
    border-color: #e8b5b2;
    border-left-color: #a52b28;
    background: #fff3f2;
}

.acp-action__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.acp-action__label {
    display: block;
    color: #754509;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.acp-action--urgent .acp-action__label { color: #8b2522; }
.acp-actions .acp-action h3 {
    margin: 0 0 8px;
    color: #252525;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
}
.acp-actions .acp-action p { margin: 0; font-size: 0.95rem; line-height: 1.55; }
.acp-actions .acp-action .acp-action__detail { margin-top: 8px; font-weight: 600; }

.acp-actions a.acp-action__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 2px solid #155c86;
    border-radius: 6px;
    background: #155c86;
    color: #fff;
    text-decoration: none;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: normal;
}
.acp-actions .acp-action--urgent a.acp-action__button { background: #a52b28; border-color: #a52b28; }
.acp-actions a.acp-action__button:hover { background: #104767; border-color: #104767; color: #fff; }
.acp-actions .acp-action--urgent a.acp-action__button:hover { background: #81201d; border-color: #81201d; }
.acp-actions a.acp-action__button:focus-visible { outline: 3px solid #155c86; outline-offset: 4px; }

@media (max-width: 1100px) {
    .acp-actions .acp-action { flex-direction: column; align-items: stretch; }
    .acp-actions a.acp-action__button { align-self: flex-start; }
}
@media (max-width: 600px) {
    .acp-actions__header { padding: 16px 12px; gap: 10px; }
    .acp-actions .acp-actions__list { padding: 10px; }
    .acp-actions .acp-action { padding: 14px 12px; gap: 14px; }
    .acp-actions a.acp-action__button { align-self: stretch; width: 100%; }
}

/* Tableaux : jamais de débordement horizontal de la page (scroll interne). */
.acp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.acp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.acp-table th,
.acp-table td {
    padding: 0.6em 0.8em;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.acp-table th {
    font-weight: 600;
    border-bottom-width: 2px;
}

/* Badges de statut */
.acp-badge {
    display: inline-block;
    padding: 0.15em 0.65em;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.acp-badge--ok    { background: #e6f4ea; color: #1e7e34; }
.acp-badge--info  { background: #e8f0fe; color: #1a56db; }
.acp-badge--warn  { background: #fdecea; color: #b02a37; }
.acp-badge--muted { background: #eee;    color: #666; }

/* Messages */
.acp-notice {
    padding: 0.9em 1.1em;
    border-radius: 6px;
    margin-bottom: 1.2em;
}

.acp-notice--ok   { background: #e6f4ea; color: #1e7e34; }
.acp-notice--info { background: #e8f0fe; color: #1a56db; }
.acp-notice--err  { background: #fdecea; color: #b02a37; }
.acp-notice--warn { background: #fff4e5; color: #8a5300; }

/* Encart « il reste X à régler » : c'est une somme due, pas une erreur —
   assez visible pour être vu, assez sobre pour ne pas accuser le client. */
.acp-due {
    border-left: 4px solid #d98324;
}

.acp-due p {
    margin: 0 0 0.6em;
}

.acp-due p:last-child {
    margin-bottom: 0;
}

.acp-due .acp-pay {
    font-weight: 600;
}

.acp-hint {
    font-size: 0.88em;
    opacity: 0.75;
    margin-top: 0.8em;
}

.acp-quota {
    opacity: 0.65;
    font-size: 0.9em;
}

/* Cartes (consommation par ligne) */
.acp-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 1em 1.2em;
    margin-bottom: 1.2em;
}

.acp-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8em;
    flex-wrap: wrap;
}

.acp-card__head h3 {
    margin: 0;
    font-size: 1.1em;
}

.acp-card__meta {
    font-size: 0.92em;
    opacity: 0.85;
}

/* Formulaire de résiliation */
.acp-form .acp-fieldset {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 0.8em 1.1em;
    margin-bottom: 1em;
}

.acp-radio,
.acp-checkbox {
    display: flex;
    gap: 0.6em;
    align-items: flex-start;
    margin: 0.5em 0;
    cursor: pointer;
}

.acp-radio input,
.acp-checkbox input {
    margin-top: 0.3em;
    flex-shrink: 0;
}

.acp-field {
    margin-bottom: 1em;
}

.acp-field textarea,
.acp-field select {
    width: 100%;
    max-width: 480px;
}

/* Mobile : tables → lignes empilées lisibles */
@media (max-width: 640px) {
    .acp-table thead {
        display: none;
    }
    .acp-table tr {
        display: block;
        border-bottom: 2px solid rgba(0, 0, 0, 0.1);
        padding: 0.5em 0;
    }
    .acp-table td {
        display: flex;
        justify-content: space-between;
        gap: 1em;
        border: none;
        padding: 0.25em 0.2em;
        white-space: normal;
    }
    .acp-table td::before {
        content: attr(data-label);
        font-weight: 600;
    }
    .acp-table td[data-label=""]::before {
        content: none;
    }
}
