/* ===== VARIABLES ===== */
:root {
    /* Couleurs principales */
    --primary-color: rgb(52, 73, 94);
    --bg-color: #f9f9f9;
    --text-color: rgb(52, 73, 94);
    --light-gray: #ecf0f1;
    --dark-gray: #7f8c8d;
    --white: #ffffff;
    
    /* Palette du jeu */
    --color-cyan: rgb(0, 172, 193);
    --color-cyan-light: rgb(38, 198, 218);
    --color-orange: rgb(255, 135, 0);
    --color-blue: rgb(52, 73, 94);
    
    /* Couleurs des allumettes */
    --match-head: #e65732;
    --match-head-highlight: #ff7043;
    --match-head-shadow: #bf360c;
    --match-body: #d7ccc8;
    --match-body-dark: #a1887f;
    
    /* Utilitaires */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --footer-height: 38px;
    --border-width: 10px;
}

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

/* ===== FONTS ===== */
@font-face {
    font-family: Kalam;
    src: url(../ttf/Kalam-Bold.ttf);
}

@font-face {
    font-family: Kalam-reg;
    src: url(../ttf/kalam.regular.ttf);
}

@font-face {
    font-family: OpenSansReg;
    src: url(../ttf/OpenSans-Regular.ttf);
}

@font-face {
    font-family: OpenSansSemiBold;
    src: url(../ttf/OpenSans-SemiBold.ttf);
}

/* ===== BASE ===== */
html {
    height: 100%;
    overflow-y: scroll;
}

body {
    min-height: 100%;
    position: relative;
    padding-bottom: var(--footer-height);
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-color);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239e9d24' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: var(--text-color);
}

/* ============================================
   HEADER - Modification pour fleur dans le flux
   ============================================ */
   header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: .5rem 1rem .7rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.08' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

/* Container flex pour centrer le groupe fleur+texte */
.header-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

/* Fleur dans le flux (plus de position absolute) */
.flower-link {
    display: inline-block;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 2;
}

.flower-decoration {
    height: 5rem;
    width: 5rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    background-image: url('./img/flower.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

.flower-link:hover .flower-decoration {
    transform: scale(1.1);
    opacity: 1;
    background-image: url('./img/flower-color.svg');
}

/* Texte du header aligné à gauche */
.header-content {
    text-align: left;
}

header h1, header p {
    position: relative;
    z-index: 1;
}

header h1 {
    font-family: Kalam;
    font-size: 2.3rem;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 2.3px;
}

header p {
    font-family: Kalam-reg;
    font-size: 1.4rem;
    color: var(--white);
    margin-top: -0.3rem;
}

/* ===== MAIN ===== */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ===== TITRES DE SECTION ===== */
.section-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
    background-color: rgba(236, 240, 241, 0.7);
    padding: 8px 12px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ===== SÉLECTEUR DE DIFFICULTÉ ===== */
.difficulty-selector {
    display: flex;
    justify-content: center;
    margin: 35px 0;
    gap: 15px;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 10px 20px;
    background-color: var(--white);
    border: 2px solid;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: var(--transition);
}

/* Mode Standard */
#easy-mode {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
}

#easy-mode:hover,
#easy-mode.active {
    background-color: var(--color-cyan);
    color: var(--white);
}

/* Mode Avancé */
#hard-mode {
    border-color: var(--color-orange);
    color: var(--color-orange);
}

#hard-mode:hover,
#hard-mode.active {
    background-color: var(--color-orange);
    color: var(--white);
}

/* Mode Expert */
#expert-mode {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

#expert-mode:hover,
#expert-mode.active {
    background-color: var(--color-blue);
    color: var(--white);
}

/* ===== CONTENEUR DE JEU ===== */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border-left: var(--border-width) solid var(--color-cyan);
}

.game-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    background-color: rgba(236, 240, 241, 0.7);
    border-radius: 5px;
    padding: 8px 0;
    margin-bottom: 15px;
}

.game-container h2 {
    color: var(--primary-color);
    margin-right: 10px;
    margin-bottom: 0;
    background: none;
    padding: 0;
    box-shadow: none;
}

