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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    min-height: calc(100vh - 60px);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.phrase-counter {
    text-align: center;
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

.phrase-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    min-height: 270px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#phrase-text {
    font-size: 3.4em;
    line-height: 1.6;
    text-align: center;
    color: #944903;
    font-weight: 800;
}

/* Nouveau: Styles pour la traduction */
.translation-toggle {
    text-align: center;
    margin-bottom: 15px;
}

.toggle-btn {
    background: #17a2b8;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: #138496;
    transform: translateY(-2px);
}

.translation-box {
    background: #e8f4f8;
    border: 2px solid #bee5eb;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.translation-box.hidden {
    display: none;
}

#translation-text {
    font-size: 3em;
    line-height: 1.8;
    text-align: center;
    color: #0c5460;
    font-weight: 600;
    direction: rtl; /* Important pour l'arabe */
    font-family: 'Arial', sans-serif;
}

.audio-controls {
    background: #f1f3f4;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    margin-bottom: 10px;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    background: #667eea;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s;
}

.time-display {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-family: monospace;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.play-btn {
    background: #28a745;
    color: white;
    min-width: 120px;
}

.play-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.nav-btn {
    background: #6c757d;
    color: white;
}

.nav-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.repeat-btn {
    background: #ffc107;
    color: #333;
}

.repeat-btn:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.repeat-btn.active {
    background: #dc3545;
    color: white;
}

.status-info {
    text-align: center;
    padding: 15px;
    background: #e8f5e8;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

#status-message {
    color: #155724;
    font-weight: bold;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1  {
        font-size: 1em;
    }
    
    .control-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        max-width: 200px;
    }
    .phrase-box {
    min-height: 120px;
    }
    
    #phrase-text {
        font-size: 1.2em;
        font-weight: 600;
    }
    
    /* Nouveau: Styles responsifs pour la traduction */
    #translation-text {
        font-size: 1.2em;
        font-weight: 500;
    }
    
    .translation-box {
        padding: 15px;
    }
}

/* Accessibilité: focus visible */
button:focus {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}
