/* ==========================================================================
   1SWISS1 - pages des modules clients (refonte v01, phase 6)
   Mes e-mails, fiche e-mail SmarterMail, CT, Jetons IA, SentinelOne,
   ProofPoint, Support Premium. Chargé par chaque template concerné (paramètre
   ?v= à changer à chaque modification), jamais par head.tpl.
   S'appuie sur les jetons et les boutons de s1-ui.css (--s1-*, .btn-primary /
   .btn-default / .btn-link, 44 px, pilule).
   Pages partenaires : la racine porte .s1m--partner et définit --s1m-acc
   (SentinelOne violet, ProofPoint sarcelle) ; seul le bouton principal et les
   petits repères prennent cette couleur.
   ========================================================================== */

.s1m { --s1m-acc: var(--s1-red); --s1m-acc-ink: var(--s1-ink); padding: var(--s1-page-pt) 0 72px; color: var(--s1-ink); }
.s1m a:not(.btn) { color: var(--s1-ink); }

/* en-tête de page */
.s1m-head { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-end; justify-content: space-between; }
.s1m-head > div:first-child { min-width: 0; flex: 1 1 420px; }
.s1m-head h1 { margin: 0; font-size: var(--s1-h1); line-height: 1.1; font-weight: var(--s1-w-title); letter-spacing: -0.015em; color: var(--s1-ink); }
.s1m-sub { margin: 12px 0 0; max-width: 64ch; font-size: 17px; line-height: 1.5; color: var(--s1-ink-2); }
.s1m-meta { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 12px 0 0; font-size: 15px; color: var(--s1-ink-2); }
.s1m-meta strong { color: var(--s1-ink); font-weight: var(--s1-w-strong); }
.s1m-head-a { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* sections : petit carré + capitales (charte), une fois par section */
.s1m-sec { margin-top: 48px; }
.s1m-head + .s1m-sec, .s1m-head + .s1m-tools { margin-top: 36px; }
.s1m-sq { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 14px; line-height: 1.3;
    font-weight: var(--s1-w-subtitle); letter-spacing: .08em; text-transform: uppercase; color: var(--s1-ink); }
.s1m-sq::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--s1-red); }
.s1m-sq > .s1m-cnt, .s1m-sq > a { margin-left: auto; font-size: 15px; font-weight: var(--s1-w-body); letter-spacing: 0; text-transform: none; color: var(--s1-ink-2); }
.s1m-h2 { margin: 0 0 8px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; font-weight: var(--s1-w-title); letter-spacing: -0.01em; }
.s1m-lead { margin: 0 0 24px; max-width: 70ch; font-size: 16px; line-height: 1.55; color: var(--s1-ink-2); }

/* barre d'outils : recherche + filtres */
.s1m-tools { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin: 0 0 20px; }
.s1m-search { position: relative; flex: 1 1 260px; max-width: 380px; }
.s1m-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--s1-ink-2); pointer-events: none; }
.s1m-search input { width: 100%; min-height: var(--s1-h-ctl); padding: 10px 16px 10px 42px; border: 1px solid var(--s1-line);
    border-radius: var(--s1-r-pill); background: var(--s1-white); color: var(--s1-ink); font: inherit; font-size: 15px; }
.s1m-search input:hover { border-color: var(--s1-ink); }
.s1m-search input:focus { outline: 0; border-color: var(--s1-ink); box-shadow: var(--s1-ring); }
.s1m-filter { display: flex; flex-wrap: wrap; gap: 4px; }
.s1m-filter button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid transparent;
    border-radius: var(--s1-r-pill); background: transparent; color: var(--s1-ink-2); font: inherit; font-size: 15px; cursor: pointer; }
.s1m-filter button:hover { color: var(--s1-ink); }
.s1m-filter button.is-active { border-color: var(--s1-line); background: var(--s1-white); color: var(--s1-ink); font-weight: var(--s1-w-strong); }
.s1m-filter .count { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--s1-ink-2); font-weight: var(--s1-w-body); }

/* cartes de services */
.s1m-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.s1m-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.s1m-card { position: relative; display: flex; flex-direction: column; gap: 18px; min-width: 0; padding: 24px 26px;
    border: 1px solid var(--s1-line); border-radius: var(--s1-r-xl); background: var(--s1-white);
    transition: border-color var(--s1-dur) var(--s1-ease); }