/* ===== ICÔNE INFO ===== */
.info-icon {
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    background-color: var(--primary-color);
    position: absolute;
    right: 15px;
}

.info-icon:hover {
    background-color: var(--color-cyan);
}

.info-icon img {
    width: 12px;
    height: 12px;
    transition: var(--transition);
    filter: brightness(0) invert(1);
}

.info-content {
    display: none;
    width: 100%;
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 15px;
    margin: 0 0 15px 0;
    font-size: 14px;
    color: var(--text-color);
}

.info-content.show {
    display: block;
}

.info-content p {
    margin-bottom: 15px;
}

.info-content p:last-child {
    margin-bottom: 0;
}

/* ===== COMPTEUR DE BÂTONNETS ===== */
.sticks-counter {
    font-size: 1rem;
    font-weight: bold;
    color: var(--white);
    margin: 15px 0;
    padding: 8px 15px;
    background-color: var(--color-cyan);
    border-radius: 50px;
    box-shadow: 0 3px 10px rgba(0, 172, 193, 0.3);
    transition: var(--transition);
}

/* ===== CONTENEUR DES ALLUMETTES ===== */
.sticks-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin: 25px 0;
    max-width: 800px;
    padding: 30px 25px 20px;
    background-color: rgba(52, 73, 94, 0.04);
    border-radius: 12px;
    min-height: 140px;
}

/* ===== STYLE ALLUMETTES ===== */
.stick {
    width: 12px;
    height: 80px;
    background: linear-gradient(
        to right,
        var(--match-body-dark) 0%,
        var(--match-body) 25%,
        var(--match-body) 75%,
        var(--match-body-dark) 100%
    );
    border-radius: 1px 1px 2px 2px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.15);
    margin: 4px;
    transition: var(--transition);
    position: relative;
    cursor: default;
}

.stick::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 18px;
    background: radial-gradient(
        ellipse at 50% 60%,
        var(--match-head-highlight) 0%,
        var(--match-head) 40%,
        var(--match-head-shadow) 100%
    );
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.stick:hover {
    transform: translateY(-5px) rotate(5deg);
}

.stick.removing {
    animation: matchBurn 0.4s ease-out forwards;
}

@keyframes matchBurn {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    30% {
        transform: scale(1.05) translateY(-5px);
        filter: brightness(1.3);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-15px);
        filter: brightness(0.5);
    }
}

/* ===== MESSAGE ===== */
.message {
    font-size: 18px;
    font-weight: bold;
    margin: 15px 0;
    min-height: 27px;
    color: var(--primary-color);
    padding: 10px 20px;
    background-color: var(--light-gray);
    border-radius: 5px;
    text-align: center;
}

.inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--primary-color);
    vertical-align: middle;
    margin: 0 4px;
    cursor: pointer;
    transition: var(--transition);
}

.inline-button:hover {
    background-color: var(--color-cyan);
}

.inline-button img {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
}

/* ===== CONTRÔLES ===== */
.controls {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.take-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
}

.take-controls button {
    border-radius: 25px;
}

.action-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ===== BOUTONS GÉNÉRAUX ===== */
button {
    padding: 10px 20px;
    background-color: var(--color-cyan);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    font-weight: bold;
}

button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:disabled {
    background-color: var(--dark-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Boutons "Prendre X" - couleurs fixes */
#take-one {
    background-color: var(--color-cyan);
}

#take-two {
    background-color: var(--color-orange);
}

#take-three {
    background-color: var(--color-blue);
}

/* ===== BOUTONS D'ACTION CIRCULAIRES ===== */
.action-btn {
    background-color: var(--primary-color);
    width: 50px;
    height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
}

.action-btn:hover {
    background-color: var(--color-cyan);
}

.action-btn img {
    width: 30px;
    height: 30px;
    transition: var(--transition);
}

.action-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: normal;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    white-space: nowrap;
    z-index: 10;
}

.action-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== GRILLE DE CONNAISSANCES ===== */
.knowledge-container {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-top: 30px;
    border-left: var(--border-width) solid var(--color-cyan);
}

.knowledge-container p {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    width: 100%;
}

