/* TopGend — couche responsive et administration */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  min-width: 320px;
}
img,
svg,
video,
iframe {
  max-width: 100%;
}
button,
a,
input,
textarea,
select {
  min-width: 0;
}
h1,
h2,
h3,
p,
td,
th,
.nav-link {
  overflow-wrap: anywhere;
}

.app-shell {
  grid-template-columns: 278px minmax(0, 1fr);
}
.sidebar {
  position: relative;
  top: auto;
  width: 278px;
  height: auto;
  min-height: 100vh;
  align-self: stretch;
  padding: 24px 18px;
  overflow: visible;
}
.sidebar .nav-group {
  margin-top: 24px;
}
.sidebar .admin-nav-group {
  margin-top: 7px;
}
.sidebar .nav-label {
  margin: 20px 13px 0;
  color: #7f94b1;
}
.admin-navigation {
  padding-top: 8px;
}
.sidebar-foot {
  padding-bottom: 4px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(3, 10, 22, 0.6);
  backdrop-filter: blur(3px);
  z-index: 25;
}
.main-column {
  width: 100%;
  min-width: 0;
}
.topbar {
  position: relative;
  top: auto;
}
.subject-card,
.security-note {
  position: static;
  top: auto;
}
.page-wrap {
  width: 100%;
  max-width: 1540px;
  padding: 38px clamp(24px, 3.5vw, 58px) 76px;
}
.page-heading {
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.page-heading > div {
  min-width: 0;
  max-width: 900px;
}
.page-heading > .button {
  flex: 0 0 auto;
}
.heading-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.heading-actions form {
  margin: 0;
}
.panel {
  overflow: hidden;
}
.content-grid,
.settings-layout,
.writing-layout {
  min-width: 0;
}
.form-panel {
  max-width: none;
}
.form-panel form,
.form-section {
  display: grid;
  gap: 18px;
}
input,
textarea,
select {
  max-width: 100%;
}

.login-page {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  overflow: hidden;
}
.login-showcase,
.login-panel {
  min-width: 0;
}
.login-panel {
  padding-inline: clamp(28px, 5vw, 72px);
  overflow: hidden;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  min-width: 0;
}
.auth-card .button {
  white-space: normal;
  text-align: center;
}
.video-frame {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  background: #050b14;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.center-panel .button {
  margin: 8px 4px;
}
.wix-callback-page .loader {
  margin-bottom: 24px;
}

/* Administration */
.admin-heading {
  padding-bottom: 4px;
}
.admin-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric-icon.violet {
  background: #f1eafd;
  color: #744da0;
}
.admin-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}
.admin-shortcuts > a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(25, 42, 70, 0.035);
  transition: 0.2s;
}
.admin-shortcuts > a:hover {
  transform: translateY(-2px);
  border-color: #8eb4df;
  box-shadow: var(--shadow);
}
.admin-shortcuts > a > span {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  color: var(--blue);
  font-size: 1.25rem;
}
.admin-shortcuts small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.admin-shortcuts b {
  color: var(--blue);
  font-size: 1.25rem;
}
.admin-alert-block {
  background: linear-gradient(135deg, #fff6eb, #fff);
  border: 1px solid #efcfaa;
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 22px;
  color: #603d1d;
}
html[data-theme="dark"] .admin-alert-block {
  background: linear-gradient(135deg, #2d2117, #171e29);
  border-color: #60462e;
  color: #f7ddbf;
}
.admin-alert-title {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}
.admin-alert-title > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #d66c27;
  color: #fff;
  border-radius: 13px;
  font-weight: 800;
}
.admin-alert-title h2 {
  margin: 2px 0;
}
.admin-alert-title p {
  color: inherit;
  opacity: 0.82;
}
.alert-list {
  margin-top: 16px;
  display: grid;
  gap: 9px;
}
.alert-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 15px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid color-mix(in srgb, #d69c63 35%, var(--border));
  border-radius: 12px;
}
.alert-list article > div {
  min-width: 0;
}
.alert-list small {
  display: block;
  opacity: 0.7;
}
.alert-list p {
  font-size: 0.84rem;
  opacity: 0.8;
}
.responsive-table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.responsive-table table {
  min-width: 720px;
}
.row-link {
  white-space: nowrap;
}
.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  white-space: nowrap;
}
.actions form {
  display: inline;
  margin: 0;
}

