/* Finition de l'accueil : hiérarchie plus calme, navigation cohérente et mobile compact. */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 0;
  gap: 0;
  padding: 0 32px 10px;
  border-bottom: 1px solid #ece8f5;
  background: rgba(255,255,255,.98);
  box-shadow: 0 7px 24px rgba(36,18,92,.08);
  backdrop-filter: blur(14px);
}

.header-top {
  min-height: 104px;
  padding-top: 9px;
}

.header .brand {
  width: 250px !important;
}

.header .brand-devoir,
.header .brand-io {
  font-size: 46px !important;
}

.brand .brand-word,
.footer-brand .brand-word {
  display: inline-block !important;
  margin: 0 !important;
  font: 700 46px/.82 "Fredoka", "Arial Rounded MT Bold", sans-serif !important;
  letter-spacing: -1px !important;
  color: #4317a8 !important;
  text-align: center !important;
}

.brand .brand-word-main,
.brand .brand-word-end,
.footer-brand .brand-word-main,
.footer-brand .brand-word-end {
  display: inline !important;
  margin: 0 !important;
  font: inherit !important;
  line-height: inherit !important;
}

.brand .brand-word-main,
.footer-brand .brand-word-main {
  color: #4317a8 !important;
}

.brand .brand-word-end,
.footer-brand .brand-word-end {
  color: #ffc51f !important;
  text-shadow: 1px 1px 0 #e99c00;
}

.header .brand-name > .brand-hat {
  right: -4px !important;
  left: auto !important;
  top: auto !important;
  bottom: 50% !important;
  font-size: 24px !important;
  line-height: 1;
  transform: rotate(-12deg) !important;
  z-index: 2;
}

.header .brand-tagline {
  margin-top: 12px !important;
  padding: 5px 13px 6px !important;
  font-size: 15px !important;
  box-shadow: 2px 2px 0 #6b2bd1;
}

.header .account {
  right: 0;
  gap: 6px;
  padding: 5px;
  border: 1px solid #e2d9f3;
  border-radius: 18px;
  background: #faf8ff;
  box-shadow: 0 7px 18px rgba(62, 31, 125, .10);
}

.header .account button {
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 13px;
  font-size: 14px;
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

.header .account button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(65, 32, 135, .14);
}

.header #loginButton {
  border: 1px solid #bda9e5;
  background: #fff;
  color: #4b2499;
}

.header #signupButton {
  border: 1px solid #eab716;
  background: linear-gradient(180deg, #ffdb4c, #ffc422);
  color: #352078;
}

.header .parent-access-button {
  border-color: #cfc8df;
  background: #f7f5fa;
  color: #332a49;
}

.parent-mark {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-right: 3px;
  place-items: center;
  border-radius: 50%;
  background: #5420b6;
  color: #fff;
  font: 900 13px/1 "Trebuchet MS", Arial, sans-serif;
}

.exercise-card .exercise-brand,
.exercise-card .exercise-brand > span {
  display: inline !important;
  margin: 0 !important;
  font: inherit !important;
}

.exercise-card .exercise-brand > span:first-child {
  color: #4420bd !important;
}

.exercise-card .exercise-brand .exercise-brand-end {
  color: #ffc51f !important;
  text-shadow: 1px 1px 0 #d79a00;
}

.hero-copy .kids-hook {
  gap: 9px;
  padding: 7px 15px 8px !important;
  border: 2px solid #09090d !important;
  border-radius: 999px !important;
  background: #ffd126 !important;
  color: #17175f !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: .1px !important;
  box-shadow: 3px 3px 0 #6b2bd1 !important;
  text-shadow: none !important;
  transform: rotate(-1deg);
}

.hero-copy .kids-hook .hook-star {
  display: inline-block;
  margin: 0;
  color: #5420b6;
  font-size: 18px;
  line-height: 1;
  text-shadow: none;
}

.mobile-auth-shortcuts {
  display: none;
}

.header .menu-parent-access {
  display: none;
}

.header .menu {
  width: min(1120px, 100%);
  justify-content: space-between;
  gap: clamp(12px, 2vw, 30px);
}

