/* Values copied from the cmaliste site theme (direction du site). */
:root {
  --ink: #192024;
  --text-secondary: #5A6872;
  --page: #FFFFFF;
  --panel: #F0F3F5;
  --border: #D9E2E8;
  --accent-vivid: #E6007E;
  --button-gradient: linear-gradient(135deg, #DE0A73, #C8086A);
  --button-gradient-hover: linear-gradient(135deg, #C2085F, #AC0757);
  --button-gradient-pressed: linear-gradient(135deg, #AC0757, #9E0057);
  --radius-control: 0.5rem;
  --radius-panel: 0.75rem;
  --radius-card: 2rem;
  --shadow-default: 0 4px 16px rgb(25 32 36 / 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.25rem;
}

/* Header: full width, 16px side margins on mobile, 24px on desktop */
.header {
  display: flex;
  align-items: center;
  min-height: 4rem;
  padding: 0 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  border-radius: var(--radius-control);
}

.logo img {
  display: block;
  width: 8.75rem;
  height: auto;
}

/* Grey panel with the school pattern, 16px from the screen edges */
.panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 1rem 1rem;
  padding: 2.5rem 1rem;
  border-radius: var(--radius-panel);
  background: var(--panel) url("brand/school-hero-bg.svg") center / cover no-repeat;
}

.card {
  width: 100%;
  max-width: 46rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--page);
  box-shadow: var(--shadow-default);
}

.title {
  margin: 0;
  font-size: 2rem;
  line-height: 2.5rem;
  font-weight: 700;
  overflow-wrap: break-word;
}

.dot {
  color: var(--accent-vivid);
}

.lead {
  margin: 1rem 0 0;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
}

.text {
  margin: 1.5rem 0 0;
  color: var(--text-secondary);
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-control);
  background: var(--button-gradient);
  color: #FFFFFF;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 200ms ease;
}

.button:hover {
  background: var(--button-gradient-hover);
}

.button:active {
  background: var(--button-gradient-pressed);
}

.subtitle {
  margin: 2rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  height: 100%;
  min-height: 2.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--page);
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 200ms ease;
}

.tile:hover {
  background: var(--panel);
}

.tile:hover .tile-label {
  color: var(--text-secondary);
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-control);
  background: var(--panel);
}

.tile-icon svg {
  width: 2rem;
  height: 2rem;
}

.tile-label {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (min-width: 761px) {
  .header {
    padding: 0 1.5rem;
  }

  .panel {
    padding: 4rem 2rem;
  }

  .card {
    padding: 3rem;
  }

  .title {
    font-size: 2.75rem;
    line-height: 3.5rem;
  }

  .button {
    display: inline-flex;
  }

  .tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
