/* Lexium : présentation. Palette : note Branding (fond sombre #1A1F1C, traits #52C872, surfaces #1F3A2A ; fond clair #F4F7F5, traits #28894A). */
:root {
  --lx-ink: #1A1F1C;
  --lx-ink-2: #222822;
  --lx-deep: #1F3A2A;
  --lx-rule-d: #2E5240;
  --lx-green: #52C872;
  --lx-fill: #3A6B4E;
  --lx-on-d: #E8F2EC;
  --lx-mute-d: #A9C7B4;
  --lx-paper: #F4F7F5;
  --lx-green-l: #28894A;
  --lx-surface-l: #D6EDDE;
  --lx-rule-l: #B8D9C2;
  --lx-on-l: #1A1F1C;
  --lx-mute-l: #4A5E52;
  --lx-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --lx-sans: "Geist", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body.lx-page { background: var(--lx-ink); font-family: var(--lx-sans); -webkit-font-smoothing: antialiased; }

/* Base typographique */
.lx-page .et_pb_text, .lx-page .et_pb_text p, .lx-page .et_pb_code { font-family: var(--lx-sans); }
.lx-page h1, .lx-page h2, .lx-page h3, .lx-page h4 { padding-bottom: 0; }
.lx-page p { padding-bottom: 0; }
.lx-dark, .lx-dark p, .lx-dark li, .lx-dark h1, .lx-dark h2, .lx-dark h3, .lx-dark h4 { color: var(--lx-on-d); }
.lx-light, .lx-light p, .lx-light li, .lx-light h1, .lx-light h2, .lx-light h3, .lx-light h4 { color: var(--lx-on-l); }

.lx-page .et_pb_row { padding: 0; }
.lx-page .et_pb_text { margin-bottom: 0; }

.lx-marque { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.lx-marque img { width: 34px; height: 34px; border-radius: 9px; display: block; }

.lx-eyebrow p { font-size: 14px; font-weight: 500; letter-spacing: 0.01em; line-height: 1.4; }
.lx-dark .lx-eyebrow p { color: var(--lx-green); }
.lx-light .lx-eyebrow p { color: var(--lx-green-l); }

.lx-h1 h1 {
  font-family: var(--lx-serif); font-weight: 400; font-size: clamp(44px, 6.2vw, 82px);
  line-height: 1.02; letter-spacing: -0.022em; text-wrap: balance;
}
.lx-h2 h2 {
  font-family: var(--lx-serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.06; letter-spacing: -0.018em; text-wrap: balance;
}
.lx-h3 h3 {
  font-family: var(--lx-serif); font-weight: 400; font-size: clamp(27px, 3vw, 38px);
  line-height: 1.12; letter-spacing: -0.012em; text-wrap: balance;
}
.lx-lede p { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; max-width: 34em; }
.lx-dark .lx-lede p { color: var(--lx-mute-d); }
.lx-light .lx-lede p { color: var(--lx-mute-l); }
.lx-corps p { font-size: 17px; line-height: 1.6; max-width: 32em; }
.lx-dark .lx-corps p { color: var(--lx-mute-d); }
.lx-light .lx-corps p { color: var(--lx-mute-l); }
.lx-corps p + p { margin-top: 0.9em; }
.lx-corps h3 { font-size: 19px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; letter-spacing: -0.005em; }
.lx-astuce p { font-size: 15px; line-height: 1.5; max-width: 30em; padding-left: 14px; border-left: 2px solid var(--lx-green); color: var(--lx-on-d); }

.lx-esp-s { margin-top: 16px !important; }
.lx-esp-m { margin-top: 28px !important; }
.lx-esp-l { margin-top: 56px !important; }

/* Bouton */
.lx-page .lx-btn, .lx-page .lx-btn:hover {
  display: inline-block; font-family: var(--lx-sans); font-size: 16px; font-weight: 600; line-height: 1.2;
  color: var(--lx-ink) !important; background: var(--lx-green); border: 0; border-radius: 10px;
  padding: 15px 22px !important; letter-spacing: 0;
}
.lx-page .lx-btn:hover { background: #6BD889; }
.lx-page .lx-btn::after, .lx-page .lx-btn:hover::after { display: none; }
.lx-page .lx-btn:focus-visible { outline: 2px solid var(--lx-on-d); outline-offset: 3px; }

/* Cartes de mots, comme dans l'application */
.lx-carte {
  position: relative; list-style: none; background: var(--lx-ink-2); border: 1px solid var(--lx-rule-d);
  border-radius: 10px; padding: 12px 14px; color: var(--lx-on-d); font-family: var(--lx-sans); text-align: left;
}
.lx-carte .lx-point { position: absolute; top: 13px; right: 14px; width: 10px; height: 10px; border-radius: 50%; transition: background-color .5s; }
.lx-carte .lx-en { font-size: 25px; font-weight: 600; line-height: 1.15; padding-right: 18px; color: var(--lx-on-d); overflow-wrap: anywhere; }
.lx-carte .lx-fr { font-size: 14px; line-height: 1.4; color: var(--lx-mute-d); overflow-wrap: anywhere; }
.lx-carte .lx-ctx { margin-top: 7px; font-size: 13px; line-height: 1.35; font-style: italic; text-align: right; color: var(--lx-on-d); opacity: .82; overflow-wrap: anywhere; }
.lx-carte .lx-date { margin-top: 5px; font-size: 11px; text-align: right; color: var(--lx-mute-d); }

/* Héros : trois mots rencontrés */
.lx-pile { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 390px; margin-left: auto; }
.lx-pile .lx-carte { padding: 16px 18px; box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.lx-pile .lx-en { font-size: 31px; }
.lx-pile .lx-fr { font-size: 15px; }
.lx-pile .lx-ctx { font-size: 14px; }
.lx-pile .lx-carte:nth-child(1) { transform: translateX(-26px) rotate(-1.2deg); }
.lx-pile .lx-carte:nth-child(2) { transform: translateX(10px) rotate(.8deg); }
.lx-pile .lx-carte:nth-child(3) { transform: translateX(-10px) rotate(-.5deg); }
.lx-pile .lx-lieu { display: block; margin-top: 7px; font-size: 12px; color: var(--lx-green); }

/* Constat : les endroits où les mots se perdent */
.lx-perdus { list-style: none; margin: 0; padding: 0; font-family: var(--lx-serif); font-size: clamp(25px, 2.7vw, 34px); line-height: 1.25; color: var(--lx-on-l); }
.lx-perdus li { padding: 13px 0; border-top: 1px solid var(--lx-rule-l); list-style: none; }
.lx-perdus li:last-child { border-bottom: 1px solid var(--lx-rule-l); }

/* Convictions */
.lx-conviction { border-top: 1px solid var(--lx-rule-d); padding-top: 18px !important; }
.lx-conviction h3 { color: var(--lx-on-d); }

/* Le téléphone */
.lx-tel {
  width: min(330px, 100%); margin: 0 auto; background: var(--lx-ink); border: 1px solid var(--lx-rule-d); border-radius: 34px;
  padding: 9px; box-shadow: 0 30px 70px rgba(0,0,0,.38); font-family: var(--lx-sans); color: var(--lx-on-d);
}
.lx-ecran { position: relative; height: 610px; background: var(--lx-ink); border-radius: 26px; overflow: hidden; overflow: clip; display: flex; flex-direction: column; }
.lx-ecran-tete { padding: 20px 16px 10px; font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--lx-on-d); }
.lx-ecran-corps { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 12px 16px; display: flex; flex-direction: column; gap: 9px; }
.lx-ecran-corps > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
#lx-carnet { padding-bottom: 62px; } /* la dernière carte remonte au-dessus du bouton + */
.lx-nav { display: flex; border-top: 1px solid var(--lx-rule-d); padding: 7px 6px 12px; }
.lx-nav span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--lx-mute-d); }
.lx-nav span.lx-actif { color: var(--lx-green); }
.lx-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.lx-plus {
  position: absolute; right: 16px; bottom: 70px; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: var(--lx-green); color: var(--lx-ink); display: grid; place-items: center; z-index: 2;
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
}
.lx-plus svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.lx-plus::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--lx-green); animation: lx-appel 2.2s ease-out infinite; }
.lx-plus.lx-vu::before { display: none; }
@keyframes lx-appel { from { transform: scale(1); opacity: .8; } to { transform: scale(1.55); opacity: 0; } }