.s1m-card:hover { border-color: rgba(34, 34, 34, .35); }
.s1m-card-h { display: flex; gap: 14px; align-items: flex-start; }
.s1m-card-h > i { flex: none; width: 24px; margin-top: 3px; font-size: 19px; text-align: center; color: var(--s1-ink); }
.s1m-card-h > div { flex: 1 1 auto; min-width: 0; }
.s1m-card-h strong, .s1m-card-t { display: block; margin: 0; font-size: 18px; line-height: 1.3; font-weight: var(--s1-w-strong); overflow-wrap: anywhere; }
.s1m-card-h small { display: block; margin-top: 2px; font-size: 14px; color: var(--s1-ink-2); overflow-wrap: anywhere; }
.s1m-card-link { color: var(--s1-ink); text-decoration: none; }
.s1m-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.s1m-card-link:hover { color: var(--s1-ink); text-decoration: underline; text-underline-offset: 3px; }
.s1m-card-link:focus-visible { outline: 0; }
.s1m-card:has(.s1m-card-link:focus-visible) { outline: 2px solid var(--s1-ink); outline-offset: 3px; }
.s1m-card-a { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: auto; }
.s1m-card p { margin: 0; color: var(--s1-ink-2); line-height: 1.5; }

/* statut : texte discret à couleur sémantique */
.s1m-st { flex: none; font-size: 14px; color: var(--s1-ok); white-space: nowrap; }
.s1m-st--pending { color: var(--s1-warn); }
.s1m-st--suspended, .s1m-st--fraud { color: var(--s1-crit); font-weight: var(--s1-w-strong); }
.s1m-st--terminated, .s1m-st--cancelled, .s1m-st--off { color: var(--s1-ink-2); }

