/* ==========================================================================
   Formation « Entendre la voix de Dieu » — charte graphique du tableau périodique
   Palette : jaune #FFBE0B · orange #FB5607 · gris #737373 · rose #FF006E
             rose clair #FF66C4 · lavande #A484E1 · violet #8338EC · bleu #3A86FF
   Fond blanc cassé, bandeau crème #FCF6DB, titres noirs très gras + manuscrit
   ========================================================================== */

/* ————— Polices embarquées (site 100% hors-ligne) ————— */
@font-face {
  font-family: 'Homebreaks';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Homebreaks.otf') format('opentype');
}

@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/archivoblack-400-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/archivoblack-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-400i-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-400i-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-500i-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-500i-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-400-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-500-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-600-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-700-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --jaune: #FFBE0B;
  --orange: #FB5607;
  --gris: #737373;
  --rose: #FF006E;
  --rose-clair: #FF66C4;
  --lavande: #A484E1;
  --violet: #8338EC;
  --bleu: #3A86FF;
  --creme: #FCF6DB;
  --fond: #FDFCF8;
  --encre: #111111;
  --font-titre: "Archivo Black", "Arial Black", sans-serif;
  --font-manuscrit: "Homebreaks", "Permanent Marker", cursive;
  --font-texte: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-texte);
  background: var(--fond);
  color: var(--encre);
  line-height: 1.65;
  /* léger grain de papier */
  background-image: radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ————— En-tête façon affiche ————— */
.site-header {
  text-align: center;
  padding: 48px 16px 8px;
  position: relative;
  overflow: hidden;
}

.titre-pill {
  display: inline-block;
  background: var(--creme);
  border-radius: 60px;
  padding: 14px 44px;
  margin: 0 auto;
}

.titre-pill h1 {
  font-family: var(--font-titre);
  font-size: clamp(1.5rem, 4.2vw, 3.2rem);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--encre);
  line-height: 1.1;
}

