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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: background-image 0.5s ease-in-out;
}

.conteneur-poeme {
    background-color: rgba(255, 255, 255, 0.6);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    backdrop-filter: blur(5px);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: normal;
    letter-spacing: 2px;
}

.poeme {
    line-height: 1.8;
    color: #34495e;
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto;
}

.strophe {
    margin-bottom: 25px;
}

.vers {
    padding: 5px 0;
    text-align: left;
}

/* Animations pour les transitions de vers */
.vers-sortie {
    animation: versDisparait 0.4s ease-out forwards;
}

.vers-entree {
    animation: versApparait 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes versDisparait {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-15px);
    }
}

@keyframes versApparait {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.statistiques {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(52, 62, 80, 0.2);
    text-align: center;
    font-size: 0.85em;
    color: #7f8c8d;
}

.bouton-actualiser {
    display: block;
    margin: 30px auto 0;
    padding: 12px 30px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Georgia', serif;
}

.bouton-actualiser:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.bouton-actualiser:active {
    transform: translateY(0);
}

.bouton-lecture-pause {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(52, 152, 219, 0.5);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 1000;
    --pourcentage-progression: 0;
}

.bouton-lecture-pause::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: conic-gradient(
        #3498db 0deg,
        #3498db calc(var(--pourcentage-progression) * 3.6deg),
        transparent calc(var(--pourcentage-progression) * 3.6deg),
        transparent 360deg
    );
    -webkit-mask: radial-gradient(transparent 60%, black 61%);
    mask: radial-gradient(transparent 60%, black 61%);
    transform: rotate(90deg);
    opacity: 0;
}

.bouton-lecture-pause.en-lecture::before {
    opacity: 1;
}

.bouton-lecture-pause:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(52, 152, 219, 0.8);
    transform: scale(1.1);
}

.bouton-lecture-pause:active {
    transform: scale(0.95);
}

.bouton-info {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(52, 152, 219, 0.5);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.bouton-info:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(52, 152, 219, 0.8);
    transform: scale(1.1);
}

.bouton-info:active {
    transform: scale(0.95);
}

.bouton-regenerer {
    position: fixed;
    top: 20px;
    left: 90px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(52, 152, 219, 0.5);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.bouton-regenerer:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(52, 152, 219, 0.8);
    transform: scale(1.1);
}

.bouton-regenerer:active {
    transform: scale(0.95);
    animation: rotation 0.4s ease;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Modale À propos */
.modale-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modale-overlay.active {
    display: flex;
}

.modale-contenu {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modale-fermer {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    color: #7f8c8d;
}

.modale-fermer:hover {
    background-color: rgba(52, 73, 94, 0.1);
    color: #2c3e50;
    transform: scale(1.1);
}

.modale-contenu h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: normal;
    letter-spacing: 1px;
}

.modale-texte {
    color: #34495e;
    line-height: 1.8;
    font-size: 1em;
}

.modale-texte p {
    margin-bottom: 20px;
}

.modale-texte strong {
    color: #2c3e50;
    font-weight: 600;
}

.modale-texte .citation {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
    border-radius: 5px;
    font-style: italic;
    color: #34495e;
    margin-bottom: 0;
}

.modale-texte .citation em {
    display: block;
    text-align: right;
    font-size: 0.9em;
    margin-top: 10px;
    color: #7f8c8d;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .bouton-lecture-pause {
        display: none;
    }
    
    .bouton-info {
        top: auto;
        left: auto;
        bottom: 20px;
        right: 80px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .bouton-regenerer {
        top: auto;
        left: auto;
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .modale-contenu {
        margin: 20px;
        padding: 30px 25px;
        max-height: 85vh;
    }
    
    .modale-contenu h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .modale-texte {
        font-size: 0.95em;
    }

    .conteneur-poeme {
        padding: 30px 25px;
    }

    h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .poeme {
        font-size: 1em;
        line-height: 1.6;
    }

    .strophe {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .bouton-info {
        bottom: 15px;
        right: 70px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .bouton-regenerer {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .modale-contenu {
        margin: 15px;
        padding: 25px 20px;
    }
    
    .modale-contenu h2 {
        font-size: 1.3em;
    }
    
    .modale-texte {
        font-size: 0.9em;
    }

    .conteneur-poeme {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.3em;
        letter-spacing: 1px;
    }

    .poeme {
        font-size: 0.95em;
    }

    .bouton-actualiser {
        padding: 10px 25px;
        font-size: 0.95em;
    }
}