.lx-feuille {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: var(--lx-ink-2); border-top: 1px solid var(--lx-rule-d);
  border-radius: 20px 20px 0 0; padding: 16px 14px 18px; transform: translateY(102%); visibility: hidden;
  transition: transform .26s ease, visibility 0s linear .26s; display: flex; flex-direction: column; gap: 10px;
}
/* Visible tout de suite à l'ouverture : sinon le champ ne reçoit pas le focus et le clavier du téléphone ne s'ouvre pas. */
.lx-feuille.lx-ouverte { transform: none; visibility: visible; transition: transform .26s ease, visibility 0s linear 0s; }
.lx-feuille-tete { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 600; }
.lx-fermer { background: none; border: 0; color: var(--lx-mute-d); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.lx-champ { display: block; font-size: 12px; color: var(--lx-mute-d); }
.lx-page .lx-tel input {
  display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 10px 11px; font: 16px var(--lx-sans);
  color: var(--lx-on-d); background: var(--lx-ink); border: 1px solid var(--lx-rule-d); border-radius: 8px;
}
.lx-page .lx-tel input:focus { outline: 2px solid var(--lx-green); outline-offset: 0; border-color: transparent; }
.lx-page .lx-tel input::placeholder { color: #7D9486; opacity: 1; }
.lx-erreur { min-height: 0; font-size: 13px; color: #F1C40F; }
.lx-erreur:empty { display: none; }
.lx-action {
  width: 100%; padding: 12px; font: 600 15px var(--lx-sans); color: var(--lx-ink); background: var(--lx-green);
  border: 0; border-radius: 9px; cursor: pointer;
}
.lx-action:disabled { background: var(--lx-fill); color: #C8E8D4; cursor: default; }
.lx-tel button:focus-visible { outline: 2px solid var(--lx-on-d); outline-offset: 2px; }

.lx-toast {
  position: absolute; left: 50%; top: 14px; z-index: 4; transform: translate(-50%, -70px); padding: 8px 14px; border-radius: 99px; white-space: nowrap;
  background: var(--lx-fill); color: var(--lx-on-d); font-size: 13px; font-weight: 500; transition: transform .25s;
}
.lx-toast.lx-visible { transform: translate(-50%, 0); }
.lx-carte.lx-neuf { animation: lx-arrive .45s ease; }
@keyframes lx-arrive { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* Explorer */
.lx-onglets { display: flex; gap: 4px; padding: 4px; background: var(--lx-ink-2); border: 1px solid var(--lx-rule-d); border-radius: 10px; }
.lx-onglets button { flex: 1; padding: 8px 4px; font: 500 12.5px var(--lx-sans); color: var(--lx-mute-d); background: none; border: 0; border-radius: 7px; cursor: pointer; }
.lx-onglets button[aria-selected="true"] { background: var(--lx-deep); color: var(--lx-green); }
.lx-cat { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--lx-ink-2); border: 1px solid var(--lx-rule-d); border-radius: 10px; padding: 11px 14px; list-style: none; }
.lx-cat b { display: block; font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--lx-on-d); }
.lx-cat small { display: block; font-size: 13px; color: var(--lx-mute-d); }
.lx-cat em { font-style: normal; font-size: 21px; font-weight: 600; white-space: nowrap; color: var(--lx-on-d); }
.lx-panneau[hidden] { display: none; }
.lx-note { font-size: 12.5px; line-height: 1.45; color: var(--lx-mute-d); padding: 4px 2px; }

/* Réviser */
.lx-avance { height: 5px; margin: 0 16px; background: var(--lx-ink-2); border-radius: 9px; overflow: hidden; }
.lx-avance i { display: block; height: 100%; width: 0; background: var(--lx-green); border-radius: 9px; transition: width .3s; }
.lx-rev { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 20px 14px 16px; gap: 12px; }
.lx-rev-consigne { font-size: 13px; color: var(--lx-mute-d); }
.lx-rev-mot { display: flex; align-items: center; gap: 10px; font-size: 34px; font-weight: 600; line-height: 1.12; color: var(--lx-on-d); overflow-wrap: anywhere; }
.lx-rev-mot i { flex: none; width: 11px; height: 11px; border-radius: 50%; transition: background-color .5s; }
.lx-rev-retour { min-height: 44px; font-size: 14px; line-height: 1.35; }
.lx-rev-retour b { display: block; font-size: 17px; font-weight: 600; color: var(--lx-on-d); }
.lx-rev-retour.lx-bon span { color: var(--lx-green); }
.lx-rev-retour.lx-faux span { color: #F08A7B; }
.lx-rev-pied { margin-top: auto; }
.lx-resultat { text-align: center; margin: auto 0; }
.lx-resultat b { display: block; font-family: var(--lx-serif); font-weight: 400; font-size: 58px; line-height: 1; color: var(--lx-on-d); }
.lx-resultat span { display: block; margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--lx-mute-d); }

.lx-legende p { font-size: 13px; line-height: 1.45; text-align: center; color: var(--lx-mute-d); margin-top: 14px; }

/* Numéro de geste */
.lx-geste p { font-size: 15px; font-weight: 500; color: var(--lx-green); }
.lx-geste p b { font-weight: 600; }

/* Est / n'est pas */
.lx-est { width: 100%; border-collapse: collapse; font-family: var(--lx-sans); border: 0; margin: 0; }
.lx-est th, .lx-est td { text-align: left; vertical-align: top; padding: 16px 20px 16px 0; border: 0; border-top: 1px solid var(--lx-rule-l); font-size: 17px; line-height: 1.4; color: var(--lx-on-l); }
.lx-est th { border-top: 0; font-size: 14px; font-weight: 600; color: var(--lx-green-l); padding-top: 0; }
.lx-est td:last-child, .lx-est th:last-child { color: var(--lx-mute-l); }
.lx-est th:last-child { font-weight: 500; }

/* État du projet */
.lx-liste { list-style: none; margin: 0; padding: 0; }
.lx-liste li { list-style: none; position: relative; padding: 11px 0 11px 22px; border-top: 1px solid var(--lx-rule-d); font-size: 16px; line-height: 1.45; color: var(--lx-on-d); }
.lx-liste li::before { content: ""; position: absolute; left: 0; top: 18px; width: 9px; height: 9px; border-radius: 50%; background: var(--lx-green); }
.lx-liste.lx-avenir li { color: var(--lx-mute-d); }
.lx-liste.lx-avenir li::before { background: transparent; border: 1.5px solid var(--lx-mute-d); box-sizing: border-box; }
.lx-liste-titre h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--lx-green); }
.lx-liste-titre.lx-gris h3 { color: var(--lx-mute-d); }

.lx-pied p { font-size: 13px; line-height: 1.5; color: var(--lx-mute-d); }

/* Apparition légère, seulement si le script tourne et jamais dans le Visual Builder */
.lx-js body:not(.et-fb) .lx-rev-el { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.lx-js body:not(.et-fb) .lx-rev-el.lx-la { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .lx-pile { max-width: 440px; margin: 0 auto; }
  .lx-pile .lx-carte:nth-child(1), .lx-pile .lx-carte:nth-child(2), .lx-pile .lx-carte:nth-child(3) { transform: none; }
}
@media (max-width: 767px) {
  .lx-page .et_pb_column { margin-bottom: 40px; }
  .lx-page .et_pb_column:last-child { margin-bottom: 0; }

  /* Rythme vertical resserré sur téléphone */
  .lx-esp-m { margin-top: 22px !important; }
  .lx-esp-l { margin-top: 40px !important; }
  .lx-hero-cartes { margin-top: 0 !important; }

  /* Titres : assez grands pour porter la page, sans couper de mot */
  .lx-h1 h1 { font-size: clamp(38px, 11.5vw, 54px); line-height: 1.04; }
  .lx-h2 h2 { font-size: clamp(30px, 8.8vw, 42px); line-height: 1.08; }
  .lx-h3 h3 { font-size: clamp(26px, 7.4vw, 34px); }
  .lx-lede p { font-size: 18px; }
  .lx-corps p { font-size: 16.5px; max-width: none; }
  .lx-astuce p { max-width: none; }

  /* Bouton principal : pleine largeur, facile à atteindre avec le pouce */
  .lx-page .lx-btn, .lx-page .lx-btn:hover { display: block; width: 100% !important; box-sizing: border-box; text-align: center; padding: 17px 20px !important; }
  .lx-page .et_pb_button_module_wrapper { width: 100%; }

  /* Cartes du héros */
  .lx-pile { max-width: none; }
  .lx-pile .lx-en { font-size: 28px; }

  /* Le téléphone reconstitué tient dans l'écran du vrai téléphone */
  .lx-tel { width: 100%; padding: 6px; border-radius: 28px; box-shadow: 0 16px 40px rgba(0,0,0,.32); }
  .lx-ecran { height: 560px; height: clamp(480px, 78svh, 560px); border-radius: 22px; }
  .lx-plus { bottom: 66px; }

  /* Tableau : deux colonnes égales, sans débordement */
  .lx-est { table-layout: fixed; }
  .lx-est th, .lx-est td { font-size: 15px; padding: 13px 12px 13px 0; overflow-wrap: anywhere; }
  .lx-est th:last-child, .lx-est td:last-child { padding-right: 0; }

  .lx-liste li { font-size: 15.5px; }
}

/* Gestes tactiles : pas de zoom au double appui, zones d'appui d'au moins 44 px */
.lx-tel button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.lx-page .lx-btn { touch-action: manipulation; }
.lx-fermer { min-width: 44px; min-height: 44px; margin: -10px -8px -10px 0; }
.lx-onglets button { min-height: 44px; line-height: 1.2; }
.lx-action { min-height: 46px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lx-plus::before { animation: none; display: none; }
  .lx-js body:not(.et-fb) .lx-rev-el { opacity: 1; transform: none; transition: none; }
  .lx-feuille, .lx-toast, .lx-carte.lx-neuf { transition: none; animation: none; }
}

/* Corrections d'héritage : styles de contenu du thème (listes, tableaux, écarts automatiques des colonnes) */
.lx-page .et_pb_column, .lx-page .et_pb_section { row-gap: 0 !important; }
.lx-page .et_pb_code ul { margin: 0 !important; padding: 0 !important; }
.lx-page .et_pb_code ul#lx-carnet { padding-bottom: 62px !important; }
.lx-page .et_pb_code ul.lx-pile { margin-left: auto !important; }
.lx-page .lx-est, .lx-page .lx-est tr { border: 0 !important; }
.lx-page .lx-est tr th, .lx-page .lx-est tr td { padding: 16px 20px 16px 0; border: 0; border-top: 1px solid var(--lx-rule-l); }
.lx-page .lx-est tr th { border-top: 0; padding-top: 0; }
@media (max-width: 980px) { .lx-page .et_pb_code ul.lx-pile { margin: 0 auto !important; } }
@media (max-width: 767px) {
  .lx-page .lx-est tr th, .lx-page .lx-est tr td { padding: 13px 12px 13px 0; }
  .lx-page .lx-est tr th { padding-top: 0; }
  .lx-page .lx-est tr th:last-child, .lx-page .lx-est tr td:last-child { padding-right: 0; }
  body.lx-page a.lx-btn.et_pb_button, body.lx-page a.lx-btn.et_pb_button:hover { width: 100% !important; max-width: none !important; }
}
