/* =====================================================
   LAYOUT — École des Explorateurs
   ===================================================== */

.container {
    max-width: 920px;
    margin: 0 auto;
}

/* ── Titres ── */
h1, h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

h1 {
    font-size: 2.6rem;
    text-align: center;
    width: 100%;
    text-shadow: 3px 3px 0 rgba(45, 106, 79, 0.12);
}

h2 {
    font-size: 1.75rem;
}

[data-theme="dark"] h1 {
    text-shadow: 0 0 24px rgba(100, 255, 218, 0.35),
                 2px 2px 0 rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] h2 {
    text-shadow: 0 0 16px rgba(100, 255, 218, 0.25);
}

/* ── Cards — Style cahier / notebook ── */
.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--border);
    border-left: 5px solid var(--accent);   /* marge rouge du cahier */
    margin-bottom: 2rem;
    position: relative;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Lignes de cahier en fond */
    background-image:
        repeating-linear-gradient(
            transparent,
            transparent 27px,
            var(--notebook-line) 28px
        );
    background-size: 100% 28px;
}

[data-theme="dark"] .card {
    border-left-color: var(--primary);
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
    border-left-color: var(--secondary);
    box-shadow: 0 20px 40px -8px rgba(233, 168, 58, 0.28);
    background-image: none;
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 20px 40px -8px rgba(100, 255, 218, 0.2),
                0 0 0 1px rgba(100, 255, 218, 0.1);
}

/* Effet aura */
.aura-glow {
    position: relative;
    z-index: 1;
}

.aura-glow::after {
    content: '';
    position: absolute;
    inset: -5px;
    background: var(--gradient-primary);
    filter: blur(20px);
    z-index: -1;
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.3s ease;
}

.card:hover.aura-glow::after {
    opacity: 0.3;
}

/* ── Section Hero ── */
.hero {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    margin-bottom: 3rem;
    background: var(--bg-card);
    border: 3px solid var(--border);
    box-shadow: var(--shadow),
                0 0 0 6px rgba(233, 168, 58, 0.12);
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .hero {
    box-shadow: var(--shadow),
                0 0 0 6px rgba(100, 255, 218, 0.08),
                0 0 50px rgba(100, 255, 218, 0.05);
    border-color: var(--border);
}

.hero-img-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

/* Pas d'overlay sur l'image hero — l'illustration parle d'elle-même */

.header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: saturate(1.1) brightness(1.02);
}

.hero:hover .header-img {
    transform: scale(1.06);
}

.hero-content {
    padding: 2.5rem;
    text-align: center;
    position: relative;
    background: var(--bg-card);
}

/* Badge — effet tampon/médaille */
.badge-img {
    position: absolute;
    top: -44px;
    left: 50%;
    transform: translateX(-50%);
    width: 88px;
    height: 88px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 50%;
    box-shadow: var(--shadow), 0 0 0 4px var(--secondary);
    border: 4px solid var(--bg-card);
    z-index: 10;
    /* Flottement très doux — sans rotation qui donne le tournis */
    animation: float 4s ease-in-out infinite;
}

[data-theme="dark"] .badge-img {
    box-shadow: var(--shadow),
                0 0 0 4px var(--primary),
                0 0 20px rgba(100, 255, 218, 0.3);
}

/* ── Bouton Thème — Lanterne Explorateur ── */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--bg-card);
    border: 2.5px solid var(--secondary);
    color: var(--text-main);
    padding: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow), 0 0 0 4px rgba(233, 168, 58, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover {
    transform: scale(1.18) rotate(18deg);
    box-shadow: var(--shadow), 0 0 0 6px rgba(233, 168, 58, 0.25);
}

[data-theme="dark"] .theme-toggle {
    border-color: var(--primary);
    box-shadow: var(--shadow), 0 0 20px rgba(100, 255, 218, 0.35);
}

[data-theme="dark"] .theme-toggle:hover {
    box-shadow: var(--shadow), 0 0 30px rgba(100, 255, 218, 0.5);
}

/* ── Texte accentué ── */
.secondary-highlight {
    color: var(--secondary);
    font-weight: 800;
}

/* ── Bouton principal ── */
.btn-start {
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 0.4px;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 6px 20px rgba(45, 106, 79, 0.4),
                0 2px 0 rgba(0,0,0,0.15);
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn-start:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(45, 106, 79, 0.5);
}

[data-theme="dark"] .btn-start {
    box-shadow: 0 6px 20px rgba(100, 255, 218, 0.3),
                0 0 0 1px rgba(100, 255, 218, 0.2);
    color: #0a1628;
    text-shadow: none;
}

[data-theme="dark"] .btn-start:hover {
    box-shadow: 0 14px 30px rgba(100, 255, 218, 0.45);
}

/* ── Lien retour ── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    transition: all 0.25s ease;
}

.back-link::before {
    content: '←';
    font-size: 1.1em;
}

.back-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(-5px);
    box-shadow: 4px 4px 0 rgba(45, 106, 79, 0.25);
}

[data-theme="dark"] .back-link:hover {
    box-shadow: 4px 4px 0 rgba(100, 255, 218, 0.2);
}