.header .menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 5px 2px 8px;
  border-bottom: 3px solid transparent;
  color: #3d3552;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.header .menu a span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: #f3effa;
  color: #5120aa;
  font: 900 15px/1 "Trebuchet MS", Arial, sans-serif;
}

.header .menu a:hover,
.header .menu a:focus-visible {
  color: #511ab2;
}

.header .menu a.active {
  border-bottom-color: #d728d9;
  color: #511ab2;
  padding-bottom: 8px;
}

.hero-copy > p {
  margin: 8px 0 14px;
}

.exercise-card {
  border: 1px solid rgba(87,48,169,.16);
  box-shadow: 0 16px 42px rgba(46,22,114,.18);
}

@media (max-width: 1180px) and (min-width: 901px) {
  .header { padding-inline: 20px; }
  .header .menu { gap: 12px; }
  .header .menu a { font-size: 14px; }
  .header .menu a span { display: none; }
  .header .parent-access-button { display: none; }
}

@media (max-width: 900px) {
  .header {
    min-height: 74px;
    padding: 0 14px;
  }

  .header-top {
    min-height: 74px;
    padding-top: 0;
    justify-content: flex-start;
  }

  .header .brand {
    width: 194px !important;
    align-items: flex-start;
  }

  .header .brand .brand-name {
    margin-left: 2px;
    padding: 4px 11px 8px;
    border-radius: 17px;
  }

  .header .brand-devoir,
  .header .brand-io {
    font-size: 36px !important;
  }

  .header .brand-word {
    font-size: 36px !important;
  }

  .header .brand-name > .brand-hat {
    right: -3px !important;
    left: auto !important;
    top: auto !important;
    bottom: 50% !important;
    font-size: 20px !important;
    transform: rotate(-12deg) !important;
  }

  .header .brand-tagline {
    display: none !important;
  }

  .header .menu-button {
    right: 0;
    width: 46px;
    height: 46px;
    border: 1px solid #d9d2e6;
    border-radius: 13px;
    background: #fff;
    color: #3a2566;
    font-size: 27px;
    box-shadow: 0 3px 12px rgba(40,25,82,.10);
  }

  .mobile-auth-shortcuts {
    position: absolute;
    right: 56px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 136px;
    min-height: 38px;
    padding: 3px;
    border: 1px solid #ded7ea;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(48,25,95,.10);
    overflow: hidden;
  }

  .mobile-auth-shortcuts[hidden] {
    display: none !important;
  }

  .mobile-auth-shortcuts button {
    min-height: 32px;
    padding: 4px 5px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #4c287f;
    font: 800 11px/1 "Trebuchet MS", Arial, sans-serif;
    cursor: pointer;
  }

  .mobile-auth-shortcuts button:last-child {
    background: #4d1ba7;
    color: #fff;
    box-shadow: 0 2px 7px rgba(67,23,168,.22);
  }

  .header .menu.open {
    top: 82px;
    max-height: calc(100dvh - 94px);
  }

  .header .menu-parent-access {
    display: block;
  }

  .header .menu-account {
    display: none !important;
  }

  .header .menu a span {
    color: #4d2791;
    filter: none;
  }

  .hero-copy > p {
    margin-bottom: 12px;
  }
}

@media (max-width: 390px) {
  .header .brand { width: 150px !important; }
  .header .brand-devoir,
  .header .brand-io { font-size: 29px !important; }
  .mobile-auth-shortcuts { right: 52px; width: 132px; }
  .mobile-auth-shortcuts button { font-size: 10.5px; }
}