/* Gestion IA */
.ai-settings-form .settings-layout {
  align-items: start;
}
.sticky-save {
  position: static;
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.prompt-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.prompt-tab {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}
.prompt-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.prompt-pane {
  display: none;
}
.prompt-pane.active {
  display: block;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.prompt-explainer {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 0 16px;
}
.prompt-explainer summary {
  cursor: pointer;
  padding: 15px 0;
  font-weight: 800;
  color: var(--text);
}
.prompt-explainer[open] {
  padding-bottom: 17px;
}
.prompt-explainer > p {
  padding: 12px 14px;
  margin: 0 0 16px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}
.prompt-explainer label {
  margin-top: 15px;
}
.ai-cost-metrics strong {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

/* Assistant flottant */
.ai-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 61;
  height: 54px;
  padding: 0 18px 0 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d64b5, #113d73);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 14px 38px rgba(13, 50, 94, 0.35);
  cursor: pointer;
  transition: 0.2s;
}
.ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(13, 50, 94, 0.42);
}
.ai-fab span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.ai-backdrop {
  display: none;
}
.ai-drawer {
  position: fixed;
  right: 24px;
  bottom: 90px;
  z-index: 62;
  width: min(430px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 120px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(3, 15, 34, 0.3);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.97);
  transform-origin: bottom right;
  transition: 0.2s ease;
}
.ai-widget.open .ai-drawer {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.ai-widget.open .ai-fab {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}
.ai-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 17px;
  background: linear-gradient(135deg, #10335f, #0b2548);
  color: #fff;
}
.ai-drawer-head > div {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}
.ai-drawer-head small {
  display: block;
  color: #aebed2;
  font-size: 0.72rem;
}
.ai-drawer-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.ai-orb {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.12);
  color: #a9d0ff;
}
.ai-widget-history {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  scrollbar-gutter: stable;
}
.ai-message {
  max-width: 86%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  align-self: flex-start;
  white-space: pre-wrap;
}
.ai-message.user {
  align-self: flex-end;
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-message.assistant {
  border-bottom-left-radius: 4px;
}
.ai-message small {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  margin-bottom: 4px;
}
.ai-message.user small {
  color: #d7e7fa;
}
.ai-message.loading {
  opacity: 0.7;
}
.ai-message.loading div:after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-left: 6px;
  animation: pulse 1s infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.2;
  }
}
.ai-welcome {
  text-align: center;
  margin: auto;
  color: var(--muted);
  padding: 16px;
}
.ai-welcome > span {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  color: var(--blue);
  font-size: 1.4rem;
}
.ai-welcome h2 {
  color: var(--text);
  margin: 0;
}
.ai-welcome button {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 10px;
  margin: 8px 3px 0;
  cursor: pointer;
}
.ai-widget-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 9px;
  align-items: end;
  padding: 13px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.ai-widget-form textarea {
  min-height: 68px;
  max-height: 150px;
  resize: vertical;
  padding: 10px 12px;
}
.ai-widget-form button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}
.ai-widget-form button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.mobile-bottom-nav {
  display: none;
}
.auto-refresh-state {
  display: block;
  color: var(--muted);
  margin-top: 10px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 238px minmax(0, 1fr);
  }
  .sidebar {
    width: 238px;
    padding-inline: 14px;
  }
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}

@media (max-width: 920px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    left: 0;
    width: min(310px, 88vw);
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    transition: transform 0.24s ease;
    box-shadow: none;
    z-index: 40;
  }
  .sidebar.open {
    left: 0;
    transform: translateX(0);
    box-shadow: 18px 0 55px rgba(0, 0, 0, 0.3);
  }
  .sidebar-overlay.open {
    display: block;
    z-index: 35;
  }
  body.menu-open {
    overflow: hidden;
  }
  .mobile-menu {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
  }
  .topbar {
    height: 70px;
    padding: 0 clamp(14px, 4vw, 28px);
  }
  .page-wrap {
    padding: 28px clamp(16px, 4vw, 30px) 104px;
  }
  .mobile-bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 39;
    height: 64px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(4, 17, 36, 0.18);
    backdrop-filter: blur(16px);
  }
  .mobile-bottom-nav a {
    position: relative;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.05;
  }
  .mobile-bottom-nav a > span {
    font-size: 1.15rem;
  }
  .mobile-bottom-nav small {
    font-size: 0.61rem;
  }
  .mobile-bottom-nav b {
    position: absolute;
    top: 0;
    right: 18%;
    background: var(--gold);
    color: #182236;
    border-radius: 20px;
    padding: 1px 5px;
    font-size: 0.58rem;
  }
  .settings-layout,
  .writing-layout {
    grid-template-columns: 1fr;
  }
  .subject-card,
  .security-note {
    position: static;
  }
  .ai-fab {
    bottom: 86px;
    right: 16px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .responsive-table {
    overflow: visible;
  }
  .responsive-table table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table th,
  .responsive-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .responsive-table thead {
    display: none;
  }
  .responsive-table tbody {
    display: grid;
    gap: 12px;
  }
  .responsive-table tr {
    padding: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 13px;
  }
  .responsive-table td {
    border: 0;
    padding: 6px 0;
  }
  .responsive-table td:before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-weight: 800;
  }
  .responsive-table td[colspan]:before {
    display: none;
  }
  .responsive-table .actions {
    justify-content: flex-start;
  }
  .responsive-table .actions a,
  .responsive-table .actions button {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
  }
}