.sous-titre {
  font-family: var(--font-manuscrit);
  font-size: clamp(1.2rem, 2.8vw, 2.1rem);
  margin-top: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.trait-marqueur {
  width: min(420px, 60%);
  height: 7px;
  margin: 16px auto 0;
  background: var(--encre);
  border-radius: 50% 50% 50% 50% / 100% 100% 0 0;
  transform: rotate(-0.6deg);
}

.intro {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 0 20px;
  font-size: 1.02rem;
  color: #333;
}

/* doodles décoratifs discrets */
.doodle {
  position: absolute;
  opacity: 0.08;
  font-size: 4rem;
  user-select: none;
  pointer-events: none;
}

/* ————— Légende des familles ————— */
.legende {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 26px 16px 6px;
  max-width: 1200px;
  margin: 0 auto;
}

.legende button {
  font-family: var(--font-texte);
  font-weight: 600;
  font-size: 0.82rem;
  border: none;
  border-radius: 40px;
  padding: 8px 16px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s;
}

.legende button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.legende.filtre-actif button:not(.actif) { opacity: 0.25; }
.legende button.actif { box-shadow: 0 0 0 3px #fff, 0 0 0 5px currentColor; }

/* ————— Tableau périodique ————— */
.table-wrap {
  overflow-x: auto;
  padding: 26px 20px 40px;
  -webkit-overflow-scrolling: touch;
}

.table-periodique {
  display: grid;
  grid-template-columns: repeat(14, minmax(76px, 1fr));
  grid-template-rows: auto repeat(8, 104px);
  gap: 5px;
  max-width: 1440px;
  margin: 0 auto;
  min-width: 1150px;
}

.famille-header {
  font-family: var(--font-manuscrit);
  font-size: 0.86rem;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1px;
  align-self: end;
  padding: 0 4px 8px;
  line-height: 1.25;
  cursor: pointer;
}

.case {
  border-radius: 4px;
  color: #fff;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.25s, opacity 0.25s;
  border: none;
  text-align: left;
  font-family: var(--font-texte);
}

.case:hover, .case:focus-visible {
  transform: scale(1.09);
  z-index: 5;
  box-shadow: 0 10px 26px rgba(0,0,0,0.3);
  outline: none;
}

.case .num {
  font-size: 0.62rem;
  font-weight: 600;
  opacity: 0.85;
  line-height: 1;
}

.case .sym {
  font-family: var(--font-titre);
  font-size: 1.55rem;
  line-height: 1.15;
  margin-top: 2px;
}

.case .nom {
  margin-top: auto;
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.22;
}

.table-periodique.filtre .case { opacity: 0.15; filter: grayscale(0.7); }
.table-periodique.filtre .case.visible { opacity: 1; filter: none; }

/* ————— Bandeau familles (sections descriptives) ————— */
.familles-section {
  max-width: 1100px;
  margin: 10px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.famille-card {
  border-radius: 14px;
  padding: 22px 22px 18px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.famille-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.22); }
.famille-card h3 { font-family: var(--font-titre); font-size: 1.05rem; text-transform: uppercase; margin-bottom: 8px; }
.famille-card p { font-size: 0.88rem; opacity: 0.95; }
.famille-card .compte { font-family: var(--font-manuscrit); font-size: 0.9rem; margin-top: 10px; display: block; opacity: 0.9; }

/* ————— Page outil (vue détail) ————— */
#vue-outil { display: none; }
body.mode-outil #vue-table { display: none; }
body.mode-outil #vue-outil { display: block; }

.outil-hero {
  color: #fff;
  padding: 40px 20px 34px;
}

.outil-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}

.outil-tuile {
  flex: 0 0 auto;
  width: 128px;
  height: 136px;
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  border: 2px solid rgba(255,255,255,0.55);
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
}
.outil-tuile .num { font-size: 0.8rem; font-weight: 600; }
.outil-tuile .sym { font-family: var(--font-titre); font-size: 2.6rem; line-height: 1.1; }
.outil-tuile .mini-nom { margin-top: auto; font-size: 0.68rem; font-weight: 700; line-height: 1.2; }

.outil-titres { flex: 1 1 320px; }
.outil-titres .famille-label {
  font-family: var(--font-manuscrit);
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.92;
}
.outil-titres h1 {
  font-family: var(--font-titre);
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  text-transform: uppercase;
  line-height: 1.12;
  margin: 6px 0 10px;
}
.outil-titres .accroche {
  font-size: 1.08rem;
  font-weight: 500;
  font-style: italic;
  opacity: 0.96;
}

.fil-ariane {
  max-width: 900px;
  margin: 0 auto 18px;
  font-size: 0.85rem;
}
.fil-ariane a { color: #fff; text-decoration: none; font-weight: 600; opacity: 0.9; }
.fil-ariane a:hover { text-decoration: underline; opacity: 1; }

.outil-corps {
  max-width: 900px;
  margin: 0 auto;
  padding: 34px 20px 30px;
}

.bloc { margin-bottom: 38px; }

.bloc-titre {
  font-family: var(--font-titre);
  font-size: 1.15rem;
  text-transform: uppercase;
  display: inline-block;
  background: var(--creme);
  border-radius: 40px;
  padding: 8px 22px;
  margin-bottom: 18px;
}

.bloc-titre.souligne { background: none; padding: 0; border-bottom: 6px solid; border-image: none; }

.definition {
  font-size: 1.08rem;
  background: var(--creme);
  border-radius: 14px;
  padding: 22px 26px;
  border-left: 8px solid;
}

.enseignement-section { margin-bottom: 26px; }
.enseignement-section h3 {
  font-family: var(--font-texte);
  font-weight: 700;
  font-size: 1.12rem;
  margin-bottom: 8px;
  padding-left: 14px;
  border-left: 5px solid;
}
.enseignement-section p { margin-bottom: 12px; color: #222; }

.pratique-liste { list-style: none; counter-reset: etape; }
.pratique-liste li {
  counter-increment: etape;
  position: relative;
  padding: 10px 14px 10px 58px;
  margin-bottom: 10px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.pratique-liste li::before {
  content: counter(etape);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c, var(--encre));
  color: #fff;
  font-family: var(--font-titre);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exercices-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.exercice-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(0,0,0,0.09);
  display: flex;
  flex-direction: column;
}
.exercice-card .ex-head { color: #fff; padding: 12px 18px; }
.exercice-card .ex-niveau {
  font-family: var(--font-manuscrit);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.95;
}
.exercice-card .ex-titre { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.exercice-card .ex-duree { font-size: 0.78rem; opacity: 0.9; margin-top: 3px; }
.exercice-card ol { padding: 16px 18px 18px 34px; font-size: 0.88rem; }
.exercice-card ol li { margin-bottom: 8px; }

.vigilance {
  background: #FFF7E8;
  border: 2px dashed var(--jaune);
  border-radius: 14px;
  padding: 20px 24px;
}
.vigilance ul { padding-left: 20px; }
.vigilance li { margin-bottom: 10px; }

.versets-grille { display: grid; gap: 14px; }
.verset {
  background: #fff;
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  font-style: italic;
}
.verset .ref {
  display: block;
  font-style: normal;
  font-weight: 700;
  margin-top: 8px;
  font-size: 0.86rem;
}

.citation-bloc {
  text-align: center;
  padding: 30px 24px;
  border-radius: 16px;
  color: #fff;
  font-size: 1.15rem;
  font-style: italic;
}
.citation-bloc .auteur {
  display: block;
  margin-top: 12px;
  font-family: var(--font-manuscrit);
  font-style: normal;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* navigation précédent / suivant */
.outil-nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 20px 70px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.outil-nav a {
  text-decoration: none;
  color: #fff;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 46%;
  transition: transform 0.15s, box-shadow 0.15s;
}
.outil-nav a:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.outil-nav .nav-label { display: block; font-size: 0.72rem; opacity: 0.85; }

.contenu-absent {
  background: var(--creme);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  font-style: italic;
}

/* ————— Pied de page ————— */
.site-footer {
  text-align: center;
  padding: 34px 18px 44px;
  font-size: 0.85rem;
  color: #555;
  border-top: 1px solid #eee;
}
.site-footer .manuscrit { font-family: var(--font-manuscrit); font-size: 1rem; letter-spacing: 1px; }

/* bouton retour flottant */
.retour-flottant {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--encre);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-family: var(--font-texte);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  display: none;
  z-index: 50;
}
body.mode-outil .retour-flottant { display: block; }

/* ————— Responsive ————— */
@media (max-width: 700px) {
  .table-periodique { min-width: 980px; }
  .outil-hero-inner { gap: 18px; }
  .outil-nav a { max-width: 100%; flex: 1 1 100%; }
}

@media print {
  .legende, .retour-flottant, .outil-nav, .site-footer { display: none; }
}
