/*
Theme Name: CERM² Theme
Description: Thème pour le Centre d'Études Mathématiques Reggio Massalia, inspiré du style "Animation vs Math"
Version: 1.0
Author: CERM²
*/

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a2e;
    background-color: #f2f7ff;
    /* Feuille à carreaux : lignés bleus façon cahier d'écolier */
    background-image:
        linear-gradient(rgba(180, 200, 240, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(180, 200, 240, 0.35) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: -1px -1px;
    min-height: 100vh;
}

/* ============================================
   TYPOGRAPHIE
   ============================================ */
h1, h2, h3 {
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
    font-weight: bold;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

p { margin-bottom: 1rem; }

a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: #c0392b; }

/* ============================================
   HEADER — Navigation stickman-friendly
   ============================================ */
.site-header {
    background: #1a1a2e;
    color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-header .site-logo {
    font-family: 'Comic Sans MS', cursive;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-header .site-logo .logo-mark {
    font-size: 1.6rem;
    color: #e74c3c;
}

.site-header .site-logo:hover {
    color: #aed6f1;
}

.site-header nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-header nav a {
    color: #aed6f1;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.site-header nav a:hover {
    background: #e74c3c;
    color: #ffffff;
}

/* ============================================
   HERO — Accroche centrale
   ============================================ */
.hero {
    text-align: center;
    padding: 5rem 2rem 4rem;
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

/* Trait rouge façon "main levée" sous le titre */
.hero h1::after {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    background: #e74c3c;
    border-radius: 2px;
    margin-top: 0.4rem;
    /* Effet main levée : légère oscillation */
    transform: rotate(-0.5deg);
    box-shadow: 2px 2px 0 rgba(231, 76, 60, 0.3);
}

.hero .tagline {
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
    color: #555;
    margin: 1.5rem 0 2rem;
    font-style: italic;
}

/* ============================================
   BOUTON CTA
   ============================================ */
.btn-cta {
    display: inline-block;
    background: #e74c3c;
    color: #ffffff;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    cursor: pointer;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    box-shadow: 3px 3px 0 #c0392b;
}

.btn-cta:hover {
    background: #c0392b;
    color: #ffffff;
    transform: translate(-1px, -2px);
    box-shadow: 4px 5px 0 #a93226;
}

.btn-cta:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 #a93226;
}

/* ============================================
   SECTION PRESENTATION
   ============================================ */
.section-presentation {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section-presentation h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a1a2e;
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Décor : petite icône stickman mathématique */
.section-presentation h2::before {
    content: '∑ ∞ ÷ √';
    display: block;
    font-size: 1.2rem;
    color: #e74c3c;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3em;
}

.section-presentation .content-block {
    background: rgba(255, 255, 255, 0.85);
    border-left: 5px solid #e74c3c;
    padding: 2rem;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.section-presentation .content-block h3 {
    color: #e74c3c;
    margin-bottom: 0.8rem;
}

.section-presentation .content-block ul {
    list-style: none;
    padding-left: 0;
}

.section-presentation .content-block li {
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
}

.section-presentation .content-block li::before {
    content: '▸';
    color: #e74c3c;
    position: absolute;
    left: 0;
}

/* ============================================
   DECORATIONS — Style stickman / dessiné
   ============================================ */
.decoration-stripe {
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        #e74c3c 0px,
        #e74c3c 20px,
        #1a1a2e 20px,
        #1a1a2e 40px
    );
    margin: 0;
}

.decoration-dots {
    text-align: center;
    padding: 1rem;
    color: #aab;
    font-size: 1.5rem;
    letter-spacing: 0.5em;
    font-family: 'Courier New', monospace;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #1a1a2e;
    color: #aed6f1;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.site-footer p { margin: 0; }

/* ============================================
   WORDPRESS — Posts & Pages
   ============================================ */
.entry-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.entry-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.entry-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
        padding: 1rem;
    }

    .site-header nav ul {
        justify-content: center;
        gap: 1rem;
    }

    .hero {
        padding: 3rem 1.5rem 2.5rem;
    }

    h1 { font-size: 1.8rem; }

    .section-presentation {
        padding: 2rem 1rem;
    }

    .section-presentation .content-block {
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .site-header nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero .tagline { font-size: 1rem; }
}