@media (max-width: 700px) {
  h1 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }
  h2 {
    font-size: 1.24rem;
  }
  .topbar > div {
    min-width: 0;
  }
  .topbar strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46vw;
  }
  .topbar .eyebrow {
    font-size: 0.6rem;
  }
  .page-heading {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .page-heading > * {
    width: 100%;
  }
  .page-heading > .status-pill {
    width: max-content;
  }
  .page-heading > .button {
    width: 100%;
  }
  .hero-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-copy {
    padding: 30px 22px;
  }
  .hero-art {
    display: none;
  }
  .metric-grid,
  .admin-metrics,
  .resource-grid,
  .category-grid,
  .correction-grid {
    grid-template-columns: 1fr;
  }
  .admin-shortcuts {
    grid-template-columns: 1fr;
  }
  .admin-shortcuts > a {
    padding: 16px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }
  .admin-shortcuts > a > span {
    width: 42px;
    height: 42px;
  }
  .panel,
  .writing-card,
  .subject-card {
    padding: 18px;
    border-radius: 15px;
  }
  .category-card {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 20px;
    min-height: 0;
  }
  .category-card > .arrow {
    display: none;
  }
  .exercise-card {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 18px;
  }
  .exercise-card > .arrow {
    display: none;
  }
  .writing-card textarea {
    min-height: 52vh;
    padding: 15px;
  }
  .submit-bar {
    display: grid;
  }
  .submit-bar .button {
    width: 100%;
  }
  .score-banner {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .score-banner strong {
    font-size: 2.4rem;
  }
  .message-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .message-row > .arrow {
    display: none;
  }
  .message-row > div > div {
    display: block;
  }
  .search-bar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .search-bar .button {
    width: 100%;
  }
  .heading-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .heading-actions > * {
    width: 100%;
  }
  .heading-actions form .button {
    width: 100%;
  }
  .retake-list form {
    align-items: flex-start;
    flex-direction: column;
  }
  .retake-list .button {
    width: 100%;
  }
  .prompt-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .prompt-tab {
    border-radius: 10px;
  }
  .sticky-save .button {
    width: 100%;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .alert-list article {
    display: grid;
  }
  .alert-list article form,
  .alert-list article .button {
    width: 100%;
  }
  .ai-drawer {
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(82dvh, 720px);
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
    transform-origin: bottom center;
  }
  .ai-widget.open .ai-drawer {
    transform: none;
  }
  .ai-widget.open .ai-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    border: 0;
    background: rgba(3, 10, 22, 0.58);
    backdrop-filter: blur(2px);
  }
  body.assistant-open {
    overflow: hidden;
  }
  .ai-widget-history {
    padding: 15px;
  }
  .ai-message {
    max-width: 91%;
  }
}

@media (max-width: 450px) {
  .page-wrap {
    padding-inline: 13px;
  }
  .topbar {
    padding-inline: 12px;
  }
  .theme-toggle {
    width: 58px;
    flex: 0 0 auto;
  }
  .topbar strong {
    font-size: 0.8rem;
    max-width: 42vw;
  }
  .panel,
  .writing-card,
  .subject-card {
    padding: 15px;
  }
  .metric-card {
    padding: 16px;
  }
  .prompt-tabs {
    grid-template-columns: 1fr;
  }
  .form-actions {
    display: grid;
  }
  .form-actions .button {
    width: 100%;
  }
  .admin-alert-title {
    display: grid;
  }
  .admin-alert-block {
    padding: 16px;
  }
  .ai-fab {
    width: 52px;
    height: 52px;
    padding: 8px;
  }
  .ai-fab strong {
    display: none;
  }
  .ai-fab span {
    width: 36px;
    height: 36px;
  }
  .mobile-bottom-nav {
    left: 8px;
    right: 8px;
    bottom: 7px;
  }
}

@media (max-width: 1050px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-showcase {
    display: none;
  }
}

/* Identité photographique TOPGEND */
.brand-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: #fff;
  box-shadow: 0 8px 22px rgba(4, 19, 45, 0.16);
}
.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.brand-logo-large {
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.brand-light {
  position: relative;
  z-index: 2;
}
.login-showcase {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(
      180deg,
      rgba(3, 15, 38, 0.15),
      rgba(3, 15, 38, 0.66) 62%,
      rgba(3, 15, 38, 0.9)
    ),
    url("../img/brand/login-horizon.593b0752c522.webp") center/cover no-repeat;
}
.login-showcase:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      circle at 75% 20%,
      rgba(31, 113, 255, 0.14),
      transparent 38%
    ),
    linear-gradient(90deg, rgba(3, 19, 47, 0.25), transparent 70%);
}
.showcase-copy,
.showcase-stat {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.photo-credit {
  position: absolute;
  right: 18px;
  bottom: 12px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}
.hero-photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(
      90deg,
      rgba(3, 18, 46, 0.96) 0%,
      rgba(3, 18, 46, 0.84) 42%,
      rgba(3, 18, 46, 0.28) 76%
    ),
    url("../img/brand/hero-commandement.a0a95b0e4740.webp") center 44% / cover no-repeat;
}
.hero-photo:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 12, 31, 0.28));
}
.hero-photo .hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.hero-brand-seal {
  position: absolute;
  right: 7%;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  width: clamp(118px, 12vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.74);
}
.hero-brand-seal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0 28px;
}
.brand-story-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  box-shadow: 0 18px 42px rgba(8, 25, 55, 0.13);
  isolation: isolate;
}
.brand-story-card:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(2, 13, 31, 0.02) 18%,
    rgba(2, 13, 31, 0.9) 100%
  );
  z-index: 1;
  transition: background 0.25s ease;
}
.brand-story-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.brand-story-card:hover img {
  transform: scale(1.045);
}
.brand-story-card:hover:after {
  background: linear-gradient(
    180deg,
    rgba(2, 13, 31, 0.06) 12%,
    rgba(2, 13, 31, 0.94) 100%
  );
}
.brand-story-overlay {
  position: absolute;
  inset: auto 22px 20px;
  z-index: 2;
  display: grid;
  gap: 5px;
}
.brand-story-overlay small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #b8d5ff;
}
.brand-story-overlay strong {
  font-size: 20px;
  line-height: 1.15;
}
.brand-story-overlay > span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.76);
}
.brand-story-overlay b {
  font-size: 15px;
  margin-left: 3px;
  color: #fff;
}
[data-theme="dark"] .brand-story-card {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}
.page-visual-heading {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 230px;
  padding: 38px 42px;
  border-radius: 24px;
  color: #fff;
  box-shadow: var(--shadow);
  align-items: center;
  background-position: center;
  background-size: cover;
}
.page-visual-heading:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(3, 18, 46, 0.96) 0%,
    rgba(3, 18, 46, 0.82) 48%,
    rgba(3, 18, 46, 0.2) 100%
  );
}
.page-visual-heading > div {
  position: relative;
  z-index: 1;
  max-width: 650px;
}
.page-visual-heading h1 {
  color: #fff;
}
.page-visual-heading p:not(.eyebrow) {
  color: #d4e0ef;
  max-width: 560px;
}
.page-visual-heading .eyebrow {
  color: #8fc2fb;
}
.resources-heading {
  background-image: url("../img/brand/detail-insigne.5dbea7a4e121.webp");
  background-position: center 48%;
}
.preparation-heading {
  background-image: url("../img/brand/terrain.28c968212455.webp");
  background-position: center 68%;
}

