/*
Theme Name: Astra Enfant
Template: astra
Version: 1.1.0
Author: Ton Nom
Description: Thème enfant Astra style enfantin (primaire CP–CE2, responsive + icônes flottantes)
*/

/* --- Couleurs principales --- */
:root {
    --couleur-bleu: #4da6ff;
    --couleur-vert: #6dd47e;
    --couleur-rose: #ff80ab;
    --couleur-jaune: #ffeb3b;
    --couleur-orange: #ff9800;
}

/* --- Corps de page --- */
body {
    background-color: #fffdf7;
    font-family: 'Fredoka', 'Comic Neue', cursive, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden; /* éviter les scrollbars horizontales avec les animations */
}

/* --- Liens --- */
a {
    color: var(--couleur-orange);
    font-weight: bold;
    text-decoration: none;
}
a:hover {
    color: var(--couleur-bleu);
    text-decoration: underline;
}

/* --- Header et footer --- */
header, footer {
    background-color: var(--couleur-jaune);
    padding: 20px;
    border-radius: 0 0 20px 20px;
    text-align: center;
}

/* --- Titres --- */
h1, h2, h3, h4 {
    font-family: 'Fredoka', 'Comic Neue', cursive, sans-serif;
    font-weight: 700;
    color: var(--couleur-bleu);
}

/* --- Boutons --- */
button,
.wp-block-button__link,
input[type="submit"] {
    background-color: var(--couleur-vert);
    border: none;
    color: white;
    font-size: 18px;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
    background-color: var(--couleur-rose);
    transform: scale(1.05);
}

/* --- Widgets / blocs --- */
.widget, .wp-block-group {
    background-color: #ffffff;
    border: 3px dashed var(--couleur-jaune);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
}

/* --- Effet rebond sur hover --- */
a:hover, button:hover {
    animation: rebond 0.3s;
}
@keyframes rebond {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* --- Icônes flottantes (multiformes et multicolores) --- */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* ne bloque pas les clics */
    overflow: hidden;
    z-index: 1;
}
.floating-icons span {
    position: absolute;
    display: block;
    font-size: 24px;
    opacity: 0.7;
    animation: float 10s linear infinite;
}

/* Animation flottante */
@keyframes float {
    0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    50%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* --- Responsive : tablettes --- */
@media (max-width: 1024px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    button { font-size: 17px; padding: 10px 20px; }
}

/* --- Responsive : smartphones --- */
@media (max-width: 768px) {
    body { font-size: 16px; padding: 10px; }
    h1 { font-size: 1.8rem; text-align: center; }
    h2 { font-size: 1.4rem; text-align: center; }
    header, footer { padding: 15px; text-align: center; }
    button,
    .wp-block-button__link,
    input[type="submit"] {
        width: 100%;
        font-size: 16px;
        padding: 12px;
    }
    .widget, .wp-block-group {
        margin: 10px 0;
        padding: 10px;
    }
}