.position-cell {
    text-align: center;
    padding: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 90%;
    margin: 0 auto;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.option-button {
    padding: 8px;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px;
    transition: var(--transition);
}

/* Options - couleurs fixes */
.option-button.take-1 {
    background-color: var(--color-cyan);
    color: var(--white);
}

.option-button.take-2 {
    background-color: var(--color-orange);
    color: var(--white);
}

.option-button.take-3 {
    background-color: var(--color-blue);
    color: var(--white);
}

.option-button.invalid {
    background-color: var(--dark-gray);
    text-decoration: line-through;
    opacity: 0.5;
}

/* ===== HISTORIQUE ===== */
.game-history {
    margin-top: 30px;
    padding: 15px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: var(--border-width) solid var(--color-orange);
}

.history-moves {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.history-move {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-radius: 5px;
    background-color: var(--light-gray);
}

.move-player {
    font-weight: bold;
    color: var(--color-cyan);
}

.move-ai {
    font-weight: bold;
    color: var(--color-orange);
}

.move-removed {
    background-color: var(--light-gray);
    border: 2px solid var(--color-orange);
}

.move-removed strong {
    color: var(--color-orange);
    font-weight: bold;
    margin-left: 5px;
}

/* ===== STATISTIQUES ===== */
.stats {
    background-color: var(--white);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--shadow);
    margin-top: 20px;
    border-left: var(--border-width) solid var(--color-orange);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.stats-controls {
    margin-top: 20px;
    justify-content: center;
}

/* ===== PARAMÈTRES AVANCÉS ===== */
.advanced-settings {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-top: 20px;
    border-left: var(--border-width) solid var(--color-blue);
    display: none;
}

.advanced-settings.disabled .settings-content {
    opacity: 0.5;
    pointer-events: none;
}

.advanced-settings .title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    background-color: rgba(236, 240, 241, 0.7);
    border-radius: 5px;
    padding: 8px 0;
    margin-bottom: 15px;
}

.advanced-settings .section-title {
    margin: 0;
    background: none;
    box-shadow: none;
    padding: 0;
}

.advanced-settings .info-icon {
    background-color: var(--primary-color);
}

.checkbox-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.unlock-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    background-color: var(--light-gray);
    border-radius: 5px;
    transition: var(--transition);
}

.unlock-checkbox:hover {
    background-color: rgba(52, 73, 94, 0.1);
}

.unlock-checkbox input {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

.setting-group {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.setting-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.setting-header h4 {
    margin: 0;
    color: var(--primary-color);
}

.exploration-value, .games-value {
    font-weight: bold;
    color: var(--color-orange);
}

#exploration-slider, #training-games-slider {
    width: 100%;
    margin: 10px 0;
    accent-color: var(--primary-color);
}

.setting-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--dark-gray);
}

/* ===== MODE EXPERT - Options avec barres de progression ===== */
.expert-mode .option-button {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.expert-mode .progress-bar-color {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    z-index: 1;
}

.expert-mode .progress-bar-gray {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    background-color: var(--dark-gray);
    opacity: 0.5;
    z-index: 1;
}

.expert-mode .option-button span {
    position: relative;
    z-index: 2;
    color: white;
}

/* ===== BORDURES SELON LE MODE ===== */
/* Mode Standard: cyan - orange - cyan - orange */
body.mode-standard .game-container { border-left-color: var(--color-cyan); }
body.mode-standard .game-history { border-left-color: var(--color-orange); }
body.mode-standard .knowledge-container { border-left-color: var(--color-cyan); }
body.mode-standard .stats { border-left-color: var(--color-orange); }
body.mode-standard .sticks-counter { background-color: var(--color-cyan); box-shadow: 0 3px 10px rgba(0, 172, 193, 0.3); }

/* Mode Expert: bleu - orange - bleu - orange - bleu */
body.mode-expert .game-container { border-left-color: var(--color-blue); }
body.mode-expert .game-history { border-left-color: var(--color-orange); }
body.mode-expert .knowledge-container { border-left-color: var(--color-blue); }
body.mode-expert .stats { border-left-color: var(--color-orange); }
body.mode-expert .advanced-settings { border-left-color: var(--color-blue); display: block; }
body.mode-expert .sticks-counter { background-color: var(--color-blue); box-shadow: 0 3px 10px rgba(52, 73, 94, 0.3); }

/* ===== FOOTER ===== */
footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    padding: 0 .5rem;
    background-color: var(--primary-color);
    color: var(--white);
    z-index: 100;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    z-index: 0;
}