@media (max-width: 1050px) {
  .login-page {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(250px, 32vh) auto;
  }
  .login-showcase {
    display: flex;
    min-height: 250px;
    padding: 28px 34px;
    background-position: center 64%;
  }
  .login-showcase .showcase-copy {
    margin-top: auto;
  }
  .login-showcase .showcase-copy h1 {
    font-size: clamp(30px, 5vw, 48px);
    margin-bottom: 8px;
  }
  .login-showcase .showcase-copy > p:last-child,
  .login-showcase .showcase-stat {
    display: none;
  }
  .login-panel {
    padding-top: 38px;
  }
  .brand-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brand-story-card:last-child {
    grid-column: 1/-1;
    min-height: 260px;
  }
}
@media (max-width: 700px) {
  .brand-logo {
    width: 38px;
    height: 38px;
  }
  .brand-logo-large {
    width: 46px;
    height: 46px;
  }
  .login-page {
    grid-template-rows: 210px auto;
  }
  .login-showcase {
    min-height: 210px;
    padding: 22px 20px;
    background-position: center 62%;
  }
  .login-showcase .brand small {
    display: none;
  }
  .login-showcase .showcase-copy h1 {
    font-size: 29px;
  }
  .login-showcase .showcase-copy .eyebrow {
    font-size: 9px;
  }
  .login-panel {
    padding: 30px 18px 42px;
  }
  .hero-photo {
    min-height: 390px;
    background:
      linear-gradient(180deg, rgba(3, 18, 46, 0.28), rgba(3, 18, 46, 0.94) 62%),
      url("../img/brand/hero-commandement.a0a95b0e4740.webp") 65% center/cover no-repeat;
    display: flex;
    align-items: flex-end;
  }
  .hero-photo .hero-copy {
    padding: 34px 22px 40px;
  }
  .hero-brand-seal {
    display: block;
    width: 86px;
    right: 18px;
    top: 20px;
    transform: none;
  }
  .brand-story-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .brand-story-card,
  .brand-story-card:last-child {
    grid-column: auto;
    min-height: 210px;
  }
  .brand-story-overlay {
    inset: auto 18px 17px;
  }
  .brand-story-overlay strong {
    font-size: 18px;
  }
  .page-visual-heading {
    min-height: 250px;
    padding: 30px 22px;
    align-items: flex-end;
    background-position: center;
  }
  .page-visual-heading:before {
    background: linear-gradient(
      180deg,
      rgba(3, 18, 46, 0.18),
      rgba(3, 18, 46, 0.94) 65%
    );
  }
  .page-visual-heading > .photo-credit {
    width: auto;
  }
  .resources-heading {
    background-position: 67% center;
  }
  .preparation-heading {
    background-position: 58% center;
  }
}
.ai-action-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 240px;
  overflow-y: auto;
  font: inherit;
  padding: 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
}
.page-editor-tools { position: fixed; right: 28px; bottom: 100px; z-index: 35; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; max-width: calc(100vw - 32px); }
.page-editor-tools .button { box-shadow: 0 6px 20px #001a3040; }
.control-list { display: grid; gap: 8px; }
.control-group { margin: 12px 0; border-bottom: 1px solid #8da1b340; padding-bottom: 14px; }
.control-group summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.control-row { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 16px; border: 1px solid #8da1b340; border-radius: 12px; color: inherit; }
.control-row strong { flex: 1; }
.section-cover { margin: 0 0 24px; border-radius: 16px; overflow: hidden; }
.section-cover img { width: 100%; height: 240px; object-fit: cover; display: block; }
.custom-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-copy, .hero-brand-seal { position: relative; z-index: 2; }
.maintenance-card { max-width: 800px; margin: 48px auto; padding: 40px; }
.activation-wrap { max-width: 720px; margin: 7vh auto; padding: 20px; }
.login-flashes { position: relative; z-index: 5; padding: 12px 24px; }
.intro-question-feedback { border-top: 1px solid #8da1b330; padding: 22px 0; }
.intro-question-feedback:first-of-type { border-top: 0; }
.intro-question-feedback h3 { font-size: 18px; line-height: 1.5; }
.intro-question-feedback .own-answer { border-left: 3px solid #8da1b360; padding-left: 14px; }
.filter-row label { min-width: 180px; }
.heading-actions { flex-wrap: wrap; margin-bottom: 16px; }
.errorlist { white-space: pre-line; }
@media (max-width: 700px) {
  .page-editor-tools { right: 12px; bottom: 144px; }
  .page-editor-tools .button { padding: 9px 12px; font-size: 12px; }
  .control-row { flex-wrap: wrap; }
  .section-cover img { height: 160px; }
}