.revision-sheet-dialog { width:min(680px,calc(100% - 24px)); }
.revision-sheet-content { position:relative;padding:30px; }
.revision-sheet-content>h2 { margin-top:12px;color:#301276;font-size:32px; }
.revision-sheet-content section { margin:16px 0;padding:18px;border:1px solid #ded3f2;border-radius:17px;background:#faf8ff; }
.revision-sheet-content section h3 { margin:0 0 10px;color:#4c1da3; }
.revision-sheet-content li { margin:8px 0;line-height:1.45; }
@media(max-width:600px){.revision-sheet-content{padding:25px 16px 18px}.revision-sheet-content>h2{font-size:27px}.revision-sheet-content section{padding:14px}}

/* Deux grandes rubriques au même gabarit que les autres cartes sur mobile. */
@media (max-width: 700px) {
  .languages-discovery-card,
  .feature-grid .control-tomorrow-card {
    width: auto !important;
    height: 190px !important;
    min-height: 190px !important;
    margin-left: 16px !important;
    margin-right: 16px !important;
    padding: 14px 15px !important;
    border-width: 3px !important;
    border-radius: 24px !important;
    box-shadow: 0 7px 0 #3f1a99, 0 14px 27px rgba(47,21,116,.16) !important;
    overflow: hidden !important;
  }
  .languages-discovery-card {
    grid-template-columns: 64px minmax(0,1fr) !important;
    gap: 12px !important;
  }
  .languages-globe {
    width: 62px !important;
    height: 62px !important;
    font-size: 31px !important;
  }
  .languages-discovery-card small { font-size: 11px !important; }
  .languages-discovery-card h2 {
    margin: 3px 0 !important;
    font-size: 23px !important;
    line-height: 1.03 !important;
  }
  .languages-discovery-card p { display: none !important; }
  .languages-flags {
    margin-top: 6px !important;
    font-size: 16px !important;
  }
  .languages-discovery-card > button {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    border-radius: 13px !important;
  }
  .feature-grid .control-tomorrow-card {
    grid-template-columns: 64px minmax(0,1fr) !important;
    gap: 12px !important;
    margin: 0 !important;
  }
  .control-tomorrow-icon {
    width: 60px !important;
    height: 78px !important;
    border-radius: 16px !important;
  }
  .control-tomorrow-icon span { font-size: 40px !important; }
  .control-tomorrow-copy > small { font-size: 10px !important; }
  .feature-grid .control-tomorrow-copy h3 {
    margin: 3px 0 5px !important;
    font-size: 24px !important;
    line-height: 1.02 !important;
  }
  .feature-grid .control-tomorrow-copy p {
    display: -webkit-box !important;
    margin: 0 0 8px !important;
    overflow: hidden !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .control-tomorrow-steps { display: none !important; }
  .feature-grid .control-tomorrow-card button {
    min-height: 38px !important;
    padding: 7px 11px !important;
    font-size: 13px !important;
    border-radius: 12px !important;
  }
}

/* Collection uniforme des grandes actions de l'accueil sur téléphone. */
@media (max-width: 760px) {
  .tables-callout,
  .expose-callout,
  .languages-discovery-card,
  .feature-grid .control-tomorrow-card,
  .feature-grid .dictation-home-card,
  .feature-grid #progressCard,
  .themed-spaces article,
  .themed-spaces .sports-visual-card,
  .themed-spaces .culture-visual-card {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    border: 0 !important;
    border-radius: 24px !important;
    background-color: #4917ad !important;
    background-image:
      radial-gradient(ellipse at 104% 118%, rgba(255,216,55,.72) 0 13%, rgba(255,216,55,.31) 14% 23%, rgba(255,216,55,.10) 24% 31%, transparent 32%),
      linear-gradient(135deg,#2e0d7b 0%,#5119ba 52%,#7130d2 100%) !important;
    color: #fff !important;
    box-shadow: 0 8px 0 #321078, 0 16px 28px rgba(45,16,119,.20) !important;
    overflow: hidden !important;
  }
  .tables-callout,
  .expose-callout,
  .languages-discovery-card {
    margin: 18px 16px !important;
    width: calc(100% - 32px) !important;
  }
  .tables-callout:before,
  .tables-callout:after,
  .control-tomorrow-card:after { display: none !important; }
  .tables-callout h2,
  .expose-callout h2,
  .languages-discovery-card h2,
  .feature-grid .control-tomorrow-copy h3,
  .feature-grid .dictation-home-content h3,
  .feature-grid #progressCard h3,
  .themed-spaces article h2 {
    color: #fff !important;
    text-shadow: none !important;
  }
  .tables-callout p,
  .expose-callout p,
  .feature-grid .control-tomorrow-copy p,
  .feature-grid .dictation-home-content p,
  .feature-grid #progressCard p {
    color: #f2ecff !important;
  }
  .tables-callout > button,
  .expose-callout > button,
  .languages-discovery-card > button,
  .feature-grid .control-tomorrow-card button,
  .feature-grid .dictation-home-button,
  .themed-spaces article > button {
    border: 0 !important;
    background: #ffd63b !important;
    color: #351078 !important;
    box-shadow: 0 4px 0 #bd8d00 !important;
  }
  .tables-callout { grid-template-columns: 62px minmax(0,1fr) !important;gap: 11px !important;padding: 14px !important; }
  .compact-tables .tables-robot { width: 58px !important;height: 58px !important;border: 0 !important;border-radius: 17px !important;box-shadow: none !important;font-size: 31px !important; }
  .compact-tables h2 { margin: 3px 0 !important;font-size: 23px !important; }
  .compact-tables p { font-size: 12px !important;line-height: 1.25 !important; }
  .compact-tables > button { min-height: 40px !important;padding: 7px 10px !important;font-size: 13px !important; }
  .expose-callout { grid-template-columns: 62px minmax(0,1fr) !important;gap: 11px !important;padding: 14px !important; }
  .expose-icon { width: 58px !important;height: 58px !important;border-radius: 17px !important;box-shadow: none !important;font-size: 28px !important; }
  .expose-callout h2 { margin: 3px 0 !important;font-size: 23px !important; }
  .expose-callout p { display: -webkit-box;overflow: hidden;font-size: 12px !important;line-height: 1.25 !important;-webkit-line-clamp: 2;-webkit-box-orient: vertical; }
  .expose-callout > button { min-height: 40px !important;padding: 7px 10px !important;font-size: 13px !important; }
  .languages-discovery-card small { color: #ffde4e !important; }
  .feature-grid .control-tomorrow-card,
  .feature-grid .dictation-home-card,
  .feature-grid #progressCard { margin: 0 !important; }
  .feature-grid .dictation-home-card { grid-template-columns: 76px minmax(0,1fr) !important;padding: 14px !important;gap: 11px !important; }
  .dictation-home-visual { min-height: 120px !important; }
  .dictation-home-quota { color: #ffe878 !important; }
  .feature-grid #progressCard { padding: 18px !important; }
  .feature-grid #progressCard > span { font-size: 40px !important; }
  .themed-spaces { margin-left: 16px !important;margin-right: 16px !important; }
  .themed-spaces article { position: relative !important;padding: 18px !important; }
  .themed-spaces article > div,
  .themed-spaces .sports-visual-card > div,
  .themed-spaces .culture-visual-card > div { position: relative !important;top: auto !important;left: auto !important;max-width: 68% !important;background: transparent !important; }
  .themed-spaces article h2 { font-size: 25px !important; }
}

.catalog-dialog.sheet-mode {
  border: 3px solid #f1c926;
  background: #fff;
}
.catalog-dialog.sheet-mode .catalog-content {
  background: linear-gradient(180deg,#fffbea 0,#fff 190px);
}
.catalog-dialog.sheet-mode .lesson-label {
  background: #ffd83d;
  color: #321176;
}
.catalog-dialog.sheet-mode .catalog-summary {
  border: 1px solid #e4d7f5;
  background: #f6f1ff;
}
.catalog-dialog.sheet-mode .catalog-chapters button {
  border-color: #e0aa00;
  background: #ffd83d;
  color: #351078;
}
@media(max-width:600px){
  .catalog-dialog.sheet-mode {
    width:100%;
    max-width:none;
    height:100dvh;
    max-height:100dvh;
    margin:0;
    border:0;
    border-radius:0;
  }
  .catalog-dialog.sheet-mode .catalog-content {
    min-height:100%;
    padding-top:32px;
  }
}