footer span, footer a {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
}

footer a {
    color: var(--white);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: rgba(255, 255, 255, 0.8);
}

.separator {
    margin: 0 0.75rem;
}

.license-part {
    margin: 0 0.5rem;
}

.contact-part a {
    margin-left: 4px;
}

.mobile-text {
    display: none;
}

/* ===== RESPONSIVE ===== */

/* Tablette */
@media (max-width: 768px) {
    html, body {
        overflow-y: auto;
    }
    
    :root {
        --footer-height: 50px;
    }
    
    /* Header */
    .header-wrapper {
        gap: 1.5rem;
    }
    
    .flower-decoration {
        height: 4.5rem;
        width: 4.5rem;
    }
    
    header h1 {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    header p {
        font-size: 1.3rem;
    }
    
    /* Contrôles */
    .take-controls {
        flex-wrap: nowrap;
        width: 100%;
    }
    
    .take-controls button {
        flex: 1;
        padding: 10px 5px;
        font-size: 14px;
    }
    
    .action-controls {
        flex-wrap: nowrap;
    }
    
    /* Grille et bâtonnets */
    .knowledge-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .stick {
        width: 10px;
        height: 65px;
    }
    
    .stick::before {
        width: 14px;
        height: 16px;
        top: -14px;
    }
    
    .sticks-container {
        gap: 12px;
        padding: 25px 20px 15px;
    }
    
    /* Footer */
    footer {
        flex-wrap: wrap;
        justify-content: center;
        padding: .4rem 0;
    }
}

/* Point de bascule - Masquer le paragraphe */
@media (max-width: 650px) {
    .header-wrapper {
        gap: 1rem;
    }
    
    .flower-decoration {
        height: 4rem;
        width: 4rem;
    }
    
    header h1 {
        font-size: 1.75rem;
        letter-spacing: 1.7px;
        line-height: 1.2;
    }
    
    header p {
        display: none;
    }
}

/* Petits mobiles */
@media (max-width: 500px) {  
    .flower-decoration {
        height: 4rem;
        width: 4rem;
    }
    
    header h1 {
        font-size: 1.7rem;
        letter-spacing: 2px;
    }
    
    /* ATELIER IA sur une ligne, JEU DE NIM en dessous */
    #atelierIA {
        display: block;
    }
    
    .h1-separator {
        display: none;
    }
}

/* Mobile standard */
@media (max-width: 480px) {
    main {
        margin-top: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .difficulty-selector {
        flex-wrap: nowrap;
    }
    
    .difficulty-btn {
        padding: 8px 12px;
        font-size: 14px;
        flex: 1;
    }

    .sticks-container {
        margin: 0;
        padding: 20px 15px 12px;
        gap: 10px;
    }
    
    .take-controls button span {
        display: none;
    }
    
    .take-controls button::after {
        content: attr(data-number);
        font-weight: normal;
        font-size: 1em;
    }
    
    .stick {
        width: 8px;
        height: 50px;
    }
    
    .stick::before {
        width: 12px;
        height: 14px;
        top: -12px;
    }
}

/* Très petits mobiles */
@media (max-width: 405px) {
    /* Header */
    .flower-decoration {
        height: 3.5rem;
        width: 3.5rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }

    /* Footer */
    footer {
        display: block;
        padding: .4rem 0;
        text-align: center;
    }

    .copyright-part {
        display: block;
        width: 100%;
    }
    
    .license-part, .contact-part {
        display: inline-block;
    }
    
    .separator {
        display: none !important;
        margin: 0;
    }
    
    .license-part + .separator {
        display: inline-block !important;
    }
    
    .contact-part .contact-text, 
    .contact-part .email-text {
        display: none;
    }
    
    .contact-part .mobile-text {
        display: inline;
    }
}