/* liste clé / valeur */
.s1m-kv { display: grid; gap: 0; margin: 0; }
.s1m-kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--s1-line); font-size: 15px; }
.s1m-kv > div:first-child { border-top: 0; padding-top: 0; }
.s1m-kv dt { margin: 0; font-weight: var(--s1-w-body); color: var(--s1-ink-2); }
.s1m-kv dd { margin: 0; text-align: right; color: var(--s1-ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* jauge */
.s1m-g-h { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 14px; color: var(--s1-ink-2); }
.s1m-g-b { height: 6px; border-radius: var(--s1-r-pill); background: var(--s1-soft); overflow: hidden; }
.s1m-g-b > span { display: block; height: 100%; border-radius: inherit; background: var(--s1-ink); }
.s1m-g-b > span.is-full { background: var(--s1-red); }

/* panneau neutre (bloc d'information, formulaire) */
.s1m-panel { padding: 24px 26px; border: 1px solid var(--s1-line); border-radius: var(--s1-r-xl); background: var(--s1-white); }
.s1m-panel--soft { background: var(--s1-g50); }
.s1m-panel > h3, .s1m-panel-t { margin: 0 0 6px; font-size: 18px; line-height: 1.3; font-weight: var(--s1-w-strong); }
.s1m-panel > p { margin: 0; color: var(--s1-ink-2); line-height: 1.55; }
.s1m-row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.s1m-row > div { min-width: 0; flex: 1 1 320px; }

/* bloc de mise en avant anthracite (charte) */
.s1m-dark { padding: 28px 30px; border-radius: var(--s1-r-xl); background: var(--s1-ink); color: var(--s1-on-dark); }
.s1m-dark h2, .s1m-dark h3, .s1m-dark strong { color: #fff; }
.s1m-dark p { color: var(--s1-on-dark-2); }
.s1m-dark a:not(.btn) { color: #fff; }
.s1m-dark :focus-visible { outline-color: #fff; }
.s1m-dark .btn-default { border-color: transparent; }

/* état vide */
.s1m-empty { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 24px; align-items: center;
    padding: 28px 32px; border: 1px solid var(--s1-line); border-radius: var(--s1-r-xl); background: var(--s1-g50); }
.s1m-empty > i { grid-row: span 3; font-size: 34px; color: var(--s1-ink); width: 48px; text-align: center; }
.s1m-empty h2, .s1m-empty h3 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: var(--s1-w-strong); }
.s1m-empty p { margin: 0; max-width: 62ch; color: var(--s1-ink-2); line-height: 1.55; }
.s1m-empty .s1m-card-a, .s1m-empty > .btn { margin-top: 10px; justify-self: start; }
.s1m-empty--filter { display: block; padding: 24px; text-align: left; background: var(--s1-white); }

/* tableau léger */
.s1m-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.s1m-table th { padding: 12px 14px; border-bottom: 1px solid var(--s1-line); text-align: left; font-weight: var(--s1-w-body); color: var(--s1-ink-2); white-space: nowrap; }
.s1m-table td { padding: 14px; border-bottom: 1px solid var(--s1-line); vertical-align: middle; }
.s1m-table tr:last-child td { border-bottom: 0; }
.s1m-scroll { overflow-x: auto; border: 1px solid var(--s1-line); border-radius: var(--s1-r-xl); }

/* liste à puces carrées (charte) */
.s1m-ul { margin: 0; padding: 0; list-style: none; }
.s1m-ul li { position: relative; padding: 5px 0 5px 20px; line-height: 1.5; color: var(--s1-ink); }
.s1m-ul li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; background: var(--s1m-acc); }

/* FAQ (details natifs) */
.s1m-faq { display: grid; gap: 0; border-top: 1px solid var(--s1-line); }
.s1m-faq details { border-bottom: 1px solid var(--s1-line); }
.s1m-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 2px; cursor: pointer; list-style: none; font-size: 17px; font-weight: var(--s1-w-strong); }
.s1m-faq summary::-webkit-details-marker { display: none; }
.s1m-faq summary::after { content: "+"; flex: none; font-weight: var(--s1-w-body); font-size: 22px; line-height: 1; color: var(--s1-ink-2); }
.s1m-faq details[open] summary::after { content: "-"; }
.s1m-faq details > div { padding: 0 2px 20px; max-width: 75ch; color: var(--s1-ink-2); line-height: 1.6; }

/* dialogue de confirmation (remplace confirm()) */
.s1m-dlg { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(34, 34, 34, .55); }
.s1m-dlg[hidden] { display: none; }
.s1m-dlg-box { width: 100%; max-width: 480px; padding: 26px 28px 24px; border-radius: var(--s1-r-xl); background: var(--s1-white); box-shadow: var(--s1-shadow-pop); }
.s1m-dlg-box h2 { margin: 0 0 10px; font-size: 22px; line-height: 1.25; font-weight: var(--s1-w-strong); }
.s1m-dlg-box p { margin: 0 0 16px; color: var(--s1-ink-2); line-height: 1.55; }
.s1m-dlg-a { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.s1m-msg { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--s1-r-md); font-size: 15px; }
.s1m-msg.is-ok { background: var(--s1-ok-bg); color: var(--s1-ok); }
.s1m-msg.is-err { background: var(--s1-crit-bg); color: var(--s1-crit); }

/* pages partenaires : couleur de marque du partenaire sur le seul bouton principal */
.s1m--partner .btn-primary,
.s1m--partner .btn-primary:hover,
.s1m--partner .btn-primary:focus,
.s1m--partner .btn-primary:not(:disabled):not(.disabled):active { background: var(--s1m-acc); border-color: var(--s1m-acc); color: #fff; }
.s1m--partner .btn-primary:hover { filter: brightness(1.08); }
.s1m--partner .s1m-sq::before { background: var(--s1m-acc); }
.s1m-acc { color: var(--s1m-acc); }
.s1m--sone { --s1m-acc: #6100ff; }
.s1m--pfpt { --s1m-acc: #0d9488; }

@media (max-width: 1100px) {
    .s1m-cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .s1m-cards, .s1m-cards--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .s1m-sec { margin-top: 40px; }
    .s1m-card, .s1m-panel { padding: 20px; }
    .s1m-dark { padding: 22px 20px; }
    .s1m-empty { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
    .s1m-empty > i { grid-row: auto; text-align: left; font-size: 28px; }
    .s1m-search { max-width: none; flex-basis: 100%; }
    .s1m-head-a { width: 100%; }
    .s1m-dlg-box { padding: 22px 20px 20px; }
    .s1m-dlg-a .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .s1m-card { transition: none; }
}
