/* ============================================================
   THÈME « CLAIR » DES PAGES DU SITE (tables, exercices, astuces, à propos…)
   À charger après css/jeux.css (couleurs, menu du site, boutons).
   Utilisé par : table-de-7.html, table-de-2.html, table-de-3.html, table-de-4.html, table-de-5.html, table-de-6.html, table-de-8.html, table-de-9.html, table-de-10.html, a-propos.html, apprendre-tables.html, confidentialite.html, mentions-legales.html, astuces.html, tables-a-imprimer.html, presse.html, exercices-table-de-7.html, generateur-exercices.html, exercices-table-de-2.html, exercices-table-de-3.html, exercices-table-de-4.html, exercices-table-de-5.html, exercices-table-de-6.html, exercices-table-de-8.html, exercices-table-de-9.html
   Chaque page ne garde dans son propre <style> que ce qui lui est particulier.
   ============================================================ */
body { line-height: 1.65; }

/* Barre du haut sur téléphone : nom du site + menu (comme la page d'accueil) */
.page-topbar {
    display: none; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.page-brand { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
@media (max-width: 700px), (max-height: 540px) {
    .page-topbar { display: flex; }
}

/* Petites icônes dessinées (remplacent les emoji) */
.ic { display: inline-block; flex-shrink: 0; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }

/* ── Mise en page : contenu + colonne de raccourcis ── */
.page-wrapper {
    width: 100%; max-width: 1140px; margin: 0 auto;
    padding: 36px 24px 48px;
    display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px;
    align-items: start;
}
/* Pages sans colonne de raccourcis (mentions légales…) : contenu centré */
.page-wrapper:not(:has(.sidebar)) { grid-template-columns: minmax(0, 1fr); max-width: 880px; }
@media (max-width: 860px) {
    .page-wrapper { grid-template-columns: minmax(0, 1fr); padding: 24px 16px 36px; gap: 20px; }
}

/* ── Carte de contenu ── */
.content-card {
    overflow: hidden;
    background: var(--surface); border-radius: 28px; box-shadow: var(--shadow-card);
    padding: 48px;
}
@media (max-width: 600px) { .content-card { padding: 28px 20px; border-radius: 22px; } }

.content-card h1 {
    margin: 0 0 8px; font-size: 2.2rem; font-weight: 700; line-height: 1.2; color: var(--ink);
}
.content-card .subtitle { margin: 0 0 28px; color: var(--muted); font-size: 1.1rem; font-weight: 500; }
.content-card h2 {
    margin: 40px 0 16px; padding-bottom: 10px;
    font-size: 1.4rem; font-weight: 700; line-height: 1.3; color: var(--ink);
    border-bottom: 2px solid var(--line);
}
.content-card h3 { margin: 26px 0 10px; font-size: 1.15rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.content-card p { margin: 0 0 16px; color: #33415C; font-size: 1.02rem; }
.content-card ul, .content-card ol { margin: 0 0 16px 1.4em; color: #33415C; }
.content-card li { margin-bottom: 6px; }
.content-card strong { color: var(--ink); }
.content-card a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.content-card a:hover { color: var(--accent-dark); }
@media (max-width: 600px) {
    .content-card h1 { font-size: 1.75rem; }
    .content-card .subtitle { font-size: 1rem; }
    .content-card h2 { font-size: 1.25rem; margin-top: 32px; }
}

/* ── Tables de multiplication ── */
/* Liste « 7 × 1 = 7 » (pages des tables) */
.mult-table-wrap { display: flex; flex-direction: column; gap: 4px; margin: 20px 0; max-width: 300px; }
.mult-table-row {
    display: grid; grid-template-columns: 1fr 32px 48px; align-items: center;
    padding: 9px 16px; border-radius: 12px;
    font-size: 1.15rem; font-variant-numeric: tabular-nums;
    transition: background 0.15s ease;
}
.mult-table-row:nth-child(odd) { background: var(--bg); }
.mult-table-row:hover { background: var(--accent-soft); }
.mult-table-op { color: var(--ink); font-weight: 500; }
.mult-table-eq { color: #9AA8C2; text-align: center; }
.mult-table-res { color: var(--accent); font-weight: 700; text-align: right; }
@media (max-width: 480px) { .mult-table-wrap { max-width: 100%; } }

/* Tableau classique */
.mult-table {
    width: 100%; border-collapse: separate; border-spacing: 0; margin: 24px 0;
    border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.mult-table th {
    background: var(--accent-soft); color: var(--accent);
    padding: 12px 14px; font-size: 1rem; font-weight: 700; text-align: center;
}
.mult-table td {
    padding: 11px 16px; text-align: center; font-size: 1.05rem;
    border-top: 1px solid var(--line); font-weight: 500; color: var(--ink);
}
.mult-table tr:nth-child(even) td { background: #F8FAFD; }
.mult-table tr:hover td { background: var(--accent-soft); }
.mult-table .operation { text-align: left; padding-left: 24px; }
.mult-table .result { color: var(--accent); font-weight: 700; }

/* ── Encadrés ── */
.tip-box, .fun-fact {
    border-radius: 18px; padding: 18px 22px; margin: 20px 0;
}
.tip-box { background: var(--accent-soft); }
.tip-box .tip-title, .fun-fact .tip-title {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 6px; font-weight: 700; font-size: 1rem;
}
.tip-box .tip-title { color: var(--accent-dark); }
.tip-box p { margin: 0; color: #2E3B5E; font-size: 0.98rem; }
/* Icône devant le titre : ampoule (astuce) ou étoile (« Le savais-tu ? ») */
.tip-box .tip-title::before, .fun-fact .tip-title::before {
    content: ''; flex-shrink: 0; width: 22px; height: 22px;
    background-color: currentColor;
    -webkit-mask: var(--tip-icon) center / contain no-repeat;
    mask: var(--tip-icon) center / contain no-repeat;
}
.tip-box .tip-title::before {
    --tip-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.7.6 1.1 1.3 1.1 2.2h5c0-.9.4-1.6 1.1-2.2A6 6 0 0 0 12 3z'/%3E%3Cpath d='M12 7.5v3.5M10.5 9.5h3' /%3E%3C/svg%3E");
}
.fun-fact { background: var(--score-bg); }
.fun-fact .tip-title { color: var(--score-ink); }
.fun-fact .tip-title::before {
    --tip-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2.5l2.9 6 6.6.8-4.9 4.5 1.3 6.5L12 17l-5.9 3.3 1.3-6.5-4.9-4.5 6.6-.8z'/%3E%3C/svg%3E");
}
.fun-fact p { margin: 0; color: #6B3410; font-size: 0.98rem; }

/* ── Boutons d'appel (« Jouer maintenant »…) ── */
.cta-btn {
    display: inline-flex; align-items: center; gap: 10px;
    margin: 20px 12px 8px 0; min-height: 52px; padding: 12px 26px;
    font-size: 1.05rem; font-weight: 600; text-decoration: none;
    background: var(--accent); color: #FFFFFF;
    border: 1px solid var(--accent-dark); border-radius: 16px; box-shadow: 0 3px 0 var(--accent-dark);
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.content-card a.cta-btn, .content-card a.cta-btn:hover, .content-card a.cta-btn:visited { color: #FFFFFF; text-decoration: none; }
.cta-btn:active { transform: translateY(3px); box-shadow: none; }
.cta-btn + .cta-btn { background: var(--surface); border-color: var(--key-line); box-shadow: 0 3px 0 var(--key-line); }
.content-card a.cta-btn + .cta-btn, .content-card a.cta-btn + .cta-btn:visited { color: var(--ink); }
@media (max-width: 600px) { .cta-btn { width: 100%; justify-content: center; margin-right: 0; } }

/* Navigation précédente / suivante en bas des pages */
.page-nav-links { margin-top: 32px; }

/* ── Colonne de raccourcis ── */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card {
    background: var(--surface); border-radius: 22px; padding: 20px;
    box-shadow: 0 8px 20px rgba(20, 33, 61, 0.06), 0 1px 3px rgba(20, 33, 61, 0.05);
}
.sidebar-card h3 {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 10px; font-size: 1rem; font-weight: 700; color: var(--ink);
}
.sidebar-card h3 .ic { color: var(--accent); }
.sidebar-card a {
    display: block; padding: 8px 12px; margin: 2px 0; border-radius: 10px;
    color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-card a:hover { background: var(--accent-soft); color: var(--accent); }
.sidebar-card a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@media (max-width: 860px) {
    /* Sur tablette et téléphone, les liens vers les tables passent en grille */
    .sidebar-card { padding: 18px; }
    .sidebar-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px; }
}

/* ── Tables à imprimer (aperçus) ── */
.print-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; }
.print-mini-table { background: var(--bg); border-radius: 16px; padding: 16px; text-align: center; border: 1px solid var(--line); }
.print-mini-table h4 { margin: 0 0 8px; color: var(--accent); }
.print-mini-table p { margin: 2px 0; font-size: 0.9rem; color: #33415C; }

/* ── Cartes de jeux (page « À propos ») ── */
.game-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 24px 0; }
.game-card {
    background: var(--bg); border-radius: 20px; padding: 24px;
    border: 1px solid var(--line); transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.game-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(20, 33, 61, 0.08); }
.game-card .game-icon { margin-bottom: 10px; color: var(--accent); }
.game-card h3 { margin: 0 0 6px; font-size: 1.08rem; color: var(--ink); }
.game-card p { margin: 0; font-size: 0.93rem; color: var(--muted); }
.game-card .game-meta { margin-top: 10px; font-size: 0.82rem; font-weight: 600; color: #8A97B0; }

/* ── Étapes numérotées (page « Apprendre ») ── */
.step { display: flex; gap: 18px; margin: 26px 0; align-items: flex-start; }
.step-num {
    min-width: 44px; height: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: #FFFFFF; border-radius: 14px;
    font-weight: 700; font-size: 1.15rem;
}
.step-content h3 { margin-top: 4px; }
.step-content p { margin-bottom: 0; }

/* ── Bloc de partage (le même que sur la page d'accueil) ── */
.share-block { max-width: 900px; margin: 0 auto 30px; padding: 0 24px; text-align: center; }
.share-title {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 0 0 14px; font-size: 1.1rem; font-weight: 700; color: var(--ink);
}
.share-title .ic { color: #E5484D; }
.share-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%; border: none; padding: 0;
    cursor: pointer; text-decoration: none; background: transparent;
    box-shadow: 0 4px 12px rgba(20, 33, 61, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.share-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.share-wa svg { width: 52px; height: 52px; border-radius: 50%; }
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(20, 33, 61, 0.16); }
.share-fb   { background: #1877f2; color: white; }
.share-wa   { background: transparent; }
.share-pin  { background: #e60023; color: white; }
.share-pin svg { width: 32px; height: 32px; }
.share-fb svg { width: 32px; height: 32px; }
.share-copy { background: var(--surface); color: var(--ink); border: 1px solid var(--key-line); }
.share-press {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 28px; font-size: 0.92rem; font-weight: 500; color: var(--muted);
}
.share-press a, .share-contact a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.share-press a:hover, .share-contact a:hover { color: var(--accent-dark); }
.share-contact { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.share-soutien { margin-top: 10px; }
.share-soutien .ic { color: var(--accent); }

/* ── Soutenir le site (page À propos ; lien depuis le bloc de partage) ── */
#soutenir { scroll-margin-top: 24px; }
.soutien {
    display: flex; align-items: center; gap: 22px;
    margin: 4px 0 20px; padding: 22px 26px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 22px;
}
.soutien-mascotte {
    flex: none; width: 80px; height: 101px; background: var(--accent);
    -webkit-mask: url(../img/mascotte.svg) center / contain no-repeat; mask: url(../img/mascotte.svg) center / contain no-repeat;
}
.content-card .soutien p { margin: 0 0 4px; }
.soutien .cta-btn { margin: 12px 0 6px; }
.content-card .soutien p.soutien-autre { margin: 0 0 10px; font-size: 0.95rem; color: var(--muted); }
.content-card .soutien p.soutien-autre a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.content-card .soutien p.soutien-note { font-size: 0.86rem; color: var(--muted); }
@media (max-width: 600px) {
    .soutien { flex-direction: column; text-align: center; padding: 22px 18px; gap: 14px; }
}

/* ── Pied de page ── */
.site-footer { text-align: center; padding: 24px 20px 40px; color: var(--muted); font-size: 0.85rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }

/* ── Publicité ── */
ins.adsbygoogle { max-width: 100% !important; width: 100% !important; }

/* ── Impression : on n'imprime que le contenu ── */
@media print {
    html, body { background: #FFFFFF !important; min-height: 0; }
    .site-nav-game, .page-topbar, .nav-mobile-overlay, .sidebar, .share-block, .site-footer, ins.adsbygoogle { display: none !important; }
    .page-wrapper { display: block; padding: 0; max-width: none; }
    .content-card { box-shadow: none; border-radius: 0; padding: 0; }
}
