/**
 * Projet         : MageTicket
 * Fichier        : public/assets/css/license.css
 * Rôle           : Présentation accessible de la licence d’utilisation et de la marque MageKorp.
 * Auteur         : Régis KREMER
 * Version        : 0.33.13
 * Version projet : 0.33.0
 * Lot            : MAGETICKET LICENSE USAGE MAGEKORP BRANDING1
 * Base requise   : 0.33.0 + MAGETICKET ACCOUNT SECURITY PWA UX FUNCTIONAL COMPLETION1
 * Créé le        : 2026-07-24
 * Modifié le     : 2026-07-24
 * Dépendances    : tokens.css, components.css, shell.css et public-pages.css.
 * Contraintes    : styles limités à la page licence, tokens MageTicket uniquement, zoom et navigation clavier.
 * Modifications  : création de la page légale responsive sans surcouche de shell.
 */

.license-center,
.license-public-shell { min-width: 0; }
.license-center { min-height: 100%; display: flex; flex-direction: column; }
.license-public-shell { min-height: var(--visual-viewport-height, 100dvh); }

.license-public-header {
    width: min(1180px, calc(100% - 2 * var(--space-5)));
    margin: clamp(var(--space-5), 4vw, var(--space-8)) auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-5);
    padding: clamp(var(--space-5), 4vw, var(--space-7));
    border: 1px solid var(--line);
    background: linear-gradient(115deg, color-mix(in srgb, var(--brand) 10%, transparent), transparent 52%), var(--surface);
    box-shadow: var(--shadow-1);
}
.license-public-header__identity { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-4); }
.license-public-header__icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line)); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.license-public-header__icon .ti { font-size: var(--icon-lg); }

.license-page {
    width: min(1180px, 100%);
    min-width: 0;
    margin: 0 auto;
    display: grid;
    gap: var(--space-4);
    padding: var(--space-4) max(var(--space-4), var(--safe-right)) max(clamp(var(--space-7), 6vw, 72px), calc(var(--space-5) + var(--safe-bottom))) max(var(--space-4), var(--safe-left));
}
.license-public-shell .license-page { padding-top: var(--space-4); }

.license-brand-panel {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
    align-items: center;
    gap: var(--space-5);
    padding: clamp(var(--space-5), 3vw, var(--space-7));
    border: 1px solid var(--line);
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), color-mix(in srgb, var(--info) 7%, var(--surface)));
    box-shadow: var(--shadow-1);
}
.license-brand-panel__copy { min-width: 0; }
.license-brand-panel__copy h2 { margin: 0; font-size: clamp(var(--fs-xl), 3vw, var(--fs-2xl)); letter-spacing: -.03em; }
.license-brand-panel__copy p:last-child { max-width: 70ch; margin: var(--space-3) 0 0; color: var(--muted); line-height: 1.65; }
.license-magekorp-brand { justify-self: end; display: inline-flex; align-items: center; padding: var(--space-3); border: 1px solid transparent; text-decoration: none; }
.license-magekorp-brand:hover,
.license-magekorp-brand:focus-visible { border-color: var(--line-strong); background: var(--surface-soft); }
.license-magekorp-brand:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.license-magekorp-brand img { display: block; width: min(320px, 100%); height: auto; object-fit: contain; }

.license-meta {
    grid-column: 1 / -1;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line);
    background: var(--surface);
}
.license-meta > div { min-width: 0; padding: var(--space-3) var(--space-4); border-right: 1px solid var(--line); }
.license-meta > div:last-child { border-right: 0; }
.license-meta dt { color: var(--muted); font-size: var(--fs-xs); font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.license-meta dd { margin: var(--space-1) 0 0; color: var(--text); font-weight: 750; overflow-wrap: anywhere; }

.license-layout { min-width: 0; display: grid; grid-template-columns: minmax(220px, .28fr) minmax(0, 1fr); align-items: start; gap: var(--space-4); }
.license-toc {
    position: sticky;
    top: var(--space-4);
    display: grid;
    gap: 2px;
    padding: var(--space-4);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-1);
}
.license-toc a { min-height: 38px; display: flex; align-items: center; padding: 0 var(--space-3); border-left: 3px solid transparent; color: var(--muted); text-decoration: none; font-size: var(--fs-sm); font-weight: 650; }
.license-toc a:hover,
.license-toc a:focus-visible { border-left-color: var(--brand); background: var(--surface-soft); color: var(--text); }
.license-toc a:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

.license-document { min-width: 0; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); }
.license-document > section { scroll-margin-top: var(--space-5); padding: clamp(var(--space-5), 3vw, var(--space-7)); }
.license-document > section + section { border-top: 1px solid var(--line); }
.license-document h2 { margin: 0; color: var(--text); font-size: var(--fs-xl); letter-spacing: -.02em; }
.license-document p { max-width: 88ch; margin: var(--space-3) 0 0; color: var(--muted); line-height: 1.72; }
.license-document strong { color: var(--text); }
.license-list { margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-3); list-style: none; }
.license-list li { position: relative; min-height: 28px; padding-left: 34px; color: var(--muted); line-height: 1.62; }
.license-list li::before { position: absolute; left: 0; top: 1px; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong); font-weight: 800; }
.license-list.is-authorized li::before { content: "✓"; border-color: var(--success-strong); background: var(--success-soft); color: var(--success); }
.license-list.is-prohibited li::before { content: "×"; border-color: var(--danger-strong); background: var(--danger-soft); color: var(--danger); }
.license-contact-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-5); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.license-contact-section .button { white-space: nowrap; }

@media (max-width: 900px) {
    .license-public-header { width: calc(100% - 2 * var(--space-4)); }
    .license-brand-panel { grid-template-columns: 1fr; }
    .license-magekorp-brand { justify-self: start; }
    .license-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .license-meta > div:nth-child(2) { border-right: 0; }
    .license-meta > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
    .license-layout { grid-template-columns: 1fr; }
    .license-toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .license-toc .eyebrow { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .license-public-header { width: 100%; margin-top: 0; grid-template-columns: 1fr; padding: var(--space-5) max(var(--space-4), var(--safe-right)) var(--space-5) max(var(--space-4), var(--safe-left)); border-right: 0; border-left: 0; }
    .license-public-header__identity { grid-template-columns: 1fr; }
    .license-page { padding-right: max(var(--space-3), var(--safe-right)); padding-left: max(var(--space-3), var(--safe-left)); }
    .license-brand-panel,
    .license-document,
    .license-toc { border-right: 0; border-left: 0; box-shadow: none; }
    .license-meta { grid-template-columns: 1fr; }
    .license-meta > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .license-meta > div:last-child { border-bottom: 0; }
    .license-toc { grid-template-columns: 1fr; }
    .license-contact-section { grid-template-columns: 1fr; align-items: stretch; }
    .license-contact-section .button { width: 100%; }
}

@media (forced-colors: active) {
    .license-brand-panel,
    .license-document,
    .license-toc,
    .license-meta,
    .license-public-header { border-color: CanvasText; }
    .license-list li::before { border-color: CanvasText; }
}

@media print {
    .public-header,
    .public-footer,
    .app-shell-topbar,
    .app-shell-sidebar,
    .app-shell-page-context,
    .app-shell-footer,
    .app-shell-mobile-navigation,
    .app-page-header__actions,
    .license-toc,
    .license-contact-section .button { display: none !important; }
    .license-page { width: 100%; padding: 0; }
    .license-layout { display: block; }
    .license-brand-panel,
    .license-document { box-shadow: none; }
}